-
Notifications
You must be signed in to change notification settings - Fork 0
/
nav.php
36 lines (32 loc) · 1.5 KB
/
nav.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
<?php
if(!isset($_SESSION['id'])){
?>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #D3D3D3;">
<div class="container-fluid">
<a href="index.php" class="navbar-brand"><i class="bi bi-house-door-fill"></i>Home</a>
<ul class="navbar-nav">
<li class="nav-item">
<a href="login.php" class="navbar-link"><i class="bi bi-box-arrow-in-right"></i> เข้าสู่ระบบ</a>
</li>
</ul>
</div>
</nav>
<?php }else{ ?>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #D3D3D3;">
<div class="container-fluid">
<a href="index.php" class="navbar-brand"><i class="bi bi-house-door-fill"></i>Home</a>
<ul class="navbar-nav">
<div class="dropdown">
<a class="btn btn-outline-secondary dropdown-toggle btn-sm" type="button" id="button1" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person-lines-fill"></i> <?php echo $_SESSION["username"]; ?>
</a>
<ul class="dropdown-menu" aria-labelledby="button1">
<li><a href="logout.php" class="dropdown-item">
<i class="bi bi-power"></i> ออกจากระบบ
</a></li>
</ul>
</div>
</ul>
</div>
</nav>
<?php } ?>