From 529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 24 Aug 2021 15:38:16 +0200 Subject: Update --- .../cms-special/admin/login-old/index.php | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 Neutron-trunk/cms-special/admin/login-old/index.php (limited to 'Neutron-trunk/cms-special/admin/login-old/index.php') diff --git a/Neutron-trunk/cms-special/admin/login-old/index.php b/Neutron-trunk/cms-special/admin/login-old/index.php new file mode 100644 index 0000000..d4428d7 --- /dev/null +++ b/Neutron-trunk/cms-special/admin/login-old/index.php @@ -0,0 +1,122 @@ + + 12,]), PASSWORD_BCRYPT, ['cost' => 12,])); + if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens")) { + mkdir($_SERVER['DOCUMENT_ROOT'] . "/data/tokens"); + } + $tokens = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/tokens"); + foreach ($tokens as $atoken) { + if ($atoken == "." || $atoken == "..") {} else { + unlink($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $atoken); + } + } + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $token, ""); + header("Set-Cookie: _NEUTRON_ADMIN_TOKEN={$token}; Path=/; Http-Only; SameSite=Strict"); + header("Location: " . $callback); + return; + } else { + $invalid = true; + } + } +} + +if (isset($_COOKIE['_NEUTRON_ADMIN_TOKEN']) && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != ".." && $_COOKIE['_NEUTRON_ADMIN_TOKEN'] != "/") { + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/tokens/" . $_COOKIE['_NEUTRON_ADMIN_TOKEN'])) { + if (isset($_GET['pr'])) { + if (isset($_GET['pa'])) { + $callback = $_GET['pr'] . $_GET['pa']; + } else { + $callback = $_GET['pr']; + } + } else { + $callback = "{$GLOBALS["SYSTEM_ROOT"]}/cms-special/admin/home"; + } + header("Location: " . $callback); + } +} + +?> + +") ?> + + + + + + + + + /resources/css/admin.css"> + /resources/css/fonts-import.css"> + /resources/css/ui.css"> + + <?php + + if ($ready) { + echo($lang["login"]["login"] . " - " . $lang["login"]["title"] . " - " . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/sitename")); + } else { + echo("Neutron"); + } + + ?> + location.href = '{$GLOBALS["SYSTEM_ROOT"]}/cms-special/setup';"); + } + ?> + + +
+ /resources/upload/siteicon.png" style="border-radius:100%;" class="intro-element"> +

+

", str_replace("{", "", $lang["login"]["redirect"])); ?>

+

' . $lang["login"]["uauth"] . '
' . $lang['login']['pass'] . ''); + } else { + echo('' . $lang["login"]["upass"] . '
' . $lang['login']['auth'] . '
'); + } + + ?>

+ ' . $lang["login"]["invalid"] . '
');} ?> + + +
+ ">

+ "> +

+ +
+ " disabled>

+ " . $lang["login"]["nokey"][1] . " " . $lang["login"]["nokey"][2] ?> +

+ + + + \ No newline at end of file -- cgit