diff options
author | arf20 <aruizfernandez05@gmail.com> | 2024-03-18 17:55:48 +0100 |
---|---|---|
committer | arf20 <aruizfernandez05@gmail.com> | 2024-03-18 17:55:48 +0100 |
commit | 4c4b8df824dcd2fd3ac4b8d486181ec87a0f13cd (patch) | |
tree | 3748190bf03444a6fa39624fbe75df462f7fddcd /admin.php | |
parent | 6bf04fb78dddeef3d95a4dfd7de75546055e04b0 (diff) | |
download | arfnet2-cstims-4c4b8df824dcd2fd3ac4b8d486181ec87a0f13cd.tar.gz arfnet2-cstims-4c4b8df824dcd2fd3ac4b8d486181ec87a0f13cd.zip |
Add manageorders, fix services edit
Diffstat (limited to 'admin.php')
-rw-r--r-- | admin.php | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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> |