X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/97bc8f54b09859842e53d4886234a3b09122ea71..refs/tags/v2.1:/page.inc.php diff --git a/page.inc.php b/page.inc.php index dcb0573..4cc6939 100644 --- a/page.inc.php +++ b/page.inc.php @@ -1,4 +1,6 @@ \n"; @@ -10,17 +12,20 @@ $nav = preg_replace_callback('{(.*?)}', function ($m) { $html = $request == $m[1] ? $m[2] : $m[0]; # text or full link return $m[1] == substr($request, 0, strlen($m[1])) ? "$html" : $html; }, $nav); +if (isset($User)) { + $nav = preg_replace('{\s*
  • .*?
  • }', '', $nav); + $nav = str_replace('[[login]]', $User['name'], $nav); +} +else { + $nav = preg_replace('{\s*
  • .*?
  • }', '', $nav); +} print $nav; print "\n\n"; -print '
    '."\n\n"; +print $body; register_shutdown_function(function () { - print "
    \n\n"; include 'foot.inc.php'; print "\n"; }); -include "./$Page.html"; -if (file_exists("$Page.php")) include_once("./$Page.php"); -