diff --git a/database.mwb b/database.mwb index f890662..ad2575a 100644 Binary files a/database.mwb and b/database.mwb differ diff --git a/machine.php b/machine.php index bb84b7d..2f14c5d 100644 --- a/machine.php +++ b/machine.php @@ -11,7 +11,7 @@ class Machine { global $database; if ($database->has('machines', ['machineid' => $machineid])) { $this->machineid = $machineid; - $this->machine = $database->get('machines', ['machineid', 'notes', 'model', 'condition', 'price', 'os'], ['machineid' => $machineid]); + $this->machine = $database->get('machines', ['machineid', 'notes', 'model', 'condition', 'price', 'os', 'serial', 'manufacturer'], ['machineid' => $machineid]); $this->history = $database->select('history', ['[>]event_types' => 'eventid'], ['historyid', 'date', 'eventname', 'notes'], ['machineid' => $machineid]); $this->components = $database->select('components', ['[>]component_types' => 'typeid'], ['compid', 'serial', 'typename', 'tested', 'notes', 'capacity', 'model'], ['machineid' => $machineid]); } else { @@ -38,6 +38,12 @@ class Machine { if (!empty($this->machine['os'])) { $info['os'] = $this->machine['os']; } + if (!empty($this->machine['serial'])) { + $info['serial'] = $this->machine['serial']; + } + if (!empty($this->machine['manufacturer'])) { + $info['manufacturer'] = $this->machine['manufacturer']; + } $info['notes'] = $this->machine['notes']; return $info; } diff --git a/routes/info.php b/routes/info.php index 0623935..3e3b04b 100644 --- a/routes/info.php +++ b/routes/info.php @@ -59,6 +59,12 @@ case "os": $echo = "Operating System: " . htmlspecialchars($val); break; + case "serial": + $echo = "Serial: " . htmlspecialchars($val); + break; + case "manufacturer": + $echo = "OEM: " . htmlspecialchars($val); + break; case "notes": $echo = "
" . htmlspecialchars($val) . "
"; break;