X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/c5d71935bf920cae82c602ff3d644d2e4bb6df47..62c99bb3ff5dee600a20fe6749f28c45b6cce7fd:/page.inc.php?ds=sidebyside diff --git a/page.inc.php b/page.inc.php index 0ca6589..333a705 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 "