-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.php
41 lines (37 loc) · 929 Bytes
/
index.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();
if(isset($_SESSION['book']))
{
unset($_SESSION['book']);
}
if(isset($_POST['book']))
{
$lugg = isset($_POST['lugg'])?$_POST['lugg']:0;
$_SESSION['book']['pickup']=$_POST['pickup'];
$_SESSION['book']['drop']=$_POST['drop'];
$_SESSION['book']['cabtype']=$_POST['cabtype'];
$_SESSION['book']['lugg']=$lugg;
$_SESSION['book']['fare']=$_POST['fare'];
$_SESSION['book']['dist']=$_POST['dist'];
$_SESSION["time"] = time();
echo '<script>alert("Please Login to BOOK a ride");
window.location.href = "login.php";</script>';
}
if(isset($_SESSION['userdata']))
{
if($_SESSION['userdata']['is_admin']==0)
{
header('Location: dash.php');
}
if($_SESSION['userdata']['is_admin']==1)
{
header('Location: admin.php');
}
}
else{
include('adminwrk.php');
include('header.php');
include('navh.php');
include('body.php');
include('footer.php'); }
?>