-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.php
56 lines (41 loc) · 1.44 KB
/
menu.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
54
55
<?php
?>
<!-- Navigation -->
<nav class="navbar navbar-expand-md navbar-light bg-light sticky-top">
<div class="container-fluid">
<a class="navbar-brand" href="index.php"><img src="img/logoo.png"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<?php if(isset($_SESSION['user_id'])): ?>
<?php echo'<span>Welcome</span>, '.$_SESSION['user_name']; ?>
<?php else: ?>
<?php endif; ?>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="index.php" id="1" onclick="Visiteds(this)">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.php" id="2" onclick="Visiteds(this)">About us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="courses.php" id="3" onclick="Visiteds(this)">Courses</a>
</li>
<?php if(isset($_SESSION['user_id'])): ?>
<li class="nav-item">
<a class="nav-link" id="4" onclick="Visiteds(this)" href="logout.php">Log out</a>
</li>
<?php else: ?>
<li class="nav-item">
<a class="nav-link" href="register.php" id="5" onclick="Visiteds(this)">Registration</a>
</li>
<li class="nav-item">
<a class="nav-link" href="login.php" id="6" onclick="Visiteds(this)">Login</a>
</li>
<?php endif; ?>
</ul>
</div>
</div>
</nav>