Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
831 florian 1
<?php
2
 
3
////////////////////////////////////////////////////////////////////////////////
4
//                                                                            //
5
//   Copyright (C) 2006  Phorum Development Team                              //
6
//   http://www.phorum.org                                                    //
7
//                                                                            //
8
//   This program is free software. You can redistribute it and/or modify     //
9
//   it under the terms of either the current Phorum License (viewable at     //
10
//   phorum.org) or the Phorum License that was distributed with this file    //
11
//                                                                            //
12
//   This program is distributed in the hope that it will be useful,          //
13
//   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
14
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
15
//                                                                            //
16
//   You should have received a copy of the Phorum License                    //
17
//   along with this program.                                                 //
18
////////////////////////////////////////////////////////////////////////////////
19
 
20
if(!defined("PHORUM")) return;
21
 
22
// For phorum_check_ban_lists().
23
include_once("./include/profile_functions.php");
24
 
25
// Create a list of the bans that we want to check.
26
$bans = array();
27
 
28
// Add checks for registered users.
29
if ($PHORUM["DATA"]["LOGGEDIN"]) {
30
    $bans[] = array($PHORUM["user"]["username"], PHORUM_BAD_NAMES);
31
    $bans[] = array($PHORUM["user"]["email"], PHORUM_BAD_EMAILS);
32
    $bans[] = array($PHORUM["user"]["user_id"], PHORUM_BAD_USERID);
33
}
34
// Add checks for unregistered users.
35
else {
36
    $bans[] = array($message["author"], PHORUM_BAD_NAMES);
37
    $bans[] = array($message["email"], PHORUM_BAD_EMAILS);
38
}
39
 
40
// Add check for IP-address bans.
41
$bans[] = array(NULL, PHORUM_BAD_IPS);
42
 
43
// Add check for Illegal Content (SPAM) bans.
44
$bans[] = array($message["subject"], PHORUM_BAD_SPAM_WORDS);
45
$bans[] = array($message["body"], PHORUM_BAD_SPAM_WORDS);
46
 
47
 
48
// Run the checks.
49
$msg = phorum_check_bans($bans);
50
if (!is_null($msg)) {
51
    $PHORUM["DATA"]["MESSAGE"] = $msg;
52
    $error_flag = true;
53
}
54
 
55
?>