-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.php
More file actions
104 lines (102 loc) · 5.26 KB
/
menu.php
File metadata and controls
104 lines (102 loc) · 5.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<div class="navbar-wrapper">
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<?php if ($_SESSION['authenticated'] ?? false) { ?>
<a class="navbar-brand <?php if ( $action === "datachange" ) { echo "active"; } ?>" href="?action=datachange"
><i class="fa fa-fw fa-home"></i> <?php echo $messages["datachange"]; ?></a>
<?php } ?>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<?php if ($_SESSION['authenticated'] ?? false) { ?>
<li class="<?php if ( $action === "change" ) { echo "active"; } ?>">
<a href="?action=change">
<i class="fa fa-fw fa-lock"></i> <?php echo $messages["passwordchange"]; ?>
</a>
</li>
<?php if ( $use_questions ) { ?>
<li class="<?php if ( $action === "resetbyquestions" or $action === "setquestions" ) { echo "active"; } ?>">
<a href="?action=resetbyquestions"
data-toggle="menu-popover"
data-content="<?php echo htmlentities(strip_tags($messages["changehelpquestions"])); ?>"
><i class="fa fa-fw fa-question-circle"></i> <?php echo $messages["menuquestions"]; ?></a>
</li>
<?php } ?>
<?php if ( $use_sms ) { ?>
<li class="<?php if ( ( $action === "resetbytoken" and $source === "sms" ) or $action === "sendsms" ) { echo "active"; } ?>">
<a href="?action=sendsms"
data-toggle="menu-popover"
data-content="<?php echo htmlentities(strip_tags($messages["changehelpsms"])); ?>"
><i class="fa fa-fw fa-mobile"></i> <?php echo $messages["menusms"]; ?></a>
</li>
<?php } ?>
<?php if ( $_SESSION['administrator']) { ?>
<li class="<?php if ( $action === "create" ) { echo "active"; } ?>">
<a href="?action=create">
<i class="fa fa-fw fa-user-plus"></i> <?php echo $messages["menucreate"]; ?>
</a>
</li>
<li class="<?php if ( $action === "delete" ) { echo "active"; } ?>">
<a href="?action=delete">
<i class="fa fa-fw fa-user-times"></i> <?php echo $messages["menudelete"]; ?>
</a>
</li>
<?php } ?>
<?php if ( $_SESSION['authenticated'] ) { ?>
<?php } ?>
<?php } else { ?>
<li class="<?php if ( $action === $default_action ) { echo "active"; } ?>">
<a href="?"
data-toggle="menu-popover"
data-content="<?php echo htmlentities(strip_tags($messages["login"])); ?>"
><i class="fa fa-fw fa-sign-in"></i> <?php echo $messages["login"]; ?></a>
</li>
<?php if ( $use_tokens ) { ?>
<li class="<?php if ( ( $action === "resetbytoken" and $source !== "sms" ) or $action === "sendtoken" ) { echo "active"; } ?>">
<a href="?action=sendtoken"
data-toggle="menu-popover"
data-content="<?php echo htmlentities(strip_tags($messages["changehelptoken"])); ?>"
><i class="fa fa-fw fa-envelope"></i> <?php echo $messages["menutoken"]; ?></a>
</li>
<?php } ?>
<?php } ?>
</ul>
<ul style="float: right;" class="nav navbar-nav">
<?php if ($_SESSION['authenticated'] ?? false) { ?>
<li>
<a href="?login=<?php echo $_SESSION['login']; ?>">
<?php if ($_SESSION['thumbnailphoto']) { ?>
<div
class="profile-image"
style="background-image:url('data:image/png;base64,<?php echo base64_encode($_SESSION['thumbnailphoto'][0]); ?>');"
data-toggle="popover"
data-content="<div class='profile-image large' style="background-image:url('data:image/png;base64,<?php echo base64_encode($_SESSION['thumbnailphoto'][0]); ?>');"></div>"
data-html="true"
>
</div>
<?php } else { ?>
<i class="fa fa-fw fa-user"></i>
<?php } ?>
<span><?php echo $_SESSION['login']; ?></span>
</a>
</li>
<li>
<a href="?action=logout"
data-toggle="menu-popover"
data-content="<?php echo htmlentities(strip_tags($messages["logout"])); ?>"
style="padding: 15px 5px;"
><i class="fa fa-fw fa-sign-out"></i> </a>
</li>
<?php } ?>
</ul>
</div>
</div>
</div>
</div>