X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/3f78a38cb23e2bb2609e010f0d3b4dce2d3c1727..ab89443fa6d3a9e13476dae2a3a6c23d13ccf9b0:/foot.inc.php diff --git a/foot.inc.php b/foot.inc.php index d2ba826..96b05ea 100755 --- a/foot.inc.php +++ b/foot.inc.php @@ -1,31 +1,33 @@ - -var pagebody = document.getElementsByClassName('article')[0]; -pagebody.innerHTML = '

Nieuwe pagina

 

'; - -EOT; -} - define('N', "\n"); -$editable = FALSE; // "Beheer toegestaan voor {$_SERVER['REMOTE_ADDR']}:"; +global $User, $Admin; $curfile = ltrim($_SERVER['SCRIPT_NAME'], '/'); if (is_executable(__DIR__ . '/' . $curfile)) { // dynamic code is +x - $editable = FALSE; + $Admin = FALSE; } -if ($editable) { +if ($Admin) { + $edit = preg_match('/[?]edit$/', $_SERVER['REQUEST_URI']); + + if ($edit) { + echo ''.N; + echo ''.N; + if (($notfound = $_SERVER['SCRIPT_NAME'] == '/404.php')) { + echo <<<'EOT' + +EOT; + } + } + echo ''.N; } -?>