From 6b796258d413f00e498ce7f80f73a9f6c061f29c Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 30 Mar 2024 23:40:33 +0100 Subject: Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated) --- app.php | 164 +++------------------------------------------------------------- 1 file changed, 7 insertions(+), 157 deletions(-) (limited to 'app.php') diff --git a/app.php b/app.php index 521ce2f..4df1aea 100644 --- a/app.php +++ b/app.php @@ -1,78 +1,7 @@ = 1711929600; -$defaultMember = << 1714507200) { + header("Location: https://equestria.dev"); + die(); } else { - if ($toplevel === "-") { - $pagename = substr($pagename, 2); - $toplevel = explode("/", $pagename)[0]; - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc")) { - $pageFile = $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc"; - $GLOBALS["ColdHazePerformance"]["router"] = (microtime(true) - $start) * 1000; - require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc"; - } else { - peh_error("Page not found: " . strip_tags($pagename), 404); - } - } else if ($toplevel === "api") { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc")) { - $pageFile = $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc"; - $GLOBALS["ColdHazePerformance"]["router"] = (microtime(true) - $start) * 1000; - require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc"; - } - } else if ($toplevel === "raindrops" || $toplevel === "moonglow" || (($isLoggedIn || $isLowerLoggedIn) && $toplevel === $app["other"]["slug"])) { - $parts = explode("/", $_GET['_']); - - if (isset($parts[1]) && $parts[1] !== "-") { - if ($parts[1] === "unknown") { - header("Location: /unknown-rd"); - } else { - header("Location: /" . $parts[1]); - } - - die(); - } - - $pageFile = $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc"; - $GLOBALS["ColdHazePerformance"]["router"] = (microtime(true) - $start) * 1000; - require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc"; - } else { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/" . $toplevel . ".inc")) { - header("Location: /-/" . $toplevel); - } else { - $namesRaindrops = [...array_map(function ($i) { - return $i['name']; - }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), function ($i) { - return true; - })), "unknown-rd"]; - $namesMoonglow = array_map(function ($i) { - return $i['name']; - }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/hrbom/members.json"), true), function ($i) { - return true; - })); - $namesOther = []; - - if ($isLoggedIn || $isLowerLoggedIn) { - $namesOther = [...array_map(function ($i) { - return $i['name']; - }, array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/members.json"), true), function ($i) { - return true; - })), $app["other"]["unknown"]]; - } - - if ((in_array($toplevel, $namesRaindrops) || in_array($toplevel, $namesOther) || in_array($toplevel, $namesMoonglow)) && $toplevel !== "unknown") { - $pageFile = $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc"; - $GLOBALS["ColdHazePerformance"]["router"] = (microtime(true) - $start) * 1000; - require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc"; - } - } - } + require_once $_SERVER['DOCUMENT_ROOT'] . "/eol.php"; } } - -$output = ob_get_contents(); -ob_end_clean(); -echo($output); -- cgit