X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/3f78a38cb23e2bb2609e010f0d3b4dce2d3c1727..f7d3272780c406dafe63b005bf8b857f3f72cb85:/foot.inc.php diff --git a/foot.inc.php b/foot.inc.php index d2ba826..e1ea486 100755 --- a/foot.inc.php +++ b/foot.inc.php @@ -1,18 +1,9 @@ -var pagebody = document.getElementsByClassName('article')[0]; -pagebody.innerHTML = '

Nieuwe pagina

 

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