summaryrefslogtreecommitdiff
path: root/report.php
diff options
context:
space:
mode:
authorAppleman1234 <applemansigloo@gmail.com>2016-12-15 18:25:42 +0900
committerGitHub <noreply@github.com>2016-12-15 18:25:42 +0900
commitcae526e65a20f3da2d8884c4d8e8978c54120000 (patch)
tree2954153dd49f616f5018490058ff4bfbd17300d3 /report.php
parentb58fab98147a92c8e6d22f15d23684508b6bb811 (diff)
parent5feae402cb55d49963bfd2c6f5a33d10690ecbc1 (diff)
Merge pull request #79 from lainchan/clean_prod_vichan_update
Merge vichan changes from upstream and changes directly applied to the site.
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]);