X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/85cba03008bb578b92db4c9876e5e0f96c76f543..8cf1f0f1bc40c515afafb022ac658c592baa46cc:/page.inc.php diff --git a/page.inc.php b/page.inc.php index 2c1fc6c..1253338 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,26 +1,64 @@ \n"; ob_start(); -include './menu.html'; -$nav = ob_get_clean(); +include '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 "