From 1879a80151a4e1c731269d00d3704d111e176183 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 27 Jun 2020 16:23:33 -0600 Subject: [PATCH] Show client info on view page, don't show info items that are blank --- pages/viewmachine.php | 113 ++++++++++++++++++++++++++++-------------- 1 file changed, 75 insertions(+), 38 deletions(-) diff --git a/pages/viewmachine.php b/pages/viewmachine.php index f99600e..07daea4 100644 --- a/pages/viewmachine.php +++ b/pages/viewmachine.php @@ -44,45 +44,82 @@ $machine = new Machine($machineid);
Device Info:
-
- get("OS/Software"); ?>: getOS()); ?> -
-
- get("Serial"); ?>: getSerial()); ?> -
-
- get("Manufacturer"); ?>: getManufacturer()); ?> -
-
- get("Model"); ?>: getModel()); ?> -
-
- get("Condition"); ?>: getCondition(); - $filled = floor($val); - $empty = 10; - while ($filled > 0) { - $filled--; - $empty--; - echo " "; - } - if ($val - floor($val) > 0.75) { - $empty--; - echo " "; - } else if ($val - floor($val) > 0.25) { - $empty--; - echo " "; - } - while ($empty > 0) { - $empty--; - echo " "; - } - echo " ($val/10)"; + getClientID())) { + $client = Clients::getClient($machine->getClientID()); ?> -
-
- get("Price"); ?>: $getPrice(), 2); ?> -
+
+ get("Client"); ?>: getName()); ?> +
+
+ getPhone())) { ?> + Phone: getPhone(); ?> +
+ + getBillingAddress())) { ?> + Billing address:
", htmlspecialchars($client->getBillingAddress())); ?> +
+ + getMailingAddress())) { ?> + Mailing address:
", htmlspecialchars($client->getMailingAddress())); ?> + +
+
+
+ + getOS())) { ?> +
+ get("OS/Software"); ?>: getOS()); ?> +
+ + getSerial())) { ?> +
+ get("Serial"); ?>: getSerial()); ?> +
+ + getManufacturer())) { ?> +
+ get("Manufacturer"); ?>: getManufacturer()); ?> +
+ + getModel())) { ?> +
+ get("Model"); ?>: getModel()); ?> +
+ + getCondition())) { ?> +
+ get("Condition"); ?>: getCondition(); + $filled = floor($val); + $empty = 10; + while ($filled > 0) { + $filled--; + $empty--; + echo " "; + } + if ($val - floor($val) > 0.75) { + $empty--; + echo " "; + } else if ($val - floor($val) > 0.25) { + $empty--; + echo " "; + } + while ($empty > 0) { + $empty--; + echo " "; + } + echo " ($val/10)"; + ?> +
+ + getPrice())) { ?> +
+ get("Price"); ?>: $getPrice(), 2); ?> +
+ getPrivateNotes())) { ?>