diff options
Diffstat (limited to 'admin/index.php')
-rw-r--r-- | admin/index.php | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..edfa596 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,181 @@ +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php"; ?> + +<!--suppress CssFloatPxLength --> +<style> + .section { + color: gray; + font-variant: all-petite-caps; + font-size: 18px; + margin: 20px 20px 5px; + padding: 5px 7.5px 0 7.5px; + border-top: 1px solid rgba(128, 128, 128, 0.25); + } + + .item { + cursor: pointer; + margin: 0 20px; + border-radius: 5px; + padding: 2.5px 7.5px; + color: lightgray; + } + + .item:hover { + background: rgba(255, 255, 255, .1); + color: #c2c2c2; + } + + .item:active, .item:focus, .item.selected { + color: #e7e7e7 !important; + background: rgba(255, 255, 255, .2) !important; + cursor: default; + } + + ::-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; + } + + .credits { + margin: 15px 20px 0 20px; + border-radius: 5px; + padding: 2.5px 7.5px; + color: lightgray; + opacity: .25; + font-size: 12px; + } + + .reloadbtn { + vertical-align: middle; + float: right; + display: none; + opacity: 0; + transition: opacity 200ms, transform 500ms; + transform: rotate(0deg); + } + + .item.selected .reloadbtn { + display: inline-block; + opacity: 1; + } +</style> + +<div style="position: fixed;inset: 0;z-index: 5;backdrop-filter:blur(10px);background:rgba(47,49,54,1);height:100%;display:grid;grid-template-columns: 256px 1fr;"> + <div id="menu" style="height:100%;overflow-y: scroll;"> + <div class="item selected" id="activity-home" style="margin-top:15vh;"> + Home + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + + <h3 class="section">System</h3> + <div class="item" id="activity-uptime"> + Uptime + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + <div class="item" id="activity-version"> + Software Versions + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + + <h3 class="section">Member Management</h3> + <div class="item" id="activity-unchained"> + UnchainedTech + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + <div class="item" id="activity-kartik"> + Kartik Online + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + + <h3 class="section">Minteck Space</h3> + <div class="item" id="activity-blog"> + Blog + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + <div class="item" id="activity-telemetry"> + Telemetry + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + <div class="item" id="activity-code"> + Code of Conduct + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + + <h3 class="section">Neutron Cloud</h3> + <div class="item" id="activity-quotas"> + Quotas + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + <div class="item" id="activity-neutroning"> + Sites Map + <img alt="" src="/static/reload.png" class="reloadbtn"> + </div> + + <div class="credits" style="margin-bottom:15vh;"> + Release <?= substr(md5_file($_SERVER['DOCUMENT_ROOT'] . "/admin/index.php"), 0, 7); ?><br> + Host <?= PHP_VERSION ?><br> + <?= php_uname('s') ?> <?= php_uname('r') ?> + </div> + </div> + + <div id="content" style="background:rgba(54,57,63,1);"> + <iframe id="content-frame" src="/admin/panes/home.php" style="background: transparent;border: none;height: 100%;width: 100%;"></iframe> + </div> + + <script> + + function activity(id, url, target) { + if (target.classList.contains("selected")) return; + if (target.classList.contains("reloadbtn")) return; + + Array.from(document.getElementsByClassName("item")).forEach((item) => { + item.classList.remove("selected"); + }) + + document.getElementById(id).classList.add("selected"); + document.getElementById("content-frame").src = url; + } + + document.getElementById("activity-home").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/home.php", event.target); }, true) + document.getElementById("activity-uptime").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/uptime.php", event.target); }, true) + document.getElementById("activity-version").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/version.php", event.target); }, true) + document.getElementById("activity-kartik").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/kartik.php", event.target); }, true) + document.getElementById("activity-blog").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/blog.php", event.target); }, true) + document.getElementById("activity-code").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/code.php", event.target); }, true) + document.getElementById("activity-quotas").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/quotas.php", event.target); }, true) + document.getElementById("activity-neutroning").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/neutroning.php", event.target); }, true) + document.getElementById("activity-telemetry").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/telemetry.php", event.target); }, true) + document.getElementById("activity-unchained").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/unchained.php", event.target); }, true) + + Array.from(document.getElementsByClassName("reloadbtn")).forEach((item) => { + item.addEventListener("click", (event) => { + if (event.target.style.transform === "rotate(-360deg)") { + event.target.style.transform = "rotate(0deg)"; + } else { + event.target.style.transform = "rotate(-360deg)"; + } + document.getElementById("content-frame").contentWindow.location.reload(true); + }) + }) + + </script> +</div> + +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/footer.php"; ?>
\ No newline at end of file |