2 $replyform = $Page == 'melding' && !empty($User);
3 @list ($year, $page) = explode('/', trim($Args, '/'));
5 if ($User and $User->admin('news')) {
6 print '<script src="/nieuws/edit.js"></script>'."\n";
9 if ($page and !is_numeric($page)) {
10 $edit = $User && $User->admin('news') ? htmlspecialchars(@$_GET['edit']) : NULL;
12 $Article->title = $edit;
14 $Place[1] = ' <small class="date">'.$Article->date.'</small>';
15 print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', ob_get_clean());
16 if ($User and $User->admin('news')) {
18 foreach (glob("$Page/.tags/*") as $tagpath) {
19 $tagname = pathinfo($tagpath, PATHINFO_BASENAME);
20 $tagvalue = file_exists("$tagpath/$year-$page.html");
21 $tagtarget = is_writable($tagpath);
23 '<input type="checkbox" name="%s" value="%s" id="%s"%s%s />' .
24 '<label for="%3$s"> %s</label>',
25 "tags[$tagname]", $tagname, "tag-$tagname",
26 $tagvalue ? ' checked' : '',
32 printf('<p class="tags"><strong>Tags:</strong> %s</p>'."\n",
33 implode("\n\t", $taglist)
38 print placeholder_include('nieuws/replies');
47 if (is_numeric($year) and $year > 999) {
49 if (is_numeric($page)) {
50 $title .= ' '.$monthname[intval($page)];
51 $match .= sprintf('%02d-', $page);
55 elseif ($year === '19') {
57 $title .= " vóór 2000";
59 elseif (file_exists("$Page/.tags/$year")) {
60 $match .= "/.tags/$year";
61 $title .= " met $year";
64 print "<h2>$title</h2>\n\n";
65 print placeholder_include('nieuws', [$match]);