<?php
-include_once './head.inc.php';
+include_once 'head.inc.php';
print "<header>\n";
+$menu = new ArchiveArticle('menu.inc.html');
ob_start();
-include './menu.html';
-$nav = ob_get_clean();
+if ($User and property_exists($User, 'login') and $User->login) {
+ print '<div class="login"><p>';
+ printf('<span title="ingelogd">%s <a href="%s">%s</a></span>',
+ '<span class="icon icon-user">👤</span>',
+ '/login', $User->login
+ );
+ print "</p></div>\n";
+}
+$menu->place['login'] = ob_get_clean();
+$nav = $menu->render();
+
$nav = preg_replace_callback('{<a href="([^"]+)">(.*?)</a>}', function ($m) {
$request = $_SERVER['REQUEST_URI'];
$html = $request == $m[1] ? $m[2] : $m[0]; # text or full link
print "</header>\n\n";
register_shutdown_function(function () {
- include 'foot.inc.php';
+ print '<footer>';
+ @include 'footer.inc.html';
+ print "</footer>\n";
print "</body></html>\n";
});