mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
#19029741 - 스팸필터 IP차단시 메모 남길 수 있도록 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7612 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
480c268ff9
commit
54e75da57f
7 changed files with 23 additions and 5 deletions
|
|
@ -4,6 +4,7 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="ipaddress" var="ipaddress" notnull="notnull" />
|
||||
<column name="description" var="description" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<table name="spamfilter_denied_ip">
|
||||
<column name="ipaddress" type="varchar" size="250" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="description" type="varchar" size="250" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -32,9 +32,10 @@
|
|||
**/
|
||||
function procSpamfilterAdminInsertDeniedIP() {
|
||||
$ipaddress = Context::get('ipaddress');
|
||||
$description = Context::get('description');
|
||||
|
||||
$oSpamfilterController = &getController('spamfilter');
|
||||
return $oSpamfilterController->insertIP($ipaddress);
|
||||
return $oSpamfilterController->insertIP($ipaddress, $description);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@
|
|||
if(!$oDB->isColumnExists('spamfilter_denied_word', 'hit')) return true;
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_word', 'latest_hit')) return true;
|
||||
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'description')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -90,6 +92,10 @@
|
|||
$oDB->addIndex('spamfilter_denied_word','idx_latest_hit', 'latest_hit');
|
||||
}
|
||||
|
||||
if(!$oDB->isColumnExists('spamfilter_denied_ip', 'description')) {
|
||||
$oDB->addColumn('spamfilter_denied_ip','description','varchar', 250);
|
||||
}
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@
|
|||
// 제목과 블로그이름이 동일할 경우 최근 6시간내의 ip를 조사하여 삭제하고 금지ip로 등록
|
||||
if($obj->title == $obj->excerpt) {
|
||||
$oTrackbackController->deleteTrackbackSender(60*60*6, $ipaddress, $obj->url, $obj->blog_name, $obj->title, $obj->excerpt);
|
||||
$this->insertIP($ipaddress.'.*');
|
||||
$this->insertIP($ipaddress.'.*', 'AUTO-DENIED : trackback.insertTrackback');
|
||||
return new Object(-1,'msg_alert_trackback_denied');
|
||||
}
|
||||
|
||||
|
|
@ -153,8 +153,9 @@
|
|||
* @brief IP 등록
|
||||
* 등록된 IP는 스패머로 간주
|
||||
**/
|
||||
function insertIP($ipaddress) {
|
||||
function insertIP($ipaddress, $description = null) {
|
||||
$args->ipaddress = $ipaddress;
|
||||
if($description) $args->description = $description;
|
||||
|
||||
return executeQuery('spamfilter.insertDeniedIP', $args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@
|
|||
// 정해진 시간보다 클 경우 금지 ip로 등록
|
||||
if($count>=$limit_count) {
|
||||
$oSpamFilterController = &getController('spamfilter');
|
||||
$oSpamFilterController->insertIP($ipaddress);
|
||||
$oSpamFilterController->insertIP($ipaddress, 'AUTO-DENIED : Over limit');
|
||||
return new Object(-1, 'msg_alert_registered_denied_ip');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@
|
|||
<p>{$lang->about_denied_ip}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->description}</div></th>
|
||||
<td>
|
||||
<input type="text" name="description" value="" class="inputTypeText" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="button">
|
||||
<span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
|
|
@ -33,6 +39,7 @@
|
|||
<tr>
|
||||
<th scope="col"><div>{$lang->no}</div></th>
|
||||
<th scope="col"><div>{$lang->ipaddress}</div></th>
|
||||
<th scope="col"><div>{$lang->description}</div></th>
|
||||
<th scope="col"><div>{$lang->regdate}</div></th>
|
||||
<th scope="col"><div>{$lang->cmd_delete}</div></th>
|
||||
</tr>
|
||||
|
|
@ -41,7 +48,8 @@
|
|||
<!--@foreach($ip_list as $no => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<td>{count($ip_list)-$no}</td>
|
||||
<td class="wide">{$val->ipaddress}</td>
|
||||
<td>{$val->ipaddress}</td>
|
||||
<td class="wide">{$val->description}</td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td><a href="#" onclick="doDeleteDeniedIP('{$val->ipaddress}');return false;" title="{$lang->cmd_delete}" class="buttonSet buttonDelete"><span>{$lang->cmd_delete}</span></a></td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue