X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/6c50820df359e22fd0aa9da49c11708aa50f8253..772961fd4e9be46ad340cad1e55ee5f28cc5b968:/page.inc.php diff --git a/page.inc.php b/page.inc.php index 577f1e0..137d266 100644 --- a/page.inc.php +++ b/page.inc.php @@ -7,11 +7,14 @@ print "
\n"; ob_start(); include 'menu.inc.html'; ob_start(); -if ($User) { +if ($User and property_exists($User, 'login') and $User->login) { print '

'; - printf('Ingelogd: %s', '/login', $User->login); - if ($User->admin('edit')) { - $editpage = $Page.$Args; + 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'; @@ -21,7 +24,7 @@ if ($User) { $editpage .= '.html'; } if (!file_exists($editpage) or is_writable($editpage)) { - print ' Wijzig'; + print ' '; } } print "

\n"; @@ -43,13 +46,13 @@ register_shutdown_function(function () { @include 'footer.inc.html'; print "\n"; - global $User; - if ($User and $User->admin('edit')) { + global $User, $Page; + if ($User and $User->admin("edit {$Page->link}")) { $ckesrc = '/lib/ckeditor'; # local install if (!file_exists(DOCROOT . $ckesrc)) { - $ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback + $ckesrc = '//cdn.ckeditor.com/4.15.1/full-all'; # remote fallback } - printf(''."\n", "$ckesrc/ckeditor.js"); + printf("\n", "$ckesrc/ckeditor.js"); print ''."\n"; }