From 0cb2a90f5422ca5c2f04ecf986a555c758afae61 Mon Sep 17 00:00:00 2001 From: arf20 Date: Mon, 18 Mar 2024 19:47:44 +0100 Subject: Client sees orders, order status --- manageorders.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'manageorders.php') diff --git a/manageorders.php b/manageorders.php index c91a5b7..6f25959 100644 --- a/manageorders.php +++ b/manageorders.php @@ -31,7 +31,7 @@ $result = mysqli_stmt_get_result($stmt); $services = $result->fetch_all(MYSQLI_ASSOC); // Get orders -$sql = "SELECT id, service, name, client, date, billing, comments FROM orders"; +$sql = "SELECT id, service, name, client, date, billing, status, comments FROM orders"; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); @@ -69,11 +69,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { // edit entry if (isset($_POST["save"])) { - $sql = "UPDATE orders SET name = ?, billing = ?, comments = ? WHERE id = ?"; + $sql = "UPDATE orders SET name = ?, billing = ?, status = ?, comments = ? WHERE id = ?"; $stmt = mysqli_prepare($link, $sql); - mysqli_stmt_bind_param($stmt, "ssss", $param_name, $param_billing, $param_comments, $param_id); + mysqli_stmt_bind_param($stmt, "sssss", $param_name, $param_billing, $param_status, $param_comments, $param_id); $param_name = $_POST["name"]; $param_billing = $_POST["billing"]; + $param_status = $_POST["status"]; $param_comments = $_POST["comments"]; $param_id = $_POST["id"]; @@ -134,9 +135,15 @@ function getclientbyid($id) { ".$client["username"].""; + foreach ($services as $service) + $service_options .= "";*/ echo "

Edit order ".$order["id"]."

\n" ."

\n" ."

\n" + ."

\n" ."

\n" ."" ."
cancel" @@ -154,6 +161,7 @@ function getclientbyid($id) { ."

\n" ."

\n" ."

\n" + ."

\n" ."

\n" ."
cancel" ."
"; @@ -162,7 +170,7 @@ function getclientbyid($id) { add - + " @@ -171,6 +179,7 @@ function getclientbyid($id) { ."" ."" ."" + ."" ."" ."\n"; } -- cgit v1.2.3
idserviceinstanceclientbillingdatecommentsaction
idserviceinstanceclientbillingdatestatuscommentsaction
".$order["id"]."".getclientbyid($order["client"])["username"]."".$order["billing"]."".$order["date"]."".$order["status"]."
".$order["comments"]."
del edit