-
Notifications
You must be signed in to change notification settings - Fork 0
/
side-nav.php
155 lines (129 loc) · 7.08 KB
/
side-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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<div id="layoutSidenav_nav">
<nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
<div class="sb-sidenav-menu">
<div class="nav">
<a class="nav-link" href="index.php">
<a class="nav-link" href="index.php">
<i class="fas fa-home fa-lg"></i>
<span> Dashboard</span>
</a>
<?php
if (isset($_SESSION['role']) && $_SESSION['role'] == 'admin') {
echo '<a class="nav-link collapsed" href="register.php">
<i class="fas fa-users fa-lg"></i>
<span> Add Admin </span>
</a>';
echo '<a class="nav-link collapsed" href="add-teacher.php">
<i class="fas fa-chalkboard-teacher fa-lg"></i>
<span>Add Teacher</span>
</a>';
echo '<a class="nav-link collapsed" href="section.php">
<i class="fas fa-section"></i>
<span>Add Section</span>
</a>';
echo '<a class="nav-link collapsed" href="student-list.php">
<i class="fas fa-users fa-lg"></i>
<span> Students </span>
</a>';
echo '<a class="nav-link collapsed" href="archive-admin.php">
<i class="fas fa-archive"></i>
<span>Archive (Admin)</span>
</a>';
echo '<a class="nav-link collapsed" href="archive-teacher.php">
<i class="fas fa-archive"></i>
<span>Archive (Teacher)</span>
</a>';
echo '<a class="nav-link collapsed" href="archive-section.php">
<i class="fas fa-archive"></i>
<span>Archive (Section )</span>
</a>';
}
?>
<!-- Both teacher and admin can access this -->
<!-- <a class="nav-link collapsed" href="student-list.php">
<i class="fas fa-user-graduate fa-lg"></i>
<span>Student</span>
</a> -->
<?php
if (isset($_SESSION['role']) && $_SESSION['role'] == 'admin') {
echo '<a class="nav-link collapsed" href="quiz-score.php">
<i class="fas fa-file-text fa-lg"></i>
<span> Quiz Scores</span>
</a>';
echo '<a class="nav-link collapsed" href="archive.php">
<i class="fas fa-archive"></i>
<span>Archive (Student)</span>
</a>';
// echo '<a class="nav-link collapsed" href="archive-teacher.php">
// <i class="fas fa-archive"></i>
// <span>Archive (Teachers"'" Accounts)</span>
// </a>';
}
?>
<?php
if (isset($_SESSION['role']) && $_SESSION['role'] == 'teacher') {
echo '<a class="nav-link collapsed"
href="add-student.php">
<i class="fas fa-users fa-lg"></i>
<span>Student</span>
</a>
<a class="nav-link collapsed"
href="lesson.php">
<i class="fas fa-book-open fa-lg"></i>
<span>Lesson</span>
</a>
<a class="nav-link collapsed" href="create-quiz.php">
<i class="fas fa-file-text fa-lg"></i>
<span>Create Quiz</span>
</a>
<a class="nav-link collapsed" href="quiz-score.php">
<i class="fas fa-users fa-lg"></i>
<span> Quiz Scores</span>
</a>';
}
?>
<div class="collapse" id="collapsePages" aria-labelledby="headingTwo"
data-bs-parent="#sidenavAccordion">
<nav class="sb-sidenav-menu-nested nav accordion" id="sidenavAccordionPages">
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse"
data-bs-target="#pagesCollapseAuth" aria-expanded="false"
aria-controls="pagesCollapseAuth">
Authentication
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="pagesCollapseAuth" aria-labelledby="headingOne"
data-bs-parent="#sidenavAccordionPages">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="login.html">Login</a>
<a class="nav-link" href="register.php">Register</a>
<a class="nav-link" href="password.html">Forgot Password</a>
</nav>
</div>
<a class="nav-link collapsed" href="#" data-bs-toggle="collapse"
data-bs-target="#pagesCollapseError" aria-expanded="false"
aria-controls="pagesCollapseError">
Error
<div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
</a>
<div class="collapse" id="pagesCollapseError" aria-labelledby="headingOne"
data-bs-parent="#sidenavAccordionPages">
<nav class="sb-sidenav-menu-nested nav">
<a class="nav-link" href="401.html">401 Page</a>
<a class="nav-link" href="404.html">404 Page</a>
<a class="nav-link" href="500.html">500 Page</a>
</nav>
</div>
</nav>
</div>
</div>
</div>
<div class="sb-sidenav-footer d-flex flex-row justify-content-between">
<div class="small">Logged in as:</div>
<?php
if (isset($_SESSION['role'])) {
echo '<div class="small">' . ucwords($_SESSION['role']) . '</div>';
}
?>
</div>
</nav>
</div>