diff options
author | arf20 <aruizfernandez05@gmail.com> | 2024-03-19 05:03:32 +0100 |
---|---|---|
committer | arf20 <aruizfernandez05@gmail.com> | 2024-03-19 05:03:32 +0100 |
commit | 04f53e2d62a402661dcc2ef4aa635c352c0a134d (patch) | |
tree | b8f430989482800903ec919834329e9eb5c8eaa4 | |
parent | c509a2d6aa9394fa7200d8fa11904914d8e81f06 (diff) | |
download | arfnet2-cstims-04f53e2d62a402661dcc2ef4aa635c352c0a134d.tar.gz arfnet2-cstims-04f53e2d62a402661dcc2ef4aa635c352c0a134d.zip |
Index, and client comments
-rw-r--r-- | client.php | 6 | ||||
-rw-r--r-- | index.php | 19 |
2 files changed, 21 insertions, 4 deletions
@@ -14,7 +14,7 @@ $type = $_SESSION["type"]; require_once "config.php"; // Get orders -$sql = "SELECT id, service, name, billing FROM orders WHERE client = ?"; +$sql = "SELECT id, service, name, billing, comments FROM orders WHERE client = ?"; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_bind_param($stmt, "s", $param_client); $param_client = $clientid; @@ -61,10 +61,10 @@ function getservicebyid($id) { <div class="col5"> <h3>Active services</h3> <table> - <tr><th>service</th><th>instance</th><th>billing</th></tr> + <tr><th>service</th><th>instance</th><th>billing</th><th>comments</th></tr> <?php foreach ($orders as $order) { - echo "<tr><td>".getservicebyid($order["service"])["name"]."</td><td>".$order["name"]."</td><td>".$order["billing"]."</tr>\n"; + echo "<tr><td>".getservicebyid($order["service"])["name"]."</td><td>".$order["name"]."</td><td>".$order["billing"]."</td><td><pre>".$order["comments"]."</pre></td></tr>\n"; } ?> </table> @@ -1,3 +1,13 @@ +<?php +require_once "config.php"; +// Get services +$sql = "SELECT id, name, type, billing FROM services"; +$stmt = mysqli_prepare($link, $sql); +mysqli_stmt_execute($stmt); +$result = mysqli_stmt_get_result($stmt); +$services = $result->fetch_all(MYSQLI_ASSOC); +?> + <!doctype html> <html> <head> @@ -22,7 +32,14 @@ </div> <div class="col5"> <h3>Services and plans</h3> - <!-- TODO PHP list of services --> + <table> + <tr><th>name</th><th>type</th><th>billing</th></tr> + <?php + foreach ($services as $service) { + echo "<tr><td>".$service["name"]."</td><td>".$service["type"]."</td><td>".$service["billing"]."</tr>\n"; + } + ?> + </table> </div> </div> </div> |