login: replace http authentication by cookie system
[minimedit.git] / page.php
index 5d79cf6846ff9e740bf675f5928773fe25e15f45..f6088dd859dcb2906477307b99a52088610ee554 100644 (file)
--- a/page.php
+++ b/page.php
@@ -2,6 +2,9 @@
 error_reporting(E_ALL);
 ini_set('display_errors', TRUE);
 
+include_once 'auth.inc.php';
+$Edit = isset($_GET['edit']);
+
 $Args = '';
 $Page = preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']);
 $Page = urldecode(trim($Page, '/')) ?: 'index';
@@ -16,7 +19,7 @@ while (TRUE) {
        if (file_exists("$Page.php")) {
                # unformatted script override
                require "$Page.php";
-               break;
+               exit;
        }
 
        $up = strrpos($Page, '/');
@@ -29,4 +32,4 @@ while (TRUE) {
        $Page = substr($Page, 0, $up);
 }
 
-include 'head.inc.php';
+include 'page.inc.php';