- printf('<span>Ingelogd: <b>%s</b></span>', $User['name']);
- if ($User['admin']) {
- print ' <a href="#edit">Wijzig</a>';
+ printf('<span>Ingelogd: <b><a href="%s">%s</a></b></span>', '/login', $User->login);
+ if ($User->admin("edit $Page$Args")) {
+ $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 ' <a href="#edit">Wijzig</a>';
+ }