aboutsummaryrefslogtreecommitdiff
path: root/admin/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/index.php')
-rw-r--r--admin/index.php274
1 files changed, 0 insertions, 274 deletions
diff --git a/admin/index.php b/admin/index.php
deleted file mode 100644
index c05b0be..0000000
--- a/admin/index.php
+++ /dev/null
@@ -1,274 +0,0 @@
-<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.php"; ?>
-
-<div id="--loader" style="background:rgba(47,49,54,1);position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;">
- <img src="/logo-mono.png" width="64px">
-</div>
-
-<script>
- window.addEventListener("load", () => {
- setTimeout(() => {
- $("#--loader").fadeOut(200);
- }, 2000)
- })
-</script>
-
-<!--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: 99px;
- padding: 2.5px 15px;
- color: lightgray;
- margin-right: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- }
-
- .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;
- }
-
- .item-text {
- vertical-align: middle;
- position: relative;
- top: 2px;
- pointer-events: none;
- }
-
- .item-icon {
- vertical-align: middle;
- width: 24px;
- filter: invert(1);
- pointer-events: none;
- }
-
- @media (max-width: 700px) {
- .admin > div {
- grid-template-columns: 64px 1fr !important;
- }
-
- .item-text, .credits {
- display: none;
- }
-
- .reloadbtn {
- display: none !important;
- opacity: 0 !important;
- pointer-events: none !important;
- }
-
- .item {
- padding: 5px;
- margin-left: 8px;
- margin-right: 8px;
- border-radius: 999px;
- width: 48px;
- height: 48px;
- margin-bottom: 5px;
- }
-
- .item:nth-child(1) {
- margin-top: 10px !important;
- }
-
- .item-icon {
- position: relative;
- top: 1px;
- width: 36px;
- left: 1px;
- }
- }
-</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%;">
- <div class="item selected" id="activity-home" style="margin-top:15vh;">
- <img src="/static/admin/home.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Home", "Accueil") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-files">
- <img src="/static/admin/files.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Files", "Fichiers") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-audit">
- <img src="/static/admin/audit.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Security Audit", "Audit de sécurité") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-hardware">
- <img src="/static/admin/hardware.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Hardware", "Matériel") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-disk">
- <img src="/static/admin/disk.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Disk Space", "Espace disque") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-uptime">
- <img src="/static/admin/uptime.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Uptime", "Temps système") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-version">
- <img src="/static/admin/version.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Software Versions", "Versions du logiciel") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-unchained">
- <img src="/static/admin/unchained.svg" class="item-icon" alt="">
- <span class="item-text">UnchainedTech</span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-kartik">
- <img src="/static/admin/kartik.svg" class="item-icon" alt="">
- <span class="item-text">Kartik Online</span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-telemetry">
- <img src="/static/admin/telemetry.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Telemetry", "Télémétrie") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-shortens">
- <img src="/static/admin/shortens.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Shortened URLs", "URL raccourcies") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-code">
- <img src="/static/admin/code.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Code of Conduct", "Code de Conduite") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-quotas">
- <img src="/static/admin/quotas.svg" class="item-icon" alt="">
- <span class="item-text">Quotas</span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
- <div class="item" id="activity-neutroning">
- <img src="/static/admin/neutroning.svg" class="item-icon" alt="">
- <span class="item-text"><?= l("Sites Map", "Plan des sites") ?></span>
- <img alt="" src="/static/reload.png" class="reloadbtn">
- </div>
-
- <div class="credits" style="margin-bottom:15vh;">
- Admin <?= substr(md5_file($_SERVER['DOCUMENT_ROOT'] . "/admin/index.php"), 0, 7); ?><br>
- Release <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/version.txt") ?><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-files").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/files.php", event.target); }, true)
- document.getElementById("activity-hardware").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/hardware.php", event.target); }, true)
- document.getElementById("activity-disk").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/disk.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-audit").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/audit.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-shortens").addEventListener("click", (event) => { activity(event.target.id, "/admin/panes/shortens.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-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