32 $args =
new stdClass();
33 $args->sort_index =
"regdate";
46 $ipaddress = $_SERVER[
'REMOTE_ADDR'];
51 $count = count($ip_list);
52 for($i=0;$i<$count;$i++)
54 $ip = str_replace(
'.',
'\.', str_replace(
'*',
'(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',$ip_list[$i]->ipaddress));
55 if(preg_match(
'/^'.$ip.
'$/', $ipaddress, $matches))
return new BaseObject(-1,
'msg_alert_registered_denied_ip');
66 $args =
new stdClass();
67 $args->sort_index =
"hit";
80 if(!count($word_list))
return new BaseObject();
82 $count = count($word_list);
83 for($i=0;$i<$count;$i++)
85 $word = $word_list[$i]->word;
86 if(preg_match(
'/'.preg_quote($word,
'/').
'/is', $text))
104 if($config->limits !=
'Y')
return new BaseObject();
110 $ipaddress = $_SERVER[
'REMOTE_ADDR'];
112 if($count>=$limit_count)
115 $oSpamFilterController->insertIP($ipaddress,
'AUTO-DENIED : Over limit');
116 return new BaseObject(-1,
'msg_alert_registered_denied_ip');
131 $oSpamFilterController->insertLog();
143 $oTrackbackModel =
getModel(
'trackback');
144 $count = $oTrackbackModel->getTrackbackCountByIPAddress(
$document_srl, $_SERVER[
'REMOTE_ADDR']);
145 if($count>0)
return new BaseObject(-1,
'msg_alert_trackback_denied');
155 if(!$ipaddress) $ipaddress = $_SERVER[
'REMOTE_ADDR'];
157 $args->ipaddress = $ipaddress;
158 $args->regdate = date(
"YmdHis", $_SERVER[
'REQUEST_TIME']-$time);
getController($module_name)
The Model class of the spamfilter module.
getLogCount($time=60, $ipaddress='')
Return the number of logs recorded within the interval for the specified IPaddress.
isDeniedWord($text)
Check if the text, received as a parameter, is banned or not.
checkLimited($isMessage=FALSE)
Check the specified time.
The parent class of the spamfilter module.
getConfig()
Return the user setting values of the Spam filter module.
isDeniedIP()
Check if the ipaddress is in the list of banned IP addresses.
isInsertedTrackback($document_srl)
Check if the trackbacks have already been registered to a particular article.
getDeniedIPList()
Return the list of registered IP addresses which were banned.
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
getDeniedWordList()
Return the list of registered Words which were banned.