X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/c5d71935bf920cae82c602ff3d644d2e4bb6df47..dceaed615cc4046d0f4145d17580fa1b7471c538:/page.inc.php diff --git a/page.inc.php b/page.inc.php index 0ca6589..23a7106 100644 --- a/page.inc.php +++ b/page.inc.php @@ -2,9 +2,19 @@ include_once 'head.inc.php'; print "
\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 '

'; + printf('%s %s', + '👤', + '/login', $User->login + ); + print "

\n"; +} +$menu->place['login'] = ob_get_clean(); +$nav = $menu->render(); + $nav = preg_replace_callback('{(.*?)}', function ($m) { $request = $_SERVER['REQUEST_URI']; $html = $request == $m[1] ? $m[2] : $m[0]; # text or full link @@ -13,16 +23,10 @@ $nav = preg_replace_callback('{(.*?)}', function ($m) { print $nav; print "
\n\n"; -print '
'."\n\n"; - -include_once 'auth.inc.php'; - register_shutdown_function(function () { - print "
\n\n"; - include 'foot.inc.php'; + print '\n"; print "\n"; }); -include "$Page.html"; -if (file_exists("$Page.php")) include_once("$Page.php"); -