-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_assign_pickup_v.php
More file actions
64 lines (57 loc) · 2.17 KB
/
admin_assign_pickup_v.php
File metadata and controls
64 lines (57 loc) · 2.17 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ADMIN HOME - APATH</title>
<link rel="stylesheet" href="apath.css">
</head>
<body>
<div class="container">
<h1>APATH</h1>
<?php
$current_page = basename($_SERVER['PHP_SELF']);
include "a_nav.php"; // Admin navigation
?>
<h2>Assign Pickup Volunteer</h2>
<?php
include "connection.php"; // Database connection
// Query to get students with assigned volunteers
$query = "
SELECT s.first_name, s.last_name, s.gender, s.flight_date, s.flight_time, p.s_id, p.v_id, p.approved
FROM apath_student s
RIGHT JOIN apath_pickup p ON s.s_id = p.s_id
ORDER BY s.flight_date, s.flight_time
";
$result = mysqli_query($dbc, $query);
?>
<div class="table-container">
<table>
<tr>
<th>To Confirm/Approve</th>
<th>First Name</th>
<th>Last Name</th>
<th>Gender</th>
<th>Arriving Date</th>
<th>Arriving Time</th>
<th>Volunteer ID</th>
<th>Already Approved?</th>
</tr>
<?php while ($row = mysqli_fetch_assoc($result)) { ?>
<tr>
<td><a href="approve_pickup.php?s_id=<?php echo $row['s_id']; ?>&v_id=<?php echo $row['v_id']; ?>">Approve</a></td>
<td><?php echo $row['first_name']; ?></td>
<td><?php echo $row['last_name']; ?></td>
<td><?php echo $row['gender']; ?></td>
<td><?php echo $row['flight_date']; ?></td>
<td><?php echo $row['flight_time']; ?></td>
<td><?php echo $row['v_id']; ?></td>
<td><?php echo $row['approved'] ? 'Yes' : 'No'; ?></td>
</tr>
<?php } ?>
</table>
</div>
<p class="footer"><a href="#">Covid Information and Guidelines</a></p>
</div>
</body>
</html>