-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
48 lines (48 loc) · 1.6 KB
/
index.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
<?php
include_once("./includes/common/header.php");
if(!isset($_SESSION["user"])){
header("Location:login.php");
}
if($_SESSION["user"] == "admin"){
if(isset($_GET["section"])){
switch ($_GET["section"]) {
case 'manstaff':
include_once("./includes/admin/managestaff.php");
break;
case 'suballoc':
include_once("./includes/admin/suballoc.php");
break;
case 'manstud':
include_once("./includes/admin/managestud.php");
break;
default:
# Nothing
break;
}
}
else{
echo '<span class="greetings">Welcome '.$_SESSION['name'].'</span>';
}
}
else{
if(isset($_GET["section"])){
switch ($_GET["section"]) {
case 'takeattend':
include_once("./includes/user/takeattend.php");
break;
case 'viewattend':
include_once("./includes/user/viewattend.php");
break;
case 'editattend':
include_once("./includes/user/editattend.php");
break;
default:
# Nothing
break;
}
}
else{
echo '<span class="greetings">Welcome '.$_SESSION['name'].'</span>';
}
}
include_once("./includes/common/footer.php");