-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtopmenu.php
More file actions
29 lines (28 loc) · 949 Bytes
/
Copy pathtopmenu.php
File metadata and controls
29 lines (28 loc) · 949 Bytes
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
<topMenu>
<?php
require_once 'sessionStart.php';
if(isset($_SESSION['id'])){
echo "<a href=\"index.php?logout=1\">Log Out</a><br>";
echo "<a href=\"mypage.php\">My Page</a><br>";
echo "<a href=\"changePassword.php\">Change password</a><br>";
if($_SESSION['userLevel'] == 1){
echo "<a href=\"worker.php\">My Worker Page</a><br>";
}else if($_SESSION['userLevel'] == 2){
echo "<a href=\"admin.php\">My Admin Page</a><br>";
}
}else{
echo "<a href=\"login.php\">Log in</a><br>";
echo "<a href=\"register.php\">Register</a><br>";
}
?>
<a href="shoppingbasket.php">Shopping Basket</a><br>
</topMenu>
<topImage>
<a href="index.php"><img src="Geeksforsale.jpg" border="0"></a>
</topImage>
<search>
<form class="form-wrapper cf" method="post" action="search.php">
<input type="text" name="search" placeholder="Search here..." required>
<button type="submit">Search</button>
</form>
</search>