From bae682c87abd4a43231496979963a6bbb66ecc4e Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 17 Sep 2018 16:06:45 +0200 Subject: [PATCH] nieuws: list tag options below articles for admins --- nieuws/index.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/nieuws/index.php b/nieuws/index.php index 11e305e..7397357 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -12,6 +12,25 @@ if ($page and !is_numeric($page)) { if ($article->image) { $Place['image'] = "https://lijtweg.nl/".$article->thumb('600x'); } + if (!empty($User['admin'])) { + $taglist = []; + foreach (glob("$Page/.tags/*") as $tagpath) { + $tagname = pathinfo($tagpath, PATHINFO_BASENAME); + $tagvalue = file_exists("$tagpath/$year-$page.html"); + $tagtarget = is_writable($tagpath); + $taglist[] = sprintf( + '' . + '', + "tags[$tagname]", $tagname, "tag-$tagname", + $tagvalue ? ' checked' : '', + ' onclick="return false"', + ucfirst($tagname) + ); + } + printf("

Tags: %s

\n", + implode("\n\t", $taglist) + ); + } if ($replyform) { print placeholder_include('nieuws/replies'); } -- 2.30.0