X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/85cba03008bb578b92db4c9876e5e0f96c76f543..5424adb82922a3e91606e7b1cc42f3a8536c2816:/page.inc.php diff --git a/page.inc.php b/page.inc.php index 2c1fc6c..ae223f1 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,10 +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$Args")) { + $editpage = $Page.$Args; + 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 "