diff options
author | Gitea <gitea@fake.local> | 2021-11-10 17:53:13 +0100 |
---|---|---|
committer | Gitea <gitea@fake.local> | 2021-11-10 17:53:13 +0100 |
commit | 7b4af63a90a726b98a59b83e53f040a7a566a11d (patch) | |
tree | b85747947816fe4375e85ab6b822ffabec548c7b /Neutron-trunk/cms-special/admin/index.php | |
parent | 80f78c2925530e945503ab603e79d1acc53075f4 (diff) | |
download | electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.gz electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.tar.bz2 electrode-7b4af63a90a726b98a59b83e53f040a7a566a11d.zip |
Update
Diffstat (limited to 'Neutron-trunk/cms-special/admin/index.php')
-rw-r--r--[-rwxr-xr-x] | Neutron-trunk/cms-special/admin/index.php | 135 |
1 files changed, 1 insertions, 134 deletions
diff --git a/Neutron-trunk/cms-special/admin/index.php b/Neutron-trunk/cms-special/admin/index.php index 8e388b6..6d72277 100755..100644 --- a/Neutron-trunk/cms-special/admin/index.php +++ b/Neutron-trunk/cms-special/admin/index.php @@ -1,135 +1,2 @@ <?php require_once "../../resources/private/relative.php"; getRelativeDetails("cms-special"); ?> -<?php - -if (isset($_GET['pr']) || isset($_GET['pa'])) { - if (isset($_GET['pr']) && !isset($_GET['pa'])) { - header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/login/?pr=" . $_GET['pr']); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); - } - if (!isset($_GET['pr']) && isset($_GET['pa'])) { - header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/login/?pa=" . $_GET['pa']); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); - } - if (isset($_GET['pr']) && isset($_GET['pa'])) { - header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/login/?pr=" . $_GET['pr'] . "&pa=" . $_GET['pa']); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); - } -} - -/** @var boolean $__electrode */ -if (isset($__electrode) && $__electrode) { - header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"); - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit(); -} - -?> - -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Neutron</title> - <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ajax.css"> - <link rel="icon" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/siteicon.png"> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/js/jquery.js"></script> -</head> -<body> - <iframe id="content" src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/login" style="border:none;"></iframe> - <div id="loader"> - <svg class="spinner" width="48px" height="48px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"> - <circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle> - </svg> - </div> -</body> - -<script> - function iframeURLChange(iframe, callback) { - var unloadHandler = function () { - setTimeout(function () { - callback(iframe.contentWindow.location.href); - }, 0); - }; - - function attachUnload() { - iframe.contentWindow.removeEventListener("unload", unloadHandler); - iframe.contentWindow.addEventListener("unload", unloadHandler); - } - - iframe.addEventListener("load", attachUnload); - attachUnload(); - } - - iframeURLChange(document.getElementById("content"), function (newURL) { - $("#loader").fadeIn(200); - }); - - document.getElementById('content').onbeforeunload = () => { - $("#loader").fadeIn(200); - } - - document.getElementById('content').onload = () => { - $("#loader").fadeOut(200); - - setTimeout(() => { - $("#loader").fadeOut(200); - }, 300) - - els2 = document.getElementById('content').contentWindow.location.href.split("/"); - - els2.shift(); - els2.shift(); - els2.shift(); - - url = "/" + els2.join("/"); - if (!url.startsWith("<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin")) { - document.getElementById('content').contentWindow.history.back(); - window.open(url); - } - - els = document.getElementById('content').contentWindow.location.href.split("/"); - - els.shift(); - els.shift(); - els.shift(); - els.shift(); - els.shift(); - <?php if ($GLOBALS["SYSTEM_PREFIXED"]): ?> - els.shift(); - <?php endif; ?> - - oldu = "/" + els.join("/"); - - window.history.replaceState("Neutron", "Neutron", "#/" + els.join("/")); - console.log("<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/" + els.join("/")); - - document.title = document.getElementById('content').contentWindow.document.title; - } - - oldu = null; - setInterval(() => { - hash = location.hash.substr(1); - - if (hash == "" && hash != oldu) { - document.getElementById('content').src = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/home"; - console.log("<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/home"); - $("#loader").fadeIn(200); - - oldu = hash; - } else if (hash != oldu) { - if (hash.startsWith("/") && (hash.substr(1, 1) != "/")) { - document.getElementById('content').src = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin" + hash; - console.log("<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin" + hash); - $("#loader").fadeIn(200); - } else { - document.getElementById('content').src = "<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/home"; - console.log("<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/home"); - $("#loader").fadeIn(200); - } - - oldu = hash; - } - }, 200) -</script> - -</html>
\ No newline at end of file +<?php header("Location: {$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin-v2"); require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php"; quit(); ?>
\ No newline at end of file |