- printf('<span>Ingelogd: <b>%s</b></span>', $User['name']);
- if ($User['admin']) {
- print ' <a href="#edit">Wijzig</a>';
+ printf('<span title="ingelogd">%s <a href="%s">%s</a></span>',
+ '<span class="icon icon-user">👤</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 class="icon icon-edit" href="#edit" title="wijzig">✍</a>';
+ }