nieuws/feed: atom content type and link attributes
[minimedit.git] / page.inc.php
index c42d5d6e8f98da0a636e8813e7c1302815a90347..1253338db4707fe6f56e4f6ff424c628242ad678 100644 (file)
@@ -1,11 +1,11 @@
 <?php
 $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>';
@@ -46,13 +46,17 @@ print $body;
 
 register_shutdown_function(function () {
        print '<footer>';
-       @include DOCROOT.'footer.html';
+       @include 'footer.html';
        print "</footer>\n";
 
        global $User;
        if (!empty($User['admin'])) {
-               print '<script src="//cdn.ckeditor.com/4.7.3/full-all/ckeditor.js"></script>'."\n";
-               print '<script src="/edit.js"></script>'."\n";
+               $ckesrc = '/lib/ckeditor'; # local install
+               if (!file_exists(DOCROOT . $ckesrc)) {
+                       $ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback
+               }
+               printf('<script src="%s"></script>'."\n", "$ckesrc/ckeditor.js");
+               print '<script src="/edit/page.js"></script>'."\n";
        }
 
        print "</body></html>\n";