$blotter = $db->fetchBCW(THbcw_blotter); foreach ($blotter as $blot) { if ($_POST['del' . $blot['id']]) { $db->deleteBCW(THbcw_blotter, $blot['id']); $actionstring = "Blotter delete\tid:" . $blot['id']; writelog($actionstring, "admin"); } else { $blotter_entry = array('id' => (int) $_POST['id' . $blot['id']], 'text' => $db->escape_string($_POST['post' . $blot['id']]), 'board' => $db->escape_string($_POST['postto' . $blot['id']])); $db->updateBCW(THbcw_blotter, $blotter_entry['id'], $blotter_entry['text'], $blotter_entry['board']); } } header("Location: " . THurl . "admin.php?a=bl"); } elseif ($_GET['t'] == "b") { //echo '<pre>' . var_export($_POST,true).'</code></pre>'; if (isset($_POST['boardselect'])) { $boardnumber = $db->getboardnumber($_POST['boardselect']); if (isset($_POST['delete' . $boardnumber]) && $_POST['delete' . $boardnumber] == TRUE) { // Remove associated images delimgs($db->fragboard($boardnumber)); // Remove the DB board entry $db->removeboard($boardnumber); $actionstring = "Board delete\tid:" . $boardnumber; writelog($actionstring, "admin"); $location = THurl . "admin.php?a=b"; } else { // We're going to make an array of boards to update (with size 1) containing // assoc-arrays with board information $boards_to_update = array(); $updated_board = array(); // Get ID stuff set up $updated_board['oldid'] = $boardnumber;
// First check if we even have the params we need if (!isset($_GET['board']) || !isset($_GET['post'])) { $message = "No post and/or board parameter, nothing to do!"; } else { $db = new ThornModDBI(); if ($db->checkban()) { THdie("ADbanned"); } // Get the board name. $board_folder = trim($_GET['board']); // Check for local mod access or global mod/admin access. if (is_in_csl($board_folder, $_SESSION['mod_array']) != 1 && $_SESSION['admin'] != 1 && $_SESSION['mod_global'] != 1) { $message = "You are not permitted to moderate posts on this board"; } else { // Set some stuff up. $board_id = $db->getboardnumber($board_folder); // Make sure we retrieved a valid board folder if ($board_folder == null) { $message = "That board does not exist!"; } else { $postid = intval($_GET['post']); // SQL injection protection :] $postarray = $db->getsinglepost($postid, $board_id); // Make sure it exists if ($postarray == null) { $message = "Post with global ID of " . $postid . " and board /" . $board_folder . "/ does not exist."; } else { $message = "Moderation actions on post " . $postid . " in /" . $board_folder . "/ performed:"; // Let's ban. This is quicker mod, so we ban with default reason $reason = "USER WAS BANNED FOR THIS POST"; $duration = 0;
require_once "common.php"; if (!$_SESSION['admin'] && !$_SESSION['moderator']) { THdie("Sorry, you do not have the proper permissions set to be here, or you are not logged in."); } else { $db = new ThornModDBI(); // Init some stuff if (isset($_GET['board'])) { $board_folder = trim($_GET['board']); //trim the board name from get } else { $board_folder = ""; } $boardid = 0; $reports = array(); $processed_reports = array(); if ($board_folder && $db->getboardnumber($board_folder)) { $boardid = $db->getboardnumber($board_folder); // Filter by this boardid $reports = $db->gettopreports($boardid); } else { $board_folder = ""; // Clear $board if the getboardnumber call failed $reports = $db->gettopreports(); } // Populate each report with post and image information as well foreach ($reports as $report) { // Basic post information $report['post'] = $db->getsinglepost($report['postid'], $report['board']); // Add in the thread location (globalid) if ($report['post']['thread'] == 0) { $report['post']['thread_globalid'] = $report['post']['globalid'];