X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/7333dc046075c7873b15643ecd73f6e3b32c7a79..e5da0ad603c58c2dd86581e35d6e1a60c0ae2e7d:/page.inc.php diff --git a/page.inc.php b/page.inc.php index bc2c57d..c4884b9 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,24 +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 "