summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-04-20 19:47:55 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-04-20 19:47:55 +1000
commit4fcf9c2c916140f8dc95fc975b4ff61cfb98c6cf (patch)
treef0736adeeb22c11288c33d6ac81b3b3a847a348a /inc
parent9286ec4928e26097031eb98c34a172ece68c273b (diff)
Starting on ?/ban/<post>
Diffstat (limited to 'inc')
-rw-r--r--inc/mod/pages.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 541a7c23..7bc970b0 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -365,6 +365,24 @@ function mod_bumplock($board, $unbumplock, $post) {
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['file_index'], true, $config['redirect_http']);
}
+function mod_ban_post($board, $delete, $post) {
+ global $config, $mod;
+
+ if (!openBoard($board))
+ error($config['error']['noboard']);
+
+ if (!hasPermission($config['mod']['delete'], $board))
+ error($config['error']['noaccess']);
+
+ $query = prepare(sprintf('SELECT `ip` FROM `posts_%s` WHERE `id` = :id', $board));
+ $query->bindValue(':id', $post);
+ $query->execute() or error(db_error($query));
+ if(!$ip = $query->fetchColumn(0))
+ error($config['error']['404']);
+
+ mod_page("New ban", 'mod/ban_form.html', array());
+}
+
function mod_delete($board, $post) {
global $config, $mod;