Admin.php: check privilege first

pull/49/head
Hui Lan 2022-12-01 20:25:42 +08:00
parent 67647de04a
commit 2230bf4222
1 changed files with 6 additions and 7 deletions

View File

@ -7,13 +7,12 @@ $page = "admin";
include 'Header.php';
?>
<!-- <?php
// if ($_SESSION['user_type'] != "Lecturer") {
// $_SESSION["info_login"] = "You must log in first.";
// echo $_SESSION["info_login"];
// header("Location: index.php");
// }
?> -->
<?php
// Only Lecturer or Admin could access this page
if ($_SESSION['user_type'] != "Lecturer" || $_SESSION['user_type'] != "Admin") {
die("Sorry. Nothing to see here.");
}
?>
<style>
.col-md-4 {