|
|
|
@ -23,7 +23,7 @@ require_once __DIR__ . "/../lib/required_public.php";
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-12 col-md-8">
|
|
|
|
|
<?php
|
|
|
|
|
if (empty($_GET["id"]) || !Machine::exists($_GET["id"])) {
|
|
|
|
|
if (empty($_GET["id"]) || (!Machine::exists($_GET["id"]) && !Machine::serialExists($_GET["id"]))) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="card">
|
|
|
|
|
<h3 class="card-header d-flex">
|
|
|
|
@ -33,7 +33,7 @@ require_once __DIR__ . "/../lib/required_public.php";
|
|
|
|
|
</h3>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<?php
|
|
|
|
|
if (!empty($_GET["id"]) && !Machine::exists($_GET["id"])) {
|
|
|
|
|
if (!empty($_GET["id"])) {
|
|
|
|
|
?>
|
|
|
|
|
<p class="text-danger">No machine with ID <code><?php echo htmlspecialchars($_GET['id']); ?></code> could be found.</p>
|
|
|
|
|
<?php
|
|
|
|
@ -50,7 +50,11 @@ require_once __DIR__ . "/../lib/required_public.php";
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
} else {
|
|
|
|
|
if (Machine::exists($_GET["id"])) {
|
|
|
|
|
$machine = new Machine($_GET['id']);
|
|
|
|
|
} else {
|
|
|
|
|
$machine = new Machine(Machine::getIDFromSerial($_GET['id']));
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
<div class="card">
|
|
|
|
|
<h3 class="card-header d-flex">
|
|
|
|
|