示例#1
0
/*
 //You can see how this would be used (and even expand it to other fields if you wish), but we're not using it right now. - tyam
 if (strlen($_POST['subj'])<3)
 {
 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.