page: stable include path (site then minimedit root)
[minimedit.git] / page.inc.php
index 54a39445b42994d777bc5e97fc23d47b7499c888..80f773d30f0395fc40d4411c78d9e85d9e5dc10a 100644 (file)
@@ -1,11 +1,11 @@
 <?php
-$body = ob_get_clean();
+$body = getoutput(@$Place);
 
-include_once DOCROOT.'head.inc.php';
+include_once 'head.inc.php';
 
 print "<header>\n";
 ob_start();
-include DOCROOT.'menu.html';
+include 'menu.html';
 ob_start();
 if (!empty($User)) {
        print '<div class="login"><p>';
@@ -20,7 +20,7 @@ if (!empty($User)) {
                else {
                        $editpage .= '.html';
                }
-               if (is_writable($editpage)) {
+               if (!file_exists($editpage) or is_writable($editpage)) {
                        print ' <a href="#edit">Wijzig</a>';
                }
        }
@@ -46,7 +46,7 @@ print $body;
 
 register_shutdown_function(function () {
        print '<footer>';
-       @include DOCROOT.'footer.html';
+       @include 'footer.html';
        print "</footer>\n";
 
        global $User;