-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorderscherm.php
85 lines (75 loc) · 1.73 KB
/
orderscherm.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
$db = new SQLite3("dbMacMedia.db");
$db->busyTimeout(5000);
?>
<!DOCTYPE html>
<html>
<head>
<title>MacMedia Orders</title>
<link rel="stylesheet" href="./orderscherm.css">
<script src="./cash_register.js" defer async></script>
<link rel="shortcut icon" href="./logo.png" type="image/x-icon">
<style>
body {
margin: 0;
padding: 0;
display: flex;
font-family: Phantomsans;
font-size: 18px;
color: black;
background-color: white;
}
table {
border-collapse: collapse;
font-family: Arial, sans-serif;
width: 50%;
margin-bottom: 20px;
}
th,
td {
padding: 16px;
text-align: left;
text-align: center;
border: 1px solid darkblue;
}
th {
background-color: cyan;
}
</style>
</head>
<body>
<table class="half-width">
<thead>
<th>Bezig</th>
</thead>
<tbody>
<?php
$query = "SELECT * FROM orders WHERE status = 'bezig'";
$result = $db->query($query);
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
$orderid = $row['id']; ?>
<tr>
<td><?= $orderid ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<table class="half-width">
<thead>
<th>Klaar</th>
</thead>
<tbody>
<?php
$query = "SELECT * FROM orders WHERE status = 'klaar'";
$result = $db->query($query);
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
$orderid = $row['id']; ?>
<tr>
<td><?= $orderid ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</body>
<script src="./refresh.js"></script>
</html>