-
Notifications
You must be signed in to change notification settings - Fork 0
/
topnav.php
62 lines (62 loc) · 1.75 KB
/
topnav.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
<html>
<?php
session_start();
$user_name = $_SESSION['user_name'];
if ($user_name == "")
echo '<script type="text/javascript">
alert("Please log in again!");
window.location = "login.php"
</script>';
else
echo '
<div class="usernav">
<div class="userdropdown">
<button class="userdropbtn">Hi, '.$user_name.'!</button>
<div class="userdropdown-content">
<a href="/~psxtl3/change_password.php">Change password</a>
<a href="/~psxtl3/login.php">Log out</a>
</div>
</div>
</div>';
?>
<h1>POLICE TRAFFIC DATABASE</h1>
<div class="topnav" id="myTopnav">
<div class="dropdown">
<button class="dropbtn">People</button>
<div class="dropdown-content">
<a href="/~psxtl3/people.php">Search for people</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Vehicle</button>
<div class="dropdown-content">
<a href="/~psxtl3/vehicle_add.php">Add new vehicle</a>
<a href="/~psxtl3/vehicle_search.php">Search for vehicle</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Report</button>
<div class="dropdown-content">
<a href="/~psxtl3/report_add.php">Add new report</a>
<a href="/~psxtl3/report_list.php">List of reports</a>
</div>
</div>
<?php
if ($user_name == "haskins")
echo '<div class="dropdown">
<button class="dropbtn">Fines</button>
<div class="dropdown-content">
<a href="/~psxtl3/fines_list.php">Add/Edit fines</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn" style="width:160px">Police officer</button>
<div class="dropdown-content">
<a href="/~psxtl3/policeofficer_createaccount.php">Add new account</a>
</div>
</div>
</div>';
else
echo '</div>';
?>
</html>