-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiningtable.php
More file actions
63 lines (57 loc) · 3.01 KB
/
diningtable.php
File metadata and controls
63 lines (57 loc) · 3.01 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
<?php include "inc/header.php";
Session::init(); // Initialize session
Session::checkSession(); // Check if the user is logged in
?>
<?php include "inc/sidenav.php";?>
<div class="main-content">
<h2>Dashboard / Dining Table List</h2>
<div class="items-data-table">
<div class="table-heading">
<span class="left">Table List</span>
<div class="button-wrapper">
<a href="#filter" id="filter" class="border-button "><i class="fas fa-filter"></i><span>Filter</span></a>
<a href="#export" id="export" class="border-button "><i class="fas fa-file-export"></i><span>Export</span></a>
<a href="addtable.php" id="addItemBtn" class="border-button regular-button"><i class="fas fa-plus"></i><span>Add Table</span></a>
</div>
</div>
<div class="container">
<div class="table-wrapper">
<table class="item-table">
<thead>
<tr>
<th>Name</th>
<th>Seats</th>
<th>QR Link</th>
<th>QR Image</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
// Fetch product data and loop through each row to display it
$query = "SELECT * FROM tbl_table ORDER BY id ASC";
$result = $db->select($query);
if ($result) {
while ($tableresult = $result->fetch_assoc()) {
// echo '<pre>';
// print_r( $result );
// echo '</pre>';
?>
<tr>
<td><?php echo ucwords($tableresult['tableName']); ?></td>
<td><?php echo $tableresult['tableCapacity']; ?></td>
<td><?php echo $tableresult['qrText']; ?></td>
<td><img src="<?php echo $tableresult['qrImg']; ?>" alt="" width="80px" height="80px"></td>
<td>Active</td>
<td>
<a href="itemedit.php?itemID=1" class="action-button edit-button"><i class="fas fa-edit"></i></a>
<a href="itemdelete.php?itemID=1" class="action-button delete-button"><i class="fas fa-trash-alt"></i></a>
</td>
</tr>
<?}}?>
</tbody>
</table>
</div>
</div>
</div>