login: replace page editability var by admin status
[minimedit.git] / foot.inc.php
index 586d6a84353cb3a34b54f01c9f6717cabaaae41f..e61346a1fab0b7e815bb94bbf1221a10ce748b1d 100755 (executable)
@@ -3,13 +3,15 @@
 <?php
 define('N', "\n");
 
+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) {
@@ -26,7 +28,7 @@ EOT;
        }
 
        echo '<p class="footer">'.N;
-       echo "Beheer toegestaan voor $editable:".N;
+       echo "Beheer toegestaan voor $User:".N;
        printf('<a href="?%s">%s</a>'.N,
                $edit ? '' : 'edit',
                $edit ? 'lezen' : ($notfound ? 'aanmaken' : 'aanpassen')