1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00
vichan/report.php

20 lines
690 B
PHP
Raw Normal View History

2015-03-13 05:53:27 +01:00
<?php
2021-02-13 21:30:27 +01:00
require 'inc/bootstrap.php';
2015-03-13 05:53:27 +01:00
$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($config['file_report'], ['global' => $global, 'post' => $post, 'board' => $board, 'captcha' => $captcha, 'config' => $config]);
echo Element($config['file_page_template'], ['config' => $config, 'body' => $body]);