-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnav.php
93 lines (67 loc) · 1.61 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
if(!isset($_SESSION))
{
session_start();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/nav.css">
<style>
</style>
</head>
<div class="topnav" id="myTopnav">
<a href="index.php" class="active">Home</a>
<a href="catalogue.php">Catalog</a>
<?php
if(isset($_SESSION['username']))
{
if($_SESSION['accountid']==40)
{
echo "<a href='additem.php'>Add Inventory</a>";
echo "<a href='sendmailfrontend.php'>Send Emails</a>";
}
}
?>
<div class="topnav-right">
<?php
if(isset($_SESSION['username']))
{
$uname=$_SESSION['username'];
print <<< END
<a href="wishlist.php">Wishlist</a>
<a href="orders.php">Orders</a>
<a href="cart.php">Cart</a>
<div class="dropdown">
<button class="dropbtn">Hey $uname!
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="profile.php">Profile</a>
<a href="logout.php">Logout</a>
</div>
</div>
END;
}
else
{
echo "<a href='signin.php'>Log In</a>";
}
?>
<!--<a href=" signup.php " >Signup</a>-->
<a href=" javascript:void(0); " style=" font-size:15px; " class=" icon " onclick=" myFunction() ">☰</a>
</div>
</div>
<script>
function myFunction() {
var x = document.getElementById(" myTopnav ");
if (x.className === " topnav ") {
x.className += " responsive ";
} else {
x.className = " topnav ";
}
}
</script>
</html>