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-v2/$resources/precontent.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-v2/$resources/precontent.php')
-rw-r--r--[-rwxr-xr-x] | Neutron-trunk/cms-special/admin-v2/$resources/precontent.php | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php b/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php index af8d999..9b7e60c 100755..100644 --- a/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php +++ b/Neutron-trunk/cms-special/admin-v2/$resources/precontent.php @@ -47,19 +47,19 @@ if (isset($lang["admin-titles"][$pageid])) { $invalid = false; -if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/") { +if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/" && strpos($_COOKIE['_NEUTRON_ADMIN_TOKEN'], "/") === false) { if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { } else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin/?pr=" . str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']) . "&pa=" . urlencode("?" . explode("?", $_SERVER['REQUEST_URI'])[1]) . "'</script>"); + require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/login'</script>"); } } else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin/?pr=" . str_replace("/index.php", "", $_SERVER['SCRIPT_NAME']) . "&pa=" . urlencode("?" . explode("?", $_SERVER['REQUEST_URI'])[1]) . "'</script>"); + require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/login'</script>"); } if (isset($_POST['password'])) { if (password_verify($_POST['password'], file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/password"))) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin/home';</script>"); + require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("<script>location.href = '" . $GLOBALS["SYSTEM_ROOT"] . "/cms-special/admin-v2/home';</script>"); return; } else { $invalid = true; @@ -112,7 +112,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso ?> <!DOCTYPE html> -<html> +<html style="background-color:transparent !important;"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> @@ -127,19 +127,19 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css"> <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/codename.css"> <link rel="icon" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/image/siteicon.png"> - <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/admin.js"></script> + <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/admin.js"></script> <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/fonts-import.css" as="style"> <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/alerts.css" as="style"> <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin.css" as="style"> <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/ui.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/common.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/index.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/responsive.css" as="style"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/index-dark.css" as="style"> + <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/common.css" as="style"> + <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/index.css" as="style"> + <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/responsive.css" as="style"> + <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/index-dark.css" as="style"> <link rel="preload" href="<?= $_MD_INCLUDES ?>/material-components-web.min.css" as="style"> <link rel="preload" href="<?= $_MDI_PATH ?>" as="style"> <link rel="preload" href="<?= $_MD_INCLUDES ?>/material-components-web.min.js" as="script"> - <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin/$resources/admin.js" as="script"> + <link rel="preload" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/cms-special/admin-v2/$resources/admin.js" as="script"> <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documenthead.php"; ?> <?php @@ -154,15 +154,27 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso ?> <?php - if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "dark") { - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/$resources/index-dark.css">'); - } elseif (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "auto") { - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/$resources/index-auto.css">'); + /*if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "dark") {*/ + echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index-dark.css">'); + /*} elseif (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/theme") == "auto") { + echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index-auto.css">'); } else { - echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin/$resources/index.css">'); - } + echo('<link rel="stylesheet" href="' . $GLOBALS["SYSTEM_ROOT"] . '/cms-special/admin-v2/$resources/index.css">'); + }*/ ?> <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/lib/pushbar.js/library.css"> + <?php if (strpos($_SERVER['HTTP_USER_AGENT'], "Chrome/")): ?> + <link rel="stylesheet" href="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/css/admin_v2/chromium.css"> + <style>:root { --mpcms-banner: url(<?php + + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/resources/upload/banner.jpg")) { + echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/upload/banner.jpg"'); + } else { + echo('"' . $GLOBALS["SYSTEM_ROOT"] . '/resources/image/default.jpg"'); + } + + ?>); }</style> + <?php endif; ?> <script src="<?= $GLOBALS["SYSTEM_ROOT"] ?>/resources/lib/pushbar.js/library.js"></script> <title><?php @@ -199,8 +211,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso ?> </head> -<body id="settings" style="overflow-x:hidden;"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/spotlight.php"; ?> +<body id="settings" style="background-color:transparent !important;overflow-x:hidden;"> + <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/spotlight.php"; ?> <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/documentbody.php"; @@ -209,15 +221,15 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/headers/preprocesso $name = $pageConfig['headerName']; ?> - <div id="admin"> + <div id="admin" style="background-color:transparent !important;"> <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/updates")) { - echo("<div id=\"updates-available\">" . $lang["admin-home"]["updates"][0] . " — <a href=\"/cms-special/admin/updates\">" . $lang["admin-home"]["updates"][1] . "</a></div>"); + echo("<div id=\"updates-available\">" . $lang["admin-home"]["updates"][0] . " — <a href=\"/cms-special/admin-v2/updates\">" . $lang["admin-home"]["updates"][1] . "</a></div>"); $updatable = true; } else { $updatable = false; } ?> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin/\$resources/header.php"; ?>
\ No newline at end of file + <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/cms-special/admin-v2/\$resources/header.php"; ?>
\ No newline at end of file |