-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshowbooking.php
129 lines (108 loc) · 3.63 KB
/
showbooking.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>VIT CAB SHARE</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="https://use.fontawesome.com/5b1ca6f502.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
</head>
<body >
<div class="container-fluid" style="background: #CBE32D">
<h1 style="margin-left: 50px;margin-bottom: 30px;margin-top: 30px;"><a href="index.php">Book my Cab</a></h1>
</div>
<div class="container-fluid text-center">
<h1>All Bookings</h1><br><br>
</div>
<div class="container">
<div class="row">
<?php
session_start();
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "users";
$customer = $_SESSION['username'];
$conn = mysqli_connect($servername, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$query="SELECT * FROM user_data WHERE cust='$customer'";
$select_all_events=mysqli_query($conn,$query);
if(empty($select_all_events)){
?>
<div class="col-md-12">
<div class="panel panel-default" style="background : #DFE2DB">
<div class="panel-body">
<div class="col-md-4 text-center">
<h1>No Result Found</h1>
</div>
</div>
</div>
</div>
<?php
}
else
{
while($row=mysqli_fetch_assoc($select_all_events)){
$id=$row['ID'];
$from=$row['from1'];
$to=$row['to1'];
$date=$row['date'];
$time=$row['time'];
$name=$row['name'];
$mobile=$row['mobile'];
$email=$row['email'];
$uname = $row['cust'];
if( strcmp($uname,$customer) == 0)
{
?>
<div class="col-md-12">
<div class="panel panel-default" style="background : #DFE2DB">
<div class="panel-body">
<div class="col-md-3 text-center">
<h4> <?php echo $from ?> </h4>
</div>
<div class="col-md-3 text-center">
<h4><?php echo $to ?></h2>
</div>
<div class="col-md-2 text-center">
<h4> <?php echo $date ?></h2>
</div>
<div class="col-md-2 text-center">
<h4> <?php echo $time ?> </h2>
</div>
<div class="col-md-2 text-center">
<a href="cancel.php?id=<?php echo $id; ?>">
<button class="btn btn-danger">Cancel</button>
</div>
</div>
</div>
</div>
<?php
}
}
}
?>
</div>
</div><br><br><br><br><br><br><br>
<div class="container-fluid" style="background-color:#222222;color:white;">
<div class="text-center">
<h1>Contact Us</h1>
<br><br>
</div>
<div class="col-md-4">
<h2>Book My Cab</h2>
<h4>All rights reserved</h4>
</div>
<div class="col-md-4">
<h4><i class="fa fa-facebook fa-3x"></i> <i class="fa fa-twitter fa-3x"> </i><i class="fa fa-instagram fa-3x"></i> <i class="fa fa-linkedin fa-3x"></i></h4>
</div>
<div class="col-md-4 text-right">
<h4>VIT University</h4>
<h4>Vellore Tamilnadu 632014</h4>
</div>
</div>
</body>