X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/3dd944a535c60c1b25dedda5c942d43fd0b6421e..47fdce547d48fe80bcaac1495bf12c7450a1380e:/page.inc.php diff --git a/page.inc.php b/page.inc.php index 9d49fad..7c8e191 100644 --- a/page.inc.php +++ b/page.inc.php @@ -11,7 +11,18 @@ if (isset($User)) { print '

'; printf('Ingelogd: %s', $User['name']); if ($User['admin']) { - print ' Wijzig'; + $editpage = $Page.$Args; + if (is_dir($editpage)) { + if (file_exists("$editpage/index.html")) { + $editpage .= '/index.html'; + } + } + else { + $editpage .= '.html'; + } + if (is_writable($editpage)) { + print ' Wijzig'; + } } print "

\n"; }