-
Notifications
You must be signed in to change notification settings - Fork 1
/
left-nav.php
executable file
·65 lines (65 loc) · 1.88 KB
/
left-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
<?php
if (!securePage($_SERVER['PHP_SELF'])){die();}
//Links for logged in user
if(isUserLoggedIn()) {
echo "<ul>
<li><b>Logged in as:</b><br /> $loggedInUser->displayname</li>
<li> </li>";
if ($loggedInUser->checkPermission(array(2))){
echo "
<li><b>Admin Menu:</b></li>
<li><a href='admin_courses.php'>Courses</a></li>
<li><a href='admin_faculties.php'>Faculties</a></li>
<li><a href='admin_users.php'>Users</a></li>
<li><a href='admin_permissions.php'>Permissions</a></li>
<li><a href='admin_pages.php'>Pages</a></li>
<li><a href='admin_st_list.php'>Students</a></li>
<li><a href='report.php'>Report</a></li>";
}
if ($loggedInUser->checkPermission(array(3))){
echo "
<li><b>PVC menu:</b></li>
<li><a href='allcmrs.php'>All CMRs</a></li>";
}
if ($loggedInUser->checkPermission(array(4))){
echo "
<li><b>CL menu:</b></li>
<li><a href='cllist.php'>My CMRs</a></li>
<li><a href='create_cmr.php'>Create CMR</a></li>";
}
if ($loggedInUser->checkPermission(array(5))){
echo "
<li><b>CM menu:</b></li>
<li><a href='cmlist.php'>My CMRs</a></li>";
}
if ($loggedInUser->checkPermission(array(6))){
echo "
<li><b>DLT menu:</b></li>
<li><a href='allcmrs.php'> All CMRs</a></li>
<li><a href='pendingcmrs.php'>Pending CMRs</a></li>";
}
if ($loggedInUser->checkPermission(array(7))){
echo "
<li><b>Lecturer menu:</b></li>
<li><a href='courses.php'>My courses</a></li>";
}
if ($loggedInUser->checkPermission(array(1))){
echo "
<li><b>Guest menu:</b></li>
<li><a href='allcmrs.php'>Approved CMRs</a></li>
<li><a href='report.php'>Report</a></li>";
}
echo "<li> </li><li><a href='user_settings.php'>My Settings</a></li>
<li><a href='logout.php'>Logout</a></li></ul>";
}
//Links for users not logged in
else {
echo "<ul>
<li><i>Menu not applicable</i></li>";
if ($emailActivation)
{
echo "<li><a href='resend-activation.php'>Resend Activation Email</a></li>";
}
echo "</ul>";
}
?>