Created
June 17, 2016 10:26
-
-
Save nprussell/57a861d4225c20b07dff8ef8cb7998b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php session_start();?> | |
<!-- Navigation --> | |
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> | |
<!-- Brand and toggle get grouped for better mobile display --> | |
<div class="navbar-header"> | |
<?php | |
if(isset($_SESSION['username'])){ | |
?><a class="navbar-brand" href="admin.php">UPST Admin</a><? | |
}else { | |
?><a class="navbar-brand" href="index.php">UPST Admin</a><? | |
} | |
?> | |
</div> | |
<!-- Top Menu Items --> | |
<ul class="nav navbar-right top-nav"> | |
<li class="dropdown"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> <? echo " " . $display_name; ?> <b class="caret"></b></a> | |
<ul class="dropdown-menu"> | |
<li> | |
<a href="includes/logout.php"><i class="fa fa-fw fa-power-off"></i> Log Out</a> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
<?php $url= 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?> | |
<!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens --> | |
<div class="collapse navbar-collapse navbar-ex1-collapse"> | |
<ul class="nav navbar-nav side-nav"> | |
<? if ($url == "http://upst.ultimobile.net/admin/log.php"){?> | |
<li class="active"> | |
<?}else {?><li><?}?> | |
<a href="./log.php"><i class="fa fa-fw fa-file"></i> Logs</a> | |
</li> | |
<? if ($url == "http://upst.ultimobile.net/admin/users.php"){?> | |
<li class="active"> | |
<?}else {?><li><?}?> | |
<a href="./users.php"><i class="fa fa-fw fa-users"></i> Users</a> | |
</li> | |
<? if ($url == "http://upst.ultimobile.net/admin/locations.php"){?> | |
<li class="active"> | |
<?}else {?><li><?}?> | |
<a href="./locations.php"><i class="fa fa-fw fa-laptop"></i> Locations</a> | |
</li> | |
<? if ($url == "http://upst.ultimobile.net/admin/version.php"){?> | |
<li class="active"> | |
<?}else {?><li><?}?> | |
<a href="./version.php"><i class="fa fa-fw fa-code-fork"></i> Version Control</a> | |
</li> | |
<?php | |
if(isset($_SESSION['username'])){ | |
$username = $_COOKIE['username']; | |
} | |
elseif(isset($_COOKIE['username'])){ | |
$username = $_COOKIE['username']; | |
} | |
if ($username === "nprussell" || $username === "admin"){ | |
if ($url == "http://upst.ultimobile.net/admin/admins.php"){?> | |
<li class="active"> | |
<?}else {?><li><?}?> | |
<a href="./admins.php"><i class="fa fa-fw fa-users"></i> Admins</a> | |
</li> | |
<?}?> | |
</ul> | |
</div> | |
<!-- /.navbar-collapse --> | |
</nav> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment