X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/9de683f8c399ee4a78fbc86b5ee96ce5662acf97..cb02b91a1ff4859e9f629f1560357584d265959f:/page.inc.php diff --git a/page.inc.php b/page.inc.php index b3fa5f7..c42d5d6 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,28 +1,60 @@ \n"; ob_start(); -include './menu.html'; -$nav = ob_get_clean(); +include DOCROOT.'menu.html'; +ob_start(); +if (!empty($User)) { + print '
'; + printf('Ingelogd: %s', '/login', $User['name']); + if (!empty($User['admin'])) { + $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 ' Wijzig'; + } + } + print "