X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/7333dc046075c7873b15643ecd73f6e3b32c7a79..772961fd4e9be46ad340cad1e55ee5f28cc5b968:/page.inc.php diff --git a/page.inc.php b/page.inc.php index bc2c57d..137d266 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,12 +1,36 @@ \n"; ob_start(); -include './menu.html'; -$nav = ob_get_clean(); +include 'menu.inc.html'; +ob_start(); +if ($User and property_exists($User, 'login') and $User->login) { + 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 "