-
Notifications
You must be signed in to change notification settings - Fork 4
/
sideNav.php
116 lines (100 loc) · 3.44 KB
/
sideNav.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
session_start();
if ($_SESSION['loggedIn'] != true)
{
header('Location: http://www.stenden.protonbytez.com/login.php');
exit;
}
else
{
include 'class/dbConnection.php';
$authorisationName = array(
'User',
'Operator',
'Team Leader',
'Security Operator',
'Master'
);
$sideNavtableName = "EMPLOYEE";
$sideNavsqlString = "SELECT EmployeeID, EmployeeEmail, EmployeeName, EmployeeSurname, PICTURE FROM $sideNavtableName WHERE EmployeeID=" . $_SESSION['employeeID'];
$sideNavResult = mysqli_query($DBConnection, $sideNavsqlString) OR DIE ('Error: ' . mysqli_errno($DBConnection) . mysqli_error($DBConnection));
$sideNavRow = mysqli_fetch_assoc($sideNavResult);
mysqli_free_result($sideNavResult);
}
?>
<!-- COLLAPSABLE SIDE MENU -->
<nav class="navbar-default navbar-static-side" role="navigation">
<div class="sidebar-collapse">
<ul class="nav" id="side-menu">
<!-- NAV BAR TOP -->
<li class="nav-header">
<!-- PROFILE INFORMATION -->
<div class="dropdown profile-element">
<span>
<a href="profile.php"><img alt="image" class="img-circle" src="<?php echo $sideNavRow['PICTURE']; ?>" /></a>
</span>
<a href="profile.php">
<span class="clear">
<span class="block m-t-xs"><strong class="font-bold"><?php echo utf8_decode($sideNavRow['EmployeeName']) . ' ' . utf8_decode($sideNavRow['EmployeeSurname']); ?></strong></span>
<span class="text-muted text-xs block"><?php echo $authorisationName[$_SESSION['auth']]; ?></span>
</span>
</a>
</div>
<!-- CLOSED NAV BAR LOGO ELEMENT -->
<div class="logo-element">
<a href="profile.php">WS</a>
</div>
</li>
<!-- DASHBOARD -->
<li class="active">
<a href="index.php"><i class="fa fa-th-large"></i><span class="nav-label">Dashboard</span></a>
</li>
<!-- PROFILE DROP DOWN LIST -->
<li>
<a href="#"><i class="fa fa-picture-o"></i></i> <span class="nav-label">Profile</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="profile.php">Profile</a></li>
<li><a href="http://outlook.live.com" target="_blank">Mailbox</a></li>
<li class="divider"></li>
<li><a href="login.php">Log out</a></li>
</ul>
</li>
<!-- GRAPHS LINK -->
<li>
<a href="chart.php"><i class="fa fa-bar-chart-o"></i> <span class="nav-label">Charts</span> </a>
</li>
<!-- ADD INCIDENT LINK -->
<li>
<a href="addIncident.php"><i class="fa fa-edit"></i> <span class="nav-label">Add Incident</span> </a>
</li>
<!-- ALL INCIDENTS LINK -->
<li>
<a href="allIncidents.php"><i class="fa fa-database"></i> <span class="nav-label">All Incidents</span> </a>
</li>
<!-- ADD USERS DROP DOWN LIST -->
<li>
<a href="#"><i class="fa fa-sitemap"></i></i> <span class="nav-label">Add User</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li><a href="addUser.php">User</a></li>
<li><a href="addClient.php">Client</a></li>
<li><a href="addEmployee.php">Employee</a></li>
</ul>
</li>
</ul>
</div>
</nav>
<!-- SAMPLE PICS
<i class="fa fa-diamond"></i>
<i class="fa fa-envelope"></i>
<i class="fa fa-edit"></i>
<i class="fa fa-desktop"></i>
<i class="fa fa-files-o"></i>
<i class="fa fa-globe"></i>
<i class="fa fa-flask"></i>
<i class="fa fa-laptop"></i>
<i class="fa fa-picture-o"></i>
<i class="fa fa-sitemap"></i>
<i class="fa fa-magic"></i>
<i class="fa fa-star"></i>
<i class="fa fa-database"></i>
-->