From c06d2f7951d34edcdbe98578206139618afd61aa Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 16 May 2020 15:25:04 -0600 Subject: [PATCH] Add client name column --- langs/en/machines.json | 3 ++- pages/machines.php | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/langs/en/machines.json b/langs/en/machines.json index 98dc9f2..ba7ff05 100644 --- a/langs/en/machines.json +++ b/langs/en/machines.json @@ -13,5 +13,6 @@ "Machine": "Machine", "Tested On": "Tested On", "Capacity": "Capacity", - "Last Event": "Last Event" + "Last Event": "Last Event", + "Client": "Client" } diff --git a/pages/machines.php b/pages/machines.php index fb4e193..a0a9b29 100644 --- a/pages/machines.php +++ b/pages/machines.php @@ -24,6 +24,8 @@ WHERE date=(SELECT MAX(s2.date) WHERE machines.machineid = s2.machineid ) OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid)")->fetchAll(); + +$clients = Clients::getAll(); ?>
@@ -37,10 +39,11 @@ OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid) get('Actions'); ?> get('ID'); ?> + get('Client'); ?> get('OS/Software'); ?> get('Model'); ?> get('Last Event'); ?> - get('Serial'); ?> + get('Serial'); ?> @@ -61,6 +64,14 @@ OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid) get("View"); ?> + getID() == $m['clientid']) { + echo $c->getName(); + break; + } + } + ?> @@ -75,10 +86,11 @@ OR NOT EXISTS (SELECT * FROM events WHERE events.machineid = machines.machineid) get('Actions'); ?> get('ID'); ?> + get('Client'); ?> get('OS/Software'); ?> get('Model'); ?> get('Last Event'); ?> - get('Serial'); ?> + get('Serial'); ?> \ No newline at end of file