aboutsummaryrefslogtreecommitdiff
path: root/admin.php
diff options
context:
space:
mode:
authorarf20 <aruizfernandez05@gmail.com>2024-03-18 17:55:48 +0100
committerarf20 <aruizfernandez05@gmail.com>2024-03-18 17:55:48 +0100
commit4c4b8df824dcd2fd3ac4b8d486181ec87a0f13cd (patch)
tree3748190bf03444a6fa39624fbe75df462f7fddcd /admin.php
parent6bf04fb78dddeef3d95a4dfd7de75546055e04b0 (diff)
downloadarfnet2-cstims-4c4b8df824dcd2fd3ac4b8d486181ec87a0f13cd.tar.gz
arfnet2-cstims-4c4b8df824dcd2fd3ac4b8d486181ec87a0f13cd.zip
Add manageorders, fix services edit
Diffstat (limited to 'admin.php')
-rw-r--r--admin.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/admin.php b/admin.php
index 24bd448..37a69f6 100644
--- a/admin.php
+++ b/admin.php
@@ -26,6 +26,13 @@ mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
$services = $result->fetch_all(MYSQLI_ASSOC);
+// Get services
+$sql = "SELECT id, service, name, client FROM orders";
+$stmt = mysqli_prepare($link, $sql);
+mysqli_stmt_execute($stmt);
+$result = mysqli_stmt_get_result($stmt);
+$orders = $result->fetch_all(MYSQLI_ASSOC);
+
?>
<!doctype html>
@@ -70,7 +77,14 @@ $services = $result->fetch_all(MYSQLI_ASSOC);
</div>
<div class="col2">
<h3>Orders</h3>
- <!-- TODO PHP list of services -->
+ <table>
+ <tr><th>service</th><th>instance</th><th>client</th></tr>
+ <?php
+ foreach ($orders as $order) {
+ echo "<tr><td>".$order['service']."</td><td>".$order['name']."</td><td>".$order['client']."</tr>\n";
+ }
+ ?>
+ </table>
</div>
<div class="col2">
<h3>Tickets</h3>