} // Get the board ID. $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) { THdie("You are not permitted to moderate posts on this board"); } // Initialize admin powers if (isset($_SESSION["admin"]) && $_SESSION["admin"] == 1) { $adminpowers = 1; } else { $adminpowers = 0; } $db = new ThornPostDBI(); // Set some stuff up. $board_id = $db->getboardnumber($board_folder); $postid = intval($_GET['post']); // SQL injection protection :] $threadid = 0; // set this up later once we get some post data $ipstring = ""; // Make sure we retrieved a valid board id if ($board_id == null) { THdie("That board does not exist!"); } // $postarray will hold the assoc containing post data $postarray = array(); $postarray = $db->getsinglepost($postid, $board_id); // Make sure it exists if ($postarray == null) { THdie("Post with global ID of " . $postid . " and board /" . $board_folder . "/ does not exist.");
{ THdie("Subject field not long enough"); } */ $mod = $_SESSION['moderator'] || $_SESSION['admin']; //quick fix //var_dump($_POST); //This should be for CAPTCHA if (THvc == 1) { checkvc(); } $db = new ThornPostDBI(); if ($db->checkban()) { THdie("PObanned"); } $binfo = $db->getbinfo($db->getboardnumber($_POST['board'])); // Die if the board doesn't exist. if ($binfo == null) { die("Specified board does not exist."); } //check for banned keywords if ($mod == false) { // First, flood protection $longip = ip2long($_SERVER['REMOTE_ADDR']); if ($db->postedwithintime($longip) == true) { THdie("You must wait a while before making another post."); } // This should have the cached version of banned keywords in an array named $spamblacklist. @(include THpath . '/unlinked/blacklist.php'); if (count($spamblacklist) > 0) { //The logic on this was entirely wrong. If you want to filter out certain things, set up wordfilters. This now (as of 12/16/12), stops the post.