X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/c5d71935bf920cae82c602ff3d644d2e4bb6df47..caa254384466d5f8477de38fcf7492a1ecd3f938:/page.inc.php?ds=sidebyside
diff --git a/page.inc.php b/page.inc.php
index 0ca6589..17e7c80 100644
--- a/page.inc.php
+++ b/page.inc.php
@@ -1,10 +1,45 @@
admin("edit {$Page->link}")) {
+ $ckesrc = '/lib/ckeditor'; # local install
+ if (!file_exists(DOCROOT . $ckesrc)) {
+ $ckesrc = '//cdn.ckeditor.com/4.15.1/full-all'; # remote fallback
+ }
+ ob_start();
+ printf("\n", "$ckesrc/ckeditor.js");
+ print ''."\n";
+ $Page->head = ob_get_clean();
+}
+
include_once 'head.inc.php';
print " ';
+ printf('%s %s',
+ '👤',
+ '/login', $User->login
+ );
+ if ($User->admin("edit {$Page->link}")) {
+ $editpage = $Page->link;
+ if (is_dir($editpage)) {
+ if (file_exists("$editpage/index.html")) {
+ $editpage .= '/index.html';
+ }
+ }
+ else {
+ $editpage .= '.html';
+ }
+ if (!file_exists($editpage) or is_writable($editpage)) {
+ print ' ✍';
+ }
+ }
+ print "