-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshowrequest.php
121 lines (99 loc) · 3.99 KB
/
showrequest.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
<!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>Requests</h1><br><br>
</div>
<div class="container" >
<div class="row">
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "users";
$customer = $_GET['username'];
$conn = mysqli_connect($servername, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$query="SELECT * FROM request ";
$select_all_events=mysqli_query($conn,$query);
while($row=mysqli_fetch_assoc($select_all_events)){
$from=$row['from1'];
$to=$row['to1'];
if(strcmp($to,$customer)==0)
{
$w ="SELECT * FROM user_data where cust='$to' ";
$select_all=mysqli_query($conn,$w);
while($a=mysqli_fetch_assoc($select_all))
{
$from1 = $a['from1'];
$to1 = $a['to1'];
$date = $a['date'];
$time = $a['time'];
$operator = $a['operator'];
$option1 = $a['option1'];
$type = $a['type'];
}
$q="SELECT * FROM user where username='$from' ";
$select_all_event=mysqli_query($conn,$q);
while($r=mysqli_fetch_assoc($select_all_event)){
$first= $r['first'];
$last = $r['last'];
$mobile =$r['mobile'];
$email = $r['email'];
?>
<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><?php echo $first ?></h1>
<h1><?php echo $last ?></h1><br><br>
</div>
<div class="col-md-4 text-center">
<h4><?php echo $email ?></h2>
<h4><?php echo $mobile ?></h2>
<br><br>
</div>
<div class="col-md-4 text-center" style="margin-top: 75px">
<a href="confirmrequestbyrequest.php?cust=<?php echo $from; ?>&name=<?php echo $first; ?>&mobile=<?php echo $mobile; ?>&email=<?php echo $email; ?>&from=<?php echo $from1; ?>&to=<?php echo $to1; ?>&date=<?php echo $date; ?>&time=<?php echo $time; ?>&operator=<?php echo $operator; ?>&option=<?php echo $option1; ?>&type=<?php echo $type; ?>&own=<?php echo $to; ?>"><button class="btn btn-info" style="padding: 25px 50px">Confirm</button>
</div>
</div>
</div>
</div>
<?php } } } ?>
<div class="text-center">
<a href="book.php"><button type="button" class="btn btn-danger text-center">BOOK A DIFFERENT CAB</button></a><br><br>
</div>
</div>
</div>
<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>