diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-03-30 23:40:33 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-03-30 23:40:33 +0100 |
commit | 6b796258d413f00e498ce7f80f73a9f6c061f29c (patch) | |
tree | 49e64a5dd4cde2acff7f0a93ed3f8e20e1cb2dc8 /pages/api/_main.php | |
parent | 5860551daa0f60103ad24e93da29f401a653f144 (diff) | |
download | pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.gz pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.bz2 pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.zip |
Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated)
Diffstat (limited to 'pages/api/_main.php')
-rw-r--r-- | pages/api/_main.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/pages/api/_main.php b/pages/api/_main.php deleted file mode 100644 index 215c1b2..0000000 --- a/pages/api/_main.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -if (str_ends_with($_GET['_'], "/")) { - $pagename = substr($_GET['_'], 0, strlen($_GET['_']) - 1); -} else { - $pagename = $_GET['_']; -} - -$toplevel = explode("/", $pagename)[1]; -$middlelevel = explode("/", $pagename)[2] ?? null; - -if ($toplevel === "_main" || $middlelevel === "_main") { - header("HTTP/1.1 404 Not Found"); - header("Content-Type: text/plain"); - echo("Endpoint not found"); - die(); -} - -if (isset($middlelevel) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . "/" . $middlelevel . ".php") && is_file($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . "/" . $middlelevel . ".php")) { - require_once $_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . "/" . $middlelevel . ".php"; -} else { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php") && is_file($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php")) { - require_once $_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php"; - } else { - header("HTTP/1.1 404 Not Found"); - header("Content-Type: text/plain"); - echo("Endpoint not found"); - die(); - } -} |