-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
88 lines (74 loc) · 2.14 KB
/
profile.php
File metadata and controls
88 lines (74 loc) · 2.14 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
81
82
83
84
85
86
87
88
<html>
<body style=" background-image: url(images/breadcumb.jpg)">
<?php
include 'lib/User.php';
include 'inc/header.php';
Session::checkSession();
$user = new User();
?>
<?php
$connection = mysqli_connect("localhost", "root", "", "nit_angola");
if (Session::get("role") == 'admin') {
$sql = "SELECT * FROM db_reservation";
$results = mysqli_query($connection, $sql);
} else {
$sql = "SELECT * FROM db_reservation WHERE id =2";
$results = mysqli_query($connection, $sql);
} ?>
<div class="panel panel-default">
<div class="panel-heading">
<h2>الرحلات الحاليه<span class="pull-right"><a class="btn btn-primary" href="profile.php">Back</a></span></h2>
</div>
<div class="panel-body">
<div style="max-width:600px; margin: 0 auto">
<form action="" method="POST">
<table class="table table-primary">
<tr>
<th>من </th>
<th>الى</th>
<th>تاريخ بدية الرجلة </th>
<th>تاريج المغادرة </th>
<th>سعر المقعد </th>
<th>ساعة المغادرة </th>
<th>رقم سائق الحافلة </th>
<th>عدد مقاعد الرحلة </th>
<th>الاعدادات </th>
</tr>
<!--
<?php
$email = Session::get("email");
if (isset($email)) {
echo $pickup;
}
?> -->
<?php
$email = Session::get("email");
if (isset($email)) {
if (mysqli_num_rows($results)>0) {
while ($row=mysqli_fetch_array($results)) {
echo "<tr>";
echo "<td>".$row['pickup']."</td>";
echo "<td>".$row['destination']."</td>";
echo "<td>".$row['bookingdate']."</td>";
echo "<td>".$row['returndate']."</td>";
echo "<td>".$row['carnumber']."</td>";
echo "<td>".$row['bookingtime']."</td>";
echo "<td>".$row['email']."</td>";
echo "<td>".$row['passengers']."</td>";
echo "<td> <a class='btn btn-success' href='journey.php?id=".$row['id']."'>عرض المقاعد </a></td>";
echo "</tr>";
}
}
}
?>
</table>
<!-- <button type="submit" name="log
" class="btn btn-success">Update</button> -->
</form>
</div>
</div>
</div>
<?php
include 'inc/footer.php';
?>
</body></html>