2 error_reporting(E_ALL);
3 ini_set('display_errors', TRUE);
5 include_once 'auth.inc.php';
6 $Edit = isset($_GET['edit']);
9 $Page = preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']);
10 $Page = urldecode(trim($Page, '/')) ?: 'index';
12 if (file_exists("$Page/index.html")) {
16 if (file_exists("$Page.html")) {
19 if (file_exists("$Page.php")) {
20 # unformatted script override
25 $up = strrpos($Page, '/');
31 http_response_code(404);
35 $Args = substr($Page, $up) . $Args;
36 $Page = substr($Page, 0, $up);
39 include 'page.inc.php';