diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-08 12:04:30 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-08 12:04:30 +0200 |
commit | 95112b1eb06a4be531ded59563d53a63a8d614e8 (patch) | |
tree | fd3dc676227309c87a39feab9ca458985e327907 /admin/panes/home.php | |
parent | 87303b0d3540037fb94efdde24dbaacb2880d6cb (diff) | |
download | main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.gz main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.bz2 main-95112b1eb06a4be531ded59563d53a63a8d614e8.zip |
Opening!
Diffstat (limited to 'admin/panes/home.php')
-rw-r--r-- | admin/panes/home.php | 267 |
1 files changed, 132 insertions, 135 deletions
diff --git a/admin/panes/home.php b/admin/panes/home.php index ac106e4..fade996 100644 --- a/admin/panes/home.php +++ b/admin/panes/home.php @@ -1,136 +1,133 @@ -<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php";/** @var array $_DATA */ ?> - -<style> - ::-webkit-scrollbar { - width: 5px; - } - - ::-webkit-scrollbar-track { - border-radius: 9999px; - background: transparent; - } - - ::-webkit-scrollbar-thumb { - border-radius: 9999px; - background-color: rgba(136, 136, 136, 0.5); - transition: background 200ms; - } - - ::-webkit-scrollbar-thumb:hover { - background-color: rgba(85, 85, 85, 0.75); - } - - ::-webkit-scrollbar-thumb:active { - background-color: #222; - } - - .list-group-item { - background: #34373c; - } -</style> - -<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;"> - <h2 style="text-align:center;">Welcome back <?= $_DATA["name"] ?>!</h2> - <ul class="list-group" style="margin-top:30px;"> - <li class="list-group-item"> - <span id="temperature">Server running at <b><?php - - exec("sensors -j", $out); - $outp = implode("\n", $out); - $outd = json_decode($outp, true); - - echo(round($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"], 1)); - - ?>°C</b>, <?php - - if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 90) { - echo("completely overheating!"); - } else if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 60) { - echo("starting to throttle!"); - } else { - echo("under normal temperatures"); - } - - ?></span> <a href="#" onclick="window.parent.activity('activity-version', '/admin/panes/version.php', window.parent.document.getElementById('activity-version'));" style="float:right;">Manage...</a></li><li class="list-group-item"><b><?php - - $uca = scandir("/mnt/blogchain/_posts"); - $uct = []; - - foreach ($uca as $art) { - if (is_file("/mnt/blogchain/_posts/" . $art) && substr($art, 0, 1) !== "." && substr($art, 0, 1) !== "_") { - $uct[] = $art; - } - } - - echo(count($uct)); - - ?></b> UnchainedTech article·s, <?php - - $uca = scandir("/mnt/blogchain/_posts/_drafts"); - $uct2 = []; - - foreach ($uca as $art) { - if (is_file("/mnt/blogchain/_posts/_drafts/" . $art) && substr($art, 0, 1) !== "." && substr($art, 0, 1) !== "_") { - $uct2[] = $art; - } - } - - echo(count($uct2)); - - ?> draft·s <a onclick="window.parent.activity('activity-unchained', '/admin/panes/unchained.php', window.parent.document.getElementById('activity-unchained'));" href="#" style="float:right;">Manage...</a></li> - <li class="list-group-item"><b><?php - - $uca = scandir("/mnt/minteckrolt-cloud"); - $uct3 = []; - - foreach ($uca as $art) { - if (is_dir("/mnt/minteckrolt-cloud/" . $art) && substr($art, 0, 1) === "~") { - $uct3[] = $art; - } - } - - echo(count($uct3)); - - ?></b> Neutron Cloud website·s <a onclick="window.parent.activity('activity-quotas', '/admin/panes/quotas.php', window.parent.document.getElementById('activity-quotas'));" href="#" style="float:right;">Manage...</a></li> - <li class="list-group-item"><b><?php - - $uca = scandir("/mnt/kartik/online/private/stats"); - $uct4 = []; - - foreach ($uca as $art) { - if (is_file("/mnt/kartik/online/private/stats/" . $art)) { - $uct4[] = $art; - } - } - - echo(count($uct4)); - - ?></b> Kartik Online player·s <a onclick="window.parent.activity('activity-kartik', '/admin/panes/kartik.php', window.parent.document.getElementById('activity-kartik'));" href="#" style="float:right;">Manage...</a></li> - <li class="list-group-item"><b><?php - - $uca = scandir("/mnt/minteckrolt-main/includes/blog/data"); - $uct5 = []; - - foreach ($uca as $art) { - if (is_dir("/mnt/minteckrolt-main/includes/blog/data/" . $art)) { - $uct4[] = $art; - } - } - - echo(count($uct4)); - - ?></b> blog article·s <a onclick="window.parent.activity('activity-blog', '/admin/panes/blog.php', window.parent.document.getElementById('activity-blog'));" href="#" style="float:right;">Manage...</a></li> - </ul> - <!--suppress JSUnresolvedVariable, JSUnresolvedFunction --> - <script> - setInterval(() => { - $.ajax("/admin/api/serverTemp.php", { - success: (data) => { - document.getElementById("temperature").innerHTML = data; - } - }); - }, 500) - </script> -</div> - +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php";/** @var array $_DATA */ ?>
+
+<style>
+ ::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ ::-webkit-scrollbar-track {
+ border-radius: 9999px;
+ background: transparent;
+ }
+
+ ::-webkit-scrollbar-thumb {
+ border-radius: 9999px;
+ background-color: rgba(136, 136, 136, 0.5);
+ transition: background 200ms;
+ }
+
+ ::-webkit-scrollbar-thumb:hover {
+ background-color: rgba(85, 85, 85, 0.75);
+ }
+
+ ::-webkit-scrollbar-thumb:active {
+ background-color: #222;
+ }
+
+ .list-group-item {
+ background: #34373c;
+ }
+</style>
+
+<div class="container" style="color:white;padding-top:15vh;padding-bottom:15vh;">
+ <h2 style="text-align:center;">Welcome back <?= $_DATA["name"] ?>!</h2>
+ <ul class="list-group" style="margin-top:30px;">
+ <li class="list-group-item">
+ <span id="temperature">Server running at <b><?php
+
+ exec("sensors -j", $out);
+ $outp = implode("\n", $out);
+ $outd = json_decode($outp, true);
+
+ echo(round($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"], 1));
+
+ ?>°C</b>, <?php
+
+ if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 90) {
+ echo("completely overheating!");
+ } else if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 60) {
+ echo("starting to throttle!");
+ } else {
+ echo("under normal temperatures");
+ }
+
+ ?></span> <a href="#" onclick="window.parent.activity('activity-version', '/admin/panes/version.php', window.parent.document.getElementById('activity-version'));" style="float:right;">Manage...</a></li><li class="list-group-item"><b><?php
+
+ $uca = scandir("/mnt/blogchain/_posts");
+ $uct = [];
+
+ foreach ($uca as $art) {
+ if (is_file("/mnt/blogchain/_posts/" . $art) && substr($art, 0, 1) !== "." && substr($art, 0, 1) !== "_") {
+ $uct[] = $art;
+ }
+ }
+
+ echo(count($uct));
+
+ ?></b> UnchainedTech article·s, <?php
+
+ $uca = scandir("/mnt/blogchain/_posts/_drafts");
+ $uct2 = [];
+
+ foreach ($uca as $art) {
+ if (is_file("/mnt/blogchain/_posts/_drafts/" . $art) && substr($art, 0, 1) !== "." && substr($art, 0, 1) !== "_") {
+ $uct2[] = $art;
+ }
+ }
+
+ echo(count($uct2));
+
+ ?> draft·s <a onclick="window.parent.activity('activity-unchained', '/admin/panes/unchained.php', window.parent.document.getElementById('activity-unchained'));" href="#" style="float:right;">Manage...</a></li>
+ <li class="list-group-item"><b><?php
+
+ $uca = scandir("/mnt/minteckrolt-cloud");
+ $uct3 = [];
+
+ foreach ($uca as $art) {
+ if (is_dir("/mnt/minteckrolt-cloud/" . $art) && substr($art, 0, 1) === "~") {
+ $uct3[] = $art;
+ }
+ }
+
+ echo(count($uct3));
+
+ ?></b> Neutron Cloud website·s <a onclick="window.parent.activity('activity-quotas', '/admin/panes/quotas.php', window.parent.document.getElementById('activity-quotas'));" href="#" style="float:right;">Manage...</a></li>
+ <li class="list-group-item"><b><?php
+
+ $uca = scandir("/mnt/kartik/online/private/stats");
+ $uct4 = [];
+
+ foreach ($uca as $art) {
+ if (is_file("/mnt/kartik/online/private/stats/" . $art)) {
+ $uct4[] = $art;
+ }
+ }
+
+ echo(count($uct4));
+
+ ?></b> Kartik Online player·s <a onclick="window.parent.activity('activity-kartik', '/admin/panes/kartik.php', window.parent.document.getElementById('activity-kartik'));" href="#" style="float:right;">Manage...</a></li>
+ <li class="list-group-item">Using <b><?php
+
+ exec("df -h -x tmpfs -x squashfs -x devtmpfs --total -P", $outdisk);
+ $outn = explode(" ", preg_replace('/\s+/', ' ', $outdisk[count($outdisk) - 1]));
+ echo($outn[2] . "/" . $outn[1]);
+
+ ?></b> on all disks, <b><?php
+
+ echo($outn[3]);
+
+ ?></b> free <a onclick="window.parent.activity('activity-disk', '/admin/panes/disk.php', window.parent.document.getElementById('activity-disk'));" href="#" style="float:right;">Manage...</a></li>
+ </ul>
+ <!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
+ <script>
+ setInterval(() => {
+ $.ajax("/admin/api/serverTemp.php", {
+ success: (data) => {
+ document.getElementById("temperature").innerHTML = data;
+ }
+ });
+ }, 500)
+ </script>
+</div>
+
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?>
\ No newline at end of file |