summaryrefslogtreecommitdiff
path: root/report.php
diff options
context:
space:
mode:
authorFredrick Brennan <admin@8chan.co>2015-03-13 12:53:27 +0800
committerczaks <marcin@6irc.net>2016-05-05 13:33:14 +0200
commit71fde3593878073eca6137af0d03046c746ce292 (patch)
tree351191023719ea6a63b89d6d131ae2ab91352e08 /report.php
parentc2e3ff162f7c94d27b85b5056e0acf72724edcd4 (diff)
Oops forgot a file
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]);