-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathindex.php
More file actions
45 lines (34 loc) · 1.19 KB
/
index.php
File metadata and controls
45 lines (34 loc) · 1.19 KB
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
<!-- TODO: Separate themed styles -->
<?php
session_start();
ini_set("display_errors", 1);
if (!isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === false) {
header("location: views/login.php");
exit;
}
include "helpers/timeout.php"; // Handle the session timeout after inactivity
include "helpers/connect.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home</title>
<link rel="shortcut icon" href="assets/images/unilag-logo.webp" type="image/x-icon">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
</head>
<body id="index-page">
<?php
if ($_SESSION["usertype"] === "Administrator") {
echo (include "views/admin_home.php");
} elseif ($_SESSION["usertype"] === "Examiner") {
include "views/examiner_home.php";
} elseif ($_SESSION["usertype"] === "Student") {
include "views/student.php";
}
?>
<button style="background-color: black; width: 6em;"> <a href="helpers/logout.php"
style="margin: 5px; color:white;"> Logout </a> </button>
</body>
</html>