-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnav-bar.php
53 lines (51 loc) · 2.75 KB
/
nav-bar.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
require_once "./classes/admin.php";
$admin = new Admin();
?>
<nav class="navbar navbar-light navbar-expand-md" style="background-color: gray">
<div class="container-fluid">
<a class="navbar-brand" href="#">Admin Panel</a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-1">
<span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navcol-1">
<ul class="navbar-nav">
<li class="nav-item dropdown" id="manage">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink1" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Manage
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="category-view.php">Category</a>
<a class="dropdown-item" href="brand-view.php">Brand</a>
<a class="dropdown-item" href="product-view.php">Product</a>
<a class="dropdown-item" href="product-details-admin.php">Product Details</a>
<a class="dropdown-item" href="orders-view.php">Orders</a>
</div>
</li>
<li class="nav-item dropdown" id="manage">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink2" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
User
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="user-view.php">Customer</a>
<a class="dropdown-item" href="admin-view.php">Admin</a>
</div>
</li>
</ul>
<div class="dropdown" style="float: right;">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
<?php
$rows = $admin->fetchByUsername($_SESSION['username_admin']);
if (!empty($rows)) {
foreach ($rows as $row) {
echo 'Hello, ' . $row['username'] . '';
}
}
?>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="login-admin.php">Logout</a></li>
</ul>
</div>
</div>
</div>
</nav>