X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/328e964708c7e9dc479a25f9358b2d03e9d7f66c..519348de7aa1839fe208ecceca7386e1b9ff609d:/nieuws.php?ds=sidebyside
diff --git a/nieuws.php b/nieuws.php
index 84a6172..338a6b6 100644
--- a/nieuws.php
+++ b/nieuws.php
@@ -1,35 +1,22 @@
Nieuws $year\n\n";
-
- print '
'."\n\n";
- shownews("$Page/$year/??", 100);
- print "
\n\n";
-
- return 1;
+include_once 'nieuws.inc.php';
+$articles = (ltrim($Args, '/') ?: 'nieuws');
+if (strpos($articles, '/') === FALSE) {
+ if (@$Place['view'] === 'toc') {
+ foreach (array_reverse(glob("$articles/2???")) as $page) {
+ $year = basename($page, '.html');
+ printf(''."\n", $page, $year);
+ printtoc($page, 'gallery');
+ }
+ return;
+ }
+ $articles .= '/????';
}
-print ''."\n\n";
-
-foreach (array_reverse(glob("$Page/2???")) as $page) {
- $year = basename($page, '.html');
- printf('
'."\n", $page, $year);
- printtoc("$page/??");
-}
-
-print "
\n\n";
-
-if (!empty($User['admin'])) {
- print ''."\n";
+if (@$Place['view'] === 'toc') {
+ printtoc($articles);
+ return;
}
+ob_start();
+shownews($articles, @$Place['n'] ?: 5);
+print getoutput();