X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/e6c659bfdef46ce64bc0c1dbc901b4ed983ffa7b..e68f7733ec6b846dc82b67e52588ae0ba302b76b:/page.php diff --git a/page.php b/page.php index 9e3388e..3c0977e 100644 --- a/page.php +++ b/page.php @@ -52,6 +52,9 @@ if (file_exists("$Page$Args/index.html")) { elseif (file_exists("$Page$Args.html")) { $found = include "./$Page$Args.html"; } +elseif (isset($User) and $User['admin']) { + $found = require './template.html'; +} print "\n\n"; @@ -76,14 +79,9 @@ include_once 'page.inc.php'; if (!$found) { # no resulting output - if (isset($User) and $User['admin']) { - require './template.html'; - } - else { - http_response_code(404); - ob_start(); - require "./404.html"; - print getoutput([ 'url' => htmlspecialchars($_SERVER['REQUEST_URI']) ]); - } + http_response_code(404); + ob_start(); + require "./404.html"; + print getoutput([ 'url' => htmlspecialchars($_SERVER['REQUEST_URI']) ]); }