nieuws: dynamic article system
[minimedit.git] / nieuws.php
diff --git a/nieuws.php b/nieuws.php
new file mode 100644 (file)
index 0000000..157986c
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+include 'nieuws.inc.php';
+
+if ($Args) {
+       $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL;
+       print shownewsarticle($Args, FALSE, $edit);
+       return;
+}
+
+ob_clean();
+print "<h2>Nieuwsarchief</h2>\n\n";
+
+print '<div id="news">'."\n\n";
+shownews($Page, 20);
+print "</div>\n\n";
+
+if (!empty($User['admin'])) {
+       print '<script src="/nieuws/edit.js"></script>'."\n";
+}