-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsession.php
46 lines (43 loc) · 1.98 KB
/
session.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
<?php
//Start session
session_start();
//Check session user
if (isset($_SESSION['UserFullName'])!=null){
$login_status="yes";
$uid=$_SESSION['UserID'];
$utype=$_SESSION['UserType'];
if($utype=='Admin'){
echo "<b><p style='text-align:right;font-size:18px;'>Hello, ".$_SESSION['UserFullName']." ! | <a href='index.php' >Home </a>";
echo " | <a href='admin_manage.php'>Admin Management</a>";
echo " | <a href='my_profile.php'>My Profile</a>";
echo " | <a href='Admin_client_event.php'>Client Event</a>";
echo " | <a href='change_password.php'>Change Password</a>";
echo " | <a href='logout.php'>Logout</a></p></b>";
}
else if($utype=='Client'){
echo "<b><p style='text-align:right;font-size:18px;'>Hello, ".$_SESSION['UserFullName']." ! | <a href='client.php' >Home </a>";
echo " | <a href='admin_manage.php'>Admin Management</a>";
echo " | <a href='my_profile.php'>My Profile</a>";
//echo " | <a href='my_booking.php'>My Booking</a>";
echo " | <a href='change_password.php'>Change Password</a>";
echo " | <a href='logout.php'>Logout</a></p></b>";
}
else if ($utype=='Guest'){
echo "<b><p style='text-align:right;font-size:18px;'>Hello, ".$_SESSION['UserFullName']." ! | <a href='index.php' >Home </a>";
echo " | <a href='my_profile.php'>My Profile</a>";
echo " | <a href='my_booking.php'>My Booking</a>";
echo " | <a href='change_password.php'>Change Password</a>";
echo " | <a href='logout.php'>Logout</a></p></b>";
}
else{
echo " | <a href='logout.php' >Logout</a></p></b>";
}
}
else{
echo "<b><p style='text-align:right;font-size:18px'>Welcome ! ";
echo " | <a href='index.php'>Home</a>";
echo " | <a href='login_register.php'>Login/Register </a>";
// echo " | <a href='login_register.php'>Register</a></p></b>";
$login_status="no";
}
?>