forked from pimylifeup/attendance-system-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmembers.php
63 lines (60 loc) · 1.98 KB
/
members.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
<?php
require 'common.php';
//Grab all the users from our database
$members = $database->select("members", [
'id',
'name',
'rfid_uid',
"membership_expiry",
]);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Imaginery Gym Check-in</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-dark bg-dark">
<a class="navbar-brand" href="/attendance">Imaginery Gym Check-in System</a>
<ul class="nav nav-pills">
<li class="nav-item">
<a href="attendance.php" class="nav-link">View Attendance</a>
</li>
<li class="nav-item">
<a href="members.php" class="nav-link active">View Members</a>
</li>
</ul>
</nav>
<div class="container">
<div class="row">
<h2>Members</h2>
</div>
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">RFID UID</th>
<th scope="col">Membership Expiration</th>
</tr>
</thead>
<tbody>
<?php
//Loop through and list all the information of each user including their RFID UID
foreach($members as $member) {
echo '<tr>';
echo '<td scope="row">' . $member['id'] . '</td>';
echo '<td>' . $member['name'] . '</td>';
echo '<td>' . $member['rfid_uid'] . '</td>';
echo '<td>' . $member['membership_expiry'] . '</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</html>