-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.php
64 lines (61 loc) · 2.55 KB
/
home.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
session_start();
if (empty(($_SESSION['username']))) {
header('Location: index.html');
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Home Page</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<form>
<img src='iitp.png' alt = 'iitp_logo' style="float:left;width:15%;height=15%;">
<a href='home.php' style="float:right;"> <label > Home Page </label> </a>
<!-- <div class="header"><h3>Guest House Booking Portal IIT Patna </h3></div> -->
<div class='header'>
<label>
<h3> Welcome !</br>
<?php echo $_SESSION['username']?>
</br>
</h3>
</label>
</div>
</br>
<p style="text-align:center;">What would you like to explore !!!</p>
<table>
<?php
$admin_user = 'admin';
$check_username = $_SESSION['username'];
$check_username = strtolower($check_username);
$admin_user = strtolower($admin_user);
if ($check_username == $admin_user)
{
echo "
<div class= 'header'><a href='admin_history.php'> <label > Admin History </label> </a> </div>
<div class= 'header'><a href='admin_booking_request.php'> <label > Admin Booking Requests </label> </a> </div>
<div class= 'header'><a href='availability.php'> <label > Check Availability Of Rooms</label> </a> </div>
<div class= 'header'><a href='pending.php'> <label >Pending Payments</label> </a> </div>
<div class= 'header'><a href='change_password.php'> <label > Change Password </label> </a> </div>
<div class= 'header'><a href='logout.php'> <label >Logout</label> </a> </div>
";
}
else
{
echo "
<div class= 'header'><a href='history.php'> <label > My Bookings </label> </a> </div>
<div class= 'header'><a href='booked_rooms.php'> <label > My Booked Rooms </label> </a> </div>
<div class= 'header'><a href='bookings.php'> <label > Make a Booking </label> </a> </div>
<div class= 'header'><a href='availability.php'> <label > Check Availability Of Rooms</label> </a> </div>
<div class= 'header'><a href='logout.php'> <label >Logout</label> </a> </div>
";
}
?>
</table>
</form>
</body>
</html>