-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewofferedride.php
70 lines (64 loc) · 2.57 KB
/
viewofferedride.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
<?php
include('connection.php');
$m = $_SESSION['email'];
$check = " select * from provider where email= '$m' ";
$r = mysqli_query($con,$check);
$n = mysqli_num_rows($r);
if($n != "0"){
?>
<html>
<head>
<title>View Offered Ride</title>
<link rel="stylesheet" type="text/css" href="style/table.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" />
</head>
<body>
<?php include('nav.php'); ?>
<div class="table1">
<div class="text-b">Offered Ride!</div>
<table>
<thead>
<tr>
<th>E-mail</th>
<th>Date of Ride</th>
<th>Pickup</th>
<th>Dropoff</th>
<th>Vehicle</th>
<th>Available Seat</th>
<th>Time(24hr)</th>
<th colspan="2">Operation</th>
</tr>
</thead>
<tbody>
<?php
while($res = mysqli_fetch_assoc($r)){
?>
<tr>
<td><?php echo $res['email']; ?> </td>
<td><?php echo $res['date']; ?> </td>
<td><?php echo $res['pickup']; ?> </td>
<td><?php echo $res['dropoff']; ?> </td>
<td><?php echo $res['vehicle']; ?> </td>
<td><?php echo $res['seat']; ?> </td>
<td><?php echo $res['time']; ?> </td>
<td><a href="rideupdate.php?id=<?php echo $res['p_id']; ?>" data-toggle="tooltip" data-placement="top" title="Update"><i class="fa fa-edit" aria-hidden="true"></i></a></td>
<td><a href="ridedelete.php?id=<?php echo $res['p_id']; ?>" data-toggle="tooltip" data-placement="top" title="Delete"><i class="fa fa-trash" aria-hidden="true"></i></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php include('contact.php'); ?>
</body>
</html>
<?php
}
else{
echo "<script type=\"text/javascript\">\n";
echo "alert('OOPS...No Offered Ride!!');\n";
echo "window.location = ('main.php');\n";
echo "</script>";
}
?>