-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathother_inv.php
49 lines (41 loc) · 1.25 KB
/
other_inv.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
<?php
include 'access.php';
// Start the session
session_start();
// Check if the user is logged in and has admin privileges
if (!isset($_SESSION['user_id']) || $_SESSION['user_role'] !== 'admin') {
// Redirect to the login page or display an error message
header("Location: demo.php?block=1");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="items.css">
<title>Rescuer's Inventory</title>
</head>
<body>
<h2>Rescuer's Inventory</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Category</th>
<th>Detail</th>
<th>Rescuer ID</th>
</tr>
</thead>
<tbody id="rescuer-data-output">
<!-- Products from the rescuer.json file will be inserted here -->
</tbody>
</table>
<div class="button-container">
<button onclick="window.location.href = 'food.php';" class="action-button">GO BACK</button>
</div>
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="other_inv.js"></script>
</body>
</html>