-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_req.php
More file actions
80 lines (64 loc) · 1.79 KB
/
Copy pathuser_req.php
File metadata and controls
80 lines (64 loc) · 1.79 KB
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
<?php
session_start();
include("dbconnect.php");
$uname = $_SESSION['uname'];
extract($_REQUEST);
?>
<?php include("userheader.php");?>
<div class="container-fluid pt-5">
<div class="container pt-5">
<h2 class="display-4 text-uppercase mb-5">Request Status</h2>
<h3>Rider</h3>
<div class="row">
<div class="col-lg-4 mb-5">
</div>
<table class="table">
<tr>
<?php
$q2 = mysqli_query($connect, "SELECT * FROM rs_request WHERE rider='$uname'");
$k = 1;
$headings = array("#", "Driver", "No. of Seats", "Request on", "Status");
foreach ($headings as $heading) {
?>
<th><?php echo $heading; ?></th>
<?php
}
?>
</tr>
<?php
while ($r1 = mysqli_fetch_array($q2)) {
?>
<tr>
<td><?php echo $k; ?></td>
<td><?php echo $r1['driver']; ?></td>
<td><?php echo $r1['num_seats'];?></td>
<td><?php echo $r1['rdate'];?> <?php echo $r1['rtime'];?></td>
<td>
<?php
if ($r1['status'] == 1) {
echo "Accepted<br />";
echo "Amount: Rs. " . $r1['amount'] . "<br />";
if ($r1['pay_st'] == 1) {
echo "Paid";
} else {
?>
<a href="pay.php?rid=<?php echo $r1['id']; ?>">Payment</a>
<?php
}
} elseif ($r1['status'] == 2) {
echo "Rejected";
} else {
echo "Wait for Request";
}
?>
</td>
</tr>
<?php
$k++;
}
?>
</table>
</div>
</div>
</div>
<?php include("footer.php");?>