From 177953fe451a3e393cf9d63bc977de11544bd395 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 11 Aug 2018 05:56:26 +0200 Subject: [PATCH] nieuws: include contact form at replyable overview --- contact.php | 11 +++++++++++ nieuws/index.php | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/contact.php b/contact.php index 691ff41..9d0b1bc 100644 --- a/contact.php +++ b/contact.php @@ -22,6 +22,14 @@ function mailform($input = []) } switch ($source) { + case 'melding': + if (empty($input['login'])) { + return "Inloggen is verplicht om een melding te plaatsen."; + } + if (empty($input['body'])) { + return "Geen bericht opgegeven."; + } + break; case 'bbq': if (empty($input['naam']) or empty($input['huis'])) { return 'De bedoeling is juist dat je opgeeft wie er komt.'; @@ -70,6 +78,9 @@ switch ($source) { case 'bbq': print "

Bedankt voor je deelname. Tot ziens!

"; break; + case 'melding': + print "

Bedankt voor de melding. Na goedkeuring zal het hier geplaatst worden.

"; + break; default: print '

Bedankt voor uw reactie!

'; } diff --git a/nieuws/index.php b/nieuws/index.php index c90034f..506cd05 100644 --- a/nieuws/index.php +++ b/nieuws/index.php @@ -95,6 +95,20 @@ if ($pages = glob("$Page/19??/*.html")) { print "\n\n"; +if ($replyform) { + print "

Melding rapporteren

\n"; + $_REQUEST['subject'] = 'melding'; + require 'contact.php'; +?> +
+

+ + +

+
+'."\n"; } -- 2.30.0