X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/6c50820df359e22fd0aa9da49c11708aa50f8253..ea491f36c7f81ed231444ed5e4a76c52b03434ac:/page.inc.php diff --git a/page.inc.php b/page.inc.php index 577f1e0..ae223f1 100644 --- a/page.inc.php +++ b/page.inc.php @@ -7,10 +7,13 @@ 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')) { + printf('%s %s', + '👤', + '/login', $User->login + ); + if ($User->admin("edit $Page$Args")) { $editpage = $Page.$Args; if (is_dir($editpage)) { if (file_exists("$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, $Args; + if ($User and $User->admin("edit $Page$Args")) { $ckesrc = '/lib/ckeditor'; # local install if (!file_exists(DOCROOT . $ckesrc)) { $ckesrc = '//cdn.ckeditor.com/4.7.3/full-all'; # remote fallback } - printf(''."\n", "$ckesrc/ckeditor.js"); + printf("\n", "$ckesrc/ckeditor.js"); print ''."\n"; }