Make Header.php look better.

Bug430-Eden2
Lan Hui 2023-07-31 16:39:53 +08:00
parent 760a80b461
commit 830001e72d
1 changed files with 19 additions and 14 deletions

View File

@ -116,21 +116,20 @@ if (mysqli_connect_errno()) {
</button>
<div class="collapse navbar-collapse" id="navbarColor02">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<li class="nav-item active">
<!-- <a class='nav-link' href='~\..\Visitors.php'> < i class='fa fa-globe'></i> Visitor Portal <span class='sr-only'>(current)</span></a> -->
</li>
<?php
if (isset($_SESSION["user_fullname"])) {
echo " <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>";
?>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
Welcome &nbsp; <b> <?php echo $_SESSION['user_fullname']; ?> </b> &nbsp;
Welcome &nbsp;
<b> <?php echo $_SESSION['user_fullname']; ?> </b>
&nbsp;
<?php
$c_date = date("Y-m-d H:i");
@ -141,19 +140,25 @@ if (mysqli_connect_errno()) {
?>
<?php
if ($_SESSION['user_type'] == "Lecturer") {
echo "&nbsp;&nbsp;&nbsp; <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> &nbsp;<a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin </a>";
if ($_SESSION['user_type'] == "Lecturer") { // Show Admin link
echo "&nbsp;&nbsp;&nbsp; <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i>";
echo "&nbsp;<a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin</a>";
}
?>
&nbsp;&nbsp;&nbsp; <i class="fa fa-user" style="color:#fff;"> </i>
&nbsp;<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a>
&nbsp;&nbsp;&nbsp; <i class="fa fa-lock" style="color:#fff;"> </i> &nbsp;<a style='color:#fff !important' href="~\..\logout.php">Logout </a>
&nbsp;&nbsp;&nbsp; <i class="fa fa-lock" style="color:#fff;"> </i>
&nbsp;<a style='color:#fff !important' href="~\..\logout.php">Logout </a>
<?php
}
} // Confusing. What is this for?
?>
</form>
</div>
</nav>