summaryrefslogtreecommitdiff
path: root/report.php
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2016-09-25 16:34:47 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2016-09-25 16:34:47 +0900
commita3b9c4405c6d4cca2a70dbb400e3ba3f65e7ea04 (patch)
tree5a2ebdb801748586e3fde7c12cbeda169b2c3e31 /report.php
parent9436524a306c8e3d6d8a6ed195e2a3c56d5cde39 (diff)
parenta4b619ae5eaab5755dc215a496854dee8f7ce395 (diff)
Merged lainchan with vichan master at 25/9/2016 a4b619ae5eaab5755dc215a496854dee8f7ce395 @czaks czaks committed on GitHub 2 days ago
Diffstat (limited to 'report.php')
-rw-r--r--report.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/report.php b/report.php
new file mode 100644
index 00000000..e09b1075
--- /dev/null
+++ b/report.php
@@ -0,0 +1,19 @@
+<?php
+include 'inc/functions.php';
+$global = isset($_GET['global']);
+$post = (isset($_GET['post']) ? $_GET['post'] : false);
+$board = (isset($_GET['board']) ? $_GET['board'] : false);
+
+if (!$post || !preg_match('/^delete_\d+$/', $post) || !$board || !openBoard($board)) {
+ header('HTTP/1.1 400 Bad Request');
+ error(_('Bad request.'));
+}
+
+if ($config['report_captcha']) {
+ $captcha = generate_captcha($config['captcha']['extra']);
+} else {
+ $captcha = null;
+}
+
+$body = Element('report.html', ['global' => $global, 'post' => $post, 'board' => $board, 'captcha' => $captcha, 'config' => $config]);
+echo Element('page.html', ['config' => $config, 'body' => $body]);