-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
executable file
·51 lines (47 loc) · 1.64 KB
/
admin.php
File metadata and controls
executable file
·51 lines (47 loc) · 1.64 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
46
47
48
49
50
51
<?php
session_start();
$servername = "localhost";
$username = "cyborg";
$password = "toor";
$dbname = "lab";
$msg = $_SESSION['message'];
if(isset($_SESSION['name'])){
$n = $_SESSION['name'];
if(strcmp($n,"Admin") == 0){
$print1 = "<a href=\"newRequests.php\" class=\"linktologin\">Pending Requests</a>";
$print2 = "<a href=\"seeMonthlyBill.php\" class=\"linktologin\">Monthly Bills</a>";
$print3 = "<a href=\"removeUser.php\" class=\"linktologin\">Remove User</a>";
$print4 = "<a href=\"createAdmin.php\" class=\"linktologin\">Add Admin</a>";
$print5 = "<a href=\"https://docs.google.com/spreadsheets/d/1NjxKFmorVj5YqL_89casUuQBiHJVU9hggnk5bdXSWLI/edit#gid=1338500510\" class=\"linktologin\">View Feedback</a>";
}
else{
;
}
}
else {
echo "Please Login Again";
header("location:home.html");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>My Mess</title>
<link rel="stylesheet" type="text/css" href="styles/register.css">
</head>
<body style="text-align:center;">
<p style="font-size:92px;font-weight: 400;color: black;">Guest House Mess</p>
<a href="updateMenu.php" class="linktologin">Update Menu</a>
<?php echo $print1;?>
<a href="openClosePortal.php" class="linktologin">Open/Close Portal</a>
<?php echo $print2;?>
<a href="changePasswordAdmin.php" class="linktologin">Change Password</a>
<a href="peopleComing.php" class="linktologin">People Coming</a>
<?php echo $print3;?>
<?php echo $print4;?>
<?php echo $print5;?>
<a href="weeklyMenu.php">Weekly Menu</a>
<a class='logout' href='http://localhost:80/ZEUS/logout.php'>Logout</a><br><br><br>
<?php echo $msg;?>
</body>
</html>