diff options
author | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-08-01 22:28:15 +0200 |
---|---|---|
committer | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-08-01 22:28:15 +0200 |
commit | 9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2 (patch) | |
tree | 22d9b851864f9370282f21d10113afd5d565e4cf /admin/panes/home.php | |
parent | b028da9fea70c65ccd52d1d478859739027d756a (diff) | |
download | main-9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2.tar.gz main-9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2.tar.bz2 main-9852b6cd074cceec0d0b549bb6c9bd7fe50c86f2.zip |
Update
Diffstat (limited to 'admin/panes/home.php')
-rw-r--r-- | admin/panes/home.php | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/admin/panes/home.php b/admin/panes/home.php new file mode 100644 index 0000000..ac106e4 --- /dev/null +++ b/admin/panes/home.php @@ -0,0 +1,136 @@ +<?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/footer.php"; ?>
\ No newline at end of file |