X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/7b8cc4b0de9d5c69f52a36cef7270b66f68100f2..4867902ad83bc343db74316e54058d85627ec5f2:/nieuws.php diff --git a/nieuws.php b/nieuws.php index 84a6172..b28f72b 100644 --- a/nieuws.php +++ b/nieuws.php @@ -11,15 +11,28 @@ if ($page) { if ($year) { ob_clean(); - print "

Nieuws $year

\n\n"; - + if (is_numeric($year)) { + $title = "Nieuws ".($month ? $monthname[$month].' ' : '').$year; + $match = implode('/', [ + $Page, $year, $month ? sprintf('%02d', $month) : '??', + ]); + } + else { + $title = "Nieuws vóór 2000"; + $match = "$Page/19??/??"; + } + + print "

$title

\n\n"; print '
'."\n\n"; - shownews("$Page/$year/??", 100); + shownews($match, 100); print "
\n\n"; - return 1; } +if ($Args) { + return; +} + print '
'."\n\n"; foreach (array_reverse(glob("$Page/2???")) as $page) { @@ -28,6 +41,11 @@ foreach (array_reverse(glob("$Page/2???")) as $page) { printtoc("$page/??"); } +if ($pages = glob("$Page/19??/??/*.html")) { + printf('

%s

'."\n", "$Page/oud", 'Eerder'); + printtoc($pages); +} + print "
\n\n"; if (!empty($User['admin'])) {