diff options
author | RaindropsSys <contact@minteck.org> | 2023-03-27 22:22:53 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-03-27 22:22:53 +0200 |
commit | e98e95d89939cdc1252d02df04ae8d91c6aa8c92 (patch) | |
tree | a5d5535f8058f1a7b45a31a1caf36ab7e24ff19d /pages/computers.inc | |
parent | 6ab243c12f2514cd0f40e80504223664755a6da4 (diff) | |
download | pluralconnect-e98e95d89939cdc1252d02df04ae8d91c6aa8c92.tar.gz pluralconnect-e98e95d89939cdc1252d02df04ae8d91c6aa8c92.tar.bz2 pluralconnect-e98e95d89939cdc1252d02df04ae8d91c6aa8c92.zip |
Updated 9 files, added 9 files, deleted 3 files and renamed includes/refresh/logo.inc (automated)
Diffstat (limited to 'pages/computers.inc')
-rw-r--r-- | pages/computers.inc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pages/computers.inc b/pages/computers.inc index 67cb6ef..cc2c396 100644 --- a/pages/computers.inc +++ b/pages/computers.inc @@ -158,7 +158,7 @@ if (str_ends_with($computer["os"], "unknown")) { <?php if (timeAgo($computer["date"]) === "now"): ?> <td>Online</td> <?php else: ?> - <td>Offline since <?= timeAgo($computer["date"]) ?>: <?= date('j M, g:ia (T)', strtotime($computer["date"])) ?></td> + <td>Last seen <?= timeAgo($computer["date"]) ?>: <?= date('j M, g:ia (T)', strtotime($computer["date"])) ?></td> <?php endif; ?> </tr> </tbody> @@ -192,11 +192,11 @@ if (str_ends_with($computer["os"], "unknown")) { </tr> <tr> <td style="padding-right: 10px; text-align: right;"><b>Level 2 cache:</b></td> - <td><?= isset($computer["cpu"]["cache"]["l2"]) ? round($computer["cpu"]["cache"]["l2"] / 1024**2, 2) . " MiB" : "Not supported" ?></td> + <td><?= isset($computer["cpu"]["cache"]["l2"]) && is_numeric($computer["cpu"]["cache"]["l2"]) ? round($computer["cpu"]["cache"]["l2"] / 1024**2, 2) . " MiB" : "Not supported" ?></td> </tr> <tr> <td style="padding-right: 10px; text-align: right;"><b>Level 3 cache:</b></td> - <td><?= isset($computer["cpu"]["cache"]["l3"]) ? round($computer["cpu"]["cache"]["l3"] / 1024**2, 2) . " MiB" : "Not supported" ?></td> + <td><?= isset($computer["cpu"]["cache"]["l3"]) && is_numeric($computer["cpu"]["cache"]["l3"]) ? round($computer["cpu"]["cache"]["l3"] / 1024**2, 2) . " MiB" : "Not supported" ?></td> </tr> <?php endif; ?> <?php if (isset($computer["gpu"])): ?> @@ -214,7 +214,7 @@ if (str_ends_with($computer["os"], "unknown")) { <td> <?php $index = 0; foreach ($computer["gpu"]["displays"] as $display): ?> <?= $display["connection"] ?> <?= $display["vendor"] ?> <?= $display["model"] ?> (<?= $display["currentResX"] ?>x<?= $display["currentResY"] ?><?= $display["currentResX"] !== $display["resolutionX"] ? ", native " . $display["resolutionX"] . "x" . $display["resolutionY"] : "" ?>, <?= $display["currentRefreshRate"] ?> Hz) - <?= $index < count($computer["gpu"]["controllers"]) - 1 ? "<br>" : "" ?> + <?= $index < count($computer["gpu"]["displays"]) - 1 ? "<br>" : "" ?> <?php $index++; endforeach; ?> </td> </tr> @@ -902,9 +902,10 @@ if (str_ends_with($computer["os"], "unknown")) { </div> <div style="display: flex; align-items: center;"> <div> - <b><?= $computer["host"] ?></b> · <?= $computer["os"] ?><br> + <b><?= $computer["host"] ?></b><br> + <?= $computer["os"] ?><br> Computer · Owned by <?= $owner === "raindrops" ? "Raindrops System" : "Cloudburst System"; ?><br> - <?php if (timeAgo($computer["date"]) === "now"): ?>Online<?php else: ?>Offline since <?= timeAgo($computer["date"]) ?><?php endif; ?> + <?php if (timeAgo($computer["date"]) === "now"): ?>Online<?php else: ?>Last seen <?= timeAgo($computer["date"]) ?><?php endif; ?> </div> </div> </a> |