2 $body = ob_get_clean();
4 include_once DOCROOT.'head.inc.php';
8 include DOCROOT.'menu.html';
11 print '<div class="login"><p>';
12 printf('<span>Ingelogd: <b>%s</b></span>', $User['name']);
14 print ' <a href="#edit">Wijzig</a>';
18 $nav = getoutput(['login' => ob_get_clean()]);
20 $nav = preg_replace_callback('{<a href="([^"]+)">(.*?)</a>}', function ($m) {
21 $request = $_SERVER['REQUEST_URI'];
22 $html = $request == $m[1] ? $m[2] : $m[0]; # text or full link
23 return $m[1] == substr($request, 0, strlen($m[1])) ? "<b>$html</b>" : $html;
26 $nav = preg_replace('{\s*<li class="logout">.*?</li>}', '', $nav);
29 $nav = preg_replace('{\s*<li class="login">.*?</li>}', '', $nav);
32 print "</header>\n\n";
36 register_shutdown_function(function () {
38 @include DOCROOT.'footer.html';
42 if (isset($User) and $User['admin']) {
43 print '<script src="//cdn.ckeditor.com/4.7.3/full-all/ckeditor.js"></script>'."\n";
44 print '<script src="/edit.js"></script>'."\n";
47 print "</body></html>\n";