forked from frankludriks/ocPOS25-Responsive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom_header.php
38 lines (28 loc) · 1.26 KB
/
custom_header.php
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
<?php
if (!strstr($_SERVER["PHP_SELF"], 'login.php') && !strstr($_SERVER["PHP_SELF"], 'forgotpass.php')) {
$nav = '<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">';
if($session->logged_in) {
$nav .= '<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"><ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Menu <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">';
$nav .= ' <li><a href="useredit.php"> ' . USER_PANEL . '</a></li>';
if($session->isAdmin()) {
$nav .= ' <li><a href="admin/admin.php"> ' . ADMIN_PANEL . '</a></li>';
}
$nav .= ' <li><a href="process.php"> ' . LOGOUT . '</a></li>
</ul>
</li>
</ul>';
$nav .= '<p class="navbar-text navbar-right">' . LOGGED_IN_AS . ' <strong>' . $session->username . '</strong></p>';
$nav .= '</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>';
echo $nav;
} else {
echo '<a href="login.php"> ' . LOGIN . '</a> ';
}
}
?>