From b7cb91d4cadc2de4b816c727ac6dde49eb66845e Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Tue, 7 Apr 2020 15:36:09 -0600 Subject: [PATCH] Don't make gutters and stuff when embedded --- public/index.php | 395 ++++++++++++++++++++++++----------------------- 1 file changed, 202 insertions(+), 193 deletions(-) diff --git a/public/index.php b/public/index.php index 8a78544..2333e08 100644 --- a/public/index.php +++ b/public/index.php @@ -32,229 +32,238 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_ } ?> -
-
-
- -
-

-
- get("Machine Info"); ?> + +
+
+
+ +
+
+ + +
+

+
+ get("Machine Info"); ?> +
+

+
+ +

No machine with ID could be found.

+ +

+ Enter a Netsyms machine ID number or serial number. +

+
+ + +
+
-

-
-

No machine with ID could be found.

- -

- Enter a Netsyms machine ID number or serial number. -

-
- - -
-
-
- -
-

-
- get("Machine Info"); ?> -
-

-
-
-
-
-
- get("ID"); ?>: getID()); ?> -
- getOS())) { ?> -
- get("OS/Software"); ?>: getOS()); ?> -
- - getSerial())) { ?> -
- get("Serial"); ?>: getSerial()); ?> -
- - getManufacturer())) { ?> -
- get("Manufacturer"); ?>: getManufacturer()); ?> -
- - getModel())) { ?> -
- get("Model"); ?>: getModel()); ?> -
- - getCondition() > 0) { - ?> -
- get("Condition"); ?>: getCondition(); - $filled = floor($val); - $empty = 10; - while ($filled > 0) { - $filled--; - $empty--; - echo " "; +
+

+
+ get("Machine Info"); ?> +
+

+
+
+
+
+
+ get("ID"); ?>: getID()); ?> +
+ getOS())) { ?> +
+ get("OS/Software"); ?>: getOS()); ?> +
+ + getSerial())) { ?> +
+ get("Serial"); ?>: getSerial()); ?> +
+ + getManufacturer())) { ?> +
+ get("Manufacturer"); ?>: getManufacturer()); ?> +
+ + getModel())) { ?> +
+ get("Model"); ?>: getModel()); ?> +
+ + getCondition() > 0) { + ?> +
+ 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)"; + ?> +
+ 0.75) { - $empty--; - echo " "; - } else if ($val - floor($val) > 0.25) { - $empty--; - echo " "; + ?> + getPrice() > 0) { + ?> +
+ get("Price"); ?>: $getPrice(), 2); ?> +
+ 0) { - $empty--; - echo " "; + ?> + getPublicNotes())) { + ?> +
+ get("Notes"); ?>: getPublicNotes()); ?> +
+
- - getPrice() > 0) { - ?> -
- get("Price"); ?>: $getPrice(), 2); ?> -
- - getPublicNotes())) { - ?> -
- get("Notes"); ?>: getPublicNotes()); ?> -
- -
-
- - getComponents(); +
- if (count($components) > 0) { - ?> -
-
Components:
-
- -
+ getComponents(); - getTypeName(); ?>
+ if (count($components) > 0) { + ?> +
+
Components:
+
getModel())) { + foreach ($components as $c) { ?> - get("Model"); ?>: getModel()); ?>
- - if (!empty($c->getCapacity())) { - ?> - get("Capacity"); ?>: getCapacity()); ?>
- getTypeName(); ?>
+ getModel())) { + ?> + get("Model"); ?>: getModel()); ?>
+ getSerial())) { - ?> - get("Serial"); ?>: getSerial()); ?>
- getCapacity())) { + ?> + get("Capacity"); ?>: getCapacity()); ?>
+ getTestedDate())) { - ?> - get("Tested On"); ?>: getTestedDate())); ?>
- getSerial())) { + ?> + get("Serial"); ?>: getSerial()); ?>
+ getPrice())) { - ?> - get("Price"); ?>: $getPrice(), 2); ?> - getTestedDate())) { + ?> + get("Tested On"); ?>: getTestedDate())); ?>
+ getPublicNotes())) { - ?> -
- Notes:
-
getPublicNotes()); ?>
+ if (!empty($c->getPrice())) { + ?> + get("Price"); ?>: $getPrice(), 2); ?> + getPublicNotes())) { + ?> +
+ Notes:
+
getPublicNotes()); ?>
+
+
- -
-
- + getEvents(); + $history = $machine->getEvents(); - if (count($history) > 0) { - ?> -
-
Events:
-
- \n"; - echo "$h[eventname] on " . date($SETTINGS["datetime_format"], strtotime($h['date'])) . "
\n"; - if (!empty($h['publicnotes'])) { - echo "
Notes:
" . htmlspecialchars($h['publicnotes']) . "
"; - } - echo "\n
\n"; - } + if (count($history) > 0) { ?> -
+
+
Events:
+
+ \n"; + echo "$h[eventname] on " . date($SETTINGS["datetime_format"], strtotime($h['date'])) . "
\n"; + if (!empty($h['publicnotes'])) { + echo "
Notes:
" . htmlspecialchars($h['publicnotes']) . "
"; + } + echo "\n
\n"; + } + ?> +
+
+
- +
+ +
+

+ Look up another machine: +

+
+ + +
+
+
+ +
- -
-

- Look up another machine: -

-
- - -
-
-
- -
+
+
-
+