X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/41811556ca2ca3ca29191bee012c35e5f40a3995..7213175b8391e8f47f54096fada4fdc33d82b8a1:/widget/nieuws/replies.php diff --git a/widget/nieuws/replies.php b/widget/nieuws/replies.php new file mode 100644 index 0000000..0847c7e --- /dev/null +++ b/widget/nieuws/replies.php @@ -0,0 +1,50 @@ +Reacties'."\n"; +$pagelink = $Page.$Args; + +if ($_POST) { + try { + @mkdir($pagelink); + $target = $pagelink.'/'.date('YmdHis').':'.$User->login.'.html'; + $html = nl2br(htmlspecialchars($_POST['reply'])); + $html = "

$html

\n"; + $written = file_put_contents($target, $html); + if ($written === FALSE) { + throw new Exception('Fout bij opslaan'); + } + $_POST['reply'] = NULL; + } + catch (Exception $e) { + print '

Antwoord niet opgeslagen.

'."\n\n"; + } +} + +print '\n\n";