コード例 #1
0
ファイル: thread.php プロジェクト: kamilpacaq/drydock
     //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.
     if (check_blacklist($_POST['body'], $spamblacklist)) {
         THdie("One of the phrases included in your post is not allowed.");
     }
     if (check_blacklist($_POST['link'], $spamblacklist)) {
         THdie("One of the phrases included in your post is not allowed.");
     }
     if (check_blacklist($_POST['nombre'], $spamblacklist)) {
         THdie("One of the phrases included in your post is not allowed.");
     }
 }
 // The "email" field will have a big "IF YOU ARE HUMAN DO NOT FILL THIS IN" next to it.  Bots might get tricked.
 if (THvc == 2 && isset($_POST['email']) && $_POST['email'] != "") {
     // get out spambot >:[
     $redhammer = new ThornModDBI();
     $redhammer->banip($longip, 0, "Suspected bot.", "", "Suspected bot.", $_POST['body'], 4, "autoban");
     THdie("Abnormal reply");
     // :getprophet:
 }
 // Prevent people from posting new threads if it's the mod or news board
 if ($binfo['id'] == THmodboard || $binfo['id'] == Thnewsboard) {
     THdie("POnonewth");
 }
 // Prevent people from posting to boards that require registration
 // when they're not logged in
 if ($binfo['requireregistration'] == true) {
     if ($_SESSION['username'] == false) {
         THdie("POnonewth");
     }
     // Set the posting username to be the user stored in our session info
     $_POST['nombre'] = $_SESSION['username'];
コード例 #2
0
ファイル: admin.php プロジェクト: taqsuqs/drydock
    $ip4 = "0";
    if ($_POST['ipsub'] < 1) {
        $ip4 = $_POST['ip4'];
    }
    // Class C subnet ban (ipsub value of 2)
    $ip3 = "0";
    if ($_POST['ipsub'] < 2) {
        $ip3 = $_POST['ip3'];
    }
    $ip = ip2long($_POST['ip1'] . "." . $_POST['ip2'] . "." . $ip3 . "." . $ip4);
    if ($ip == -1 || $ip == false) {
        THdie("ADbanbadip");
    }
    $banreason = 'This is an admin ban, you were not banned for a specific post.';
    $bannedby = $_SESSION['username'] . " via admin ban panel";
    $db->banip($ip, $_POST['ipsub'] == "on", $banreason, 'admin ban', $_POST['adminreason'], "", $_POST['duration'], $bannedby);
    header("Location: " . THurl . "admin.php?a=x");
} elseif ($_GET['t'] == "ux") {
    $reason = $_SESSION['username'] . " via admin ban panel";
    if (isset($_GET['reason'])) {
        $reason = $_GET['reason'];
    }
    $bans = $db->getallbans();
    foreach ($bans as $ban) {
        if ($_POST['del' . $ban['id']]) {
            $db->delban($ban['id'], $reason);
        }
    }
    header("Location: " . THurl . "admin.php?a=x");
} elseif ($_GET['t'] == "lx") {
    if (isset($_POST['ip'])) {