-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathadmin-page.php
41 lines (37 loc) · 1.2 KB
/
admin-page.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
<?php
session_start();
//To prevent user to access the page without login
if(isset($_SESSION['username'])){
if($_SESSION['username'] != 'admin1' && $_SESSION['username'] != 'admin'){
header('Location: index.php');
}
}
else{
header('Location: admin-login.php');
}
$welcome_name = $_SESSION['username'] ?? 'Guest';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Admin Page</title>
</head>
<?php include "template/header-name.php" ?>
<div style="margin-top:100px;">
<form>
<h3 class="heading">Welcome <?php echo $welcome_name ?></h3> <br>
<div class="line-box">
<div class="line"></div>
</div><br><br>
<a href="release-train.php" class="register"> Release New Train </a><br><br><br>
<a href="view-trains.php" class="register">View Trains</a><br><br><br>
<a href="view-status.php" class="register">View Train Status</a><br><br><br>
<a href="view-users.php" class="register">View Registered Users</a><br><br><br>
<a href="view-bookings.php" class="register">View All Bookings</a><br><br><br>
<div class="line-box">
<div class="line"></div>
</div>
</form>
</div>
<?php include "template/footer.php" ?>
</html>