mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
issue 70 apply spamfilter admin UI
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8867 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0f1ffbb83c
commit
9462e2c9d9
5 changed files with 98 additions and 17 deletions
|
|
@ -311,7 +311,7 @@
|
|||
|
||||
Context::set('pwd',$pwd);
|
||||
Context::set('layout','none');
|
||||
$this->setTemplateFile('config');
|
||||
$this->setTemplateFile('spGenaral');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,20 +2,8 @@
|
|||
<module>
|
||||
<grants />
|
||||
<permissions />
|
||||
<actions>
|
||||
<action name="dispSpamfilterAdminSetting" type="view" admin_index="true" standalone="true" />
|
||||
|
||||
<action name="procSpamfilterAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
|
||||
<action name="procSpamfilterAdminInsertDeniedIP" type="controller" standalone="true" ruleset="insertDeniedIp" />
|
||||
<action name="procSpamfilterAdminDeleteDeniedIP" type="controller" standalone="true" ruleset="deleteDeniedIp" />
|
||||
<action name="procSpamfilterAdminInsertDeniedWord" type="controller" standalone="true" ruleset="insertDeniedWord" />
|
||||
<action name="procSpamfilterAdminDeleteDeniedWord" type="controller" standalone="true" ruleset="deleteDeniedWord" />
|
||||
|
||||
<action name="procSpamfilterAdminInsertSetting" type="controller" standalone="true" ruleset="insertSetting" />
|
||||
|
||||
</actions>
|
||||
<menus>
|
||||
<menu name="spamFilter">
|
||||
<menu name="spamFilter" tyle="super">
|
||||
<title xml:lang="en">Spam Filter</title>
|
||||
<title xml:lang="ko">스팸필터</title>
|
||||
<title xml:lang="zh-CN">Spam Filter</title>
|
||||
|
|
@ -29,4 +17,16 @@
|
|||
<title xml:lang="tr">Spam Filter</title>
|
||||
</menu>
|
||||
</menus>
|
||||
<actions>
|
||||
<action name="dispSpamfilterAdminSetting" type="view" admin_index="true" standalone="true" menu_name="spamFilter" menu_index="true" />
|
||||
|
||||
<action name="procSpamfilterAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
|
||||
<action name="procSpamfilterAdminInsertDeniedIP" type="controller" standalone="true" ruleset="insertDeniedIp" />
|
||||
<action name="procSpamfilterAdminDeleteDeniedIP" type="controller" standalone="true" ruleset="deleteDeniedIp" />
|
||||
<action name="procSpamfilterAdminInsertDeniedWord" type="controller" standalone="true" ruleset="insertDeniedWord" />
|
||||
<action name="procSpamfilterAdminDeleteDeniedWord" type="controller" standalone="true" ruleset="deleteDeniedWord" />
|
||||
|
||||
<action name="procSpamfilterAdminInsertSetting" type="controller" standalone="true" ruleset="insertSetting" />
|
||||
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
10
modules/spamfilter/ruleset/insertSetting.xml
Normal file
10
modules/spamfilter/ruleset/insertSetting.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
<rule name="ip" type="regex" test="/^(\d{1,3}(?:.(\d{1,3}|\*)){3}\s*(\/\/.*)?[^.]*)*$/" />
|
||||
<rule name="word" type="regex" test="/(.*){1,125}" />
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="act" required="true" default="procSpamfilterAdminDeleteDeniedIP" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
@ -93,9 +93,10 @@
|
|||
**/
|
||||
function checkLimited() {
|
||||
$config = $this->getConfig();
|
||||
$limit_count = $config->limit_count?$config->limit_count:5;
|
||||
$interval = $config->interval;
|
||||
if(!$interval) return new Object();
|
||||
|
||||
if($config->limits != 'Y') return new Object();
|
||||
$limit_count = '3';
|
||||
$interval = '10';
|
||||
|
||||
$count = $this->getLogCount($interval);
|
||||
|
||||
|
|
|
|||
70
modules/spamfilter/tpl/spSpamFilter.html
Normal file
70
modules/spamfilter/tpl/spSpamFilter.html
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<!--%import("js/spamfilter_admin.js")-->
|
||||
<div class="content" id="content">
|
||||
|
||||
<form id="spamfilterDelete" action="" method="post">
|
||||
<input type="hidden" name="act" value="" />
|
||||
<input type="hidden" name="ipaddress" value="" />
|
||||
<input type="hidden" name="word" value="" />
|
||||
<input type="hidden" name="ruleset" value="">
|
||||
</form>
|
||||
<form action="" id="spamfilterInsert" class="form" ruleset="insertSetting">
|
||||
<input type="hidden" name="act" value="procSpamfilterAdminInsertSetting">
|
||||
<input type="hidden" name="module" value="spamfilter">
|
||||
<input type="hidden" name="ruleset" value="insertSetting">
|
||||
<input type="hidden" name="flag" value="">
|
||||
<h1 class="h1">Spam Filter</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q">{$lang->cmd_interval}</p>
|
||||
<p class="a">
|
||||
<input type="radio" name="limits" id="spamCond1_yes" value="Y" <!--@if($config->limits=='Y')-->checked="checked"<!--@end--> />
|
||||
<label for="spamCond1_yes">{$lang->yes}</label>
|
||||
<input type="radio" name="limits" id="spamCond1_no" value="N" <!--@if($config->limits!='Y')--> checked="checked"<!--@end--> /> <label for="spamCond1_no">{$lang->no}</label>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->cmd_check_trackback}</p>
|
||||
<p class="a">
|
||||
<input type="radio" name="check_trackback" id="spamCond2_yes" value="Y" <!--@if($config->check_trackback=='Y')--> checked="checked"<!--@end--> />
|
||||
<label for="spamCond2_yes">{$lang->yes}</label>
|
||||
<input type="radio" name="check_trackback" id="spamCond2_yes" value="N" <!--@if($config->check_trackback!='Y')--> checked="checked"<!--@end--> / > <label for="spamCond2_yes">{$lang->no}</label>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->cmd_denied_ip}</p>
|
||||
<div class="a">
|
||||
<ul class="textList">
|
||||
<!--@foreach($ip_list as $ipListKey)-->
|
||||
<li>{$ipListKey->ipaddress} <!--@if($ipListKey->description)-->// {$ipListKey->description} <!--@end-->
|
||||
<a href="#" onclick="doDeleteDeniedIP('{$ipListKey->ipaddress}')" class="side">삭제</a>
|
||||
</li>
|
||||
<!--@endforeach-->
|
||||
</ul>
|
||||
</div>
|
||||
<p class="a">
|
||||
<textarea rows="4" cols="42" name="ipaddressList" title="스팸 IP 추가"></textarea>
|
||||
<span class="btn small"><button type="button" onclick="doInsertDeniedSome('ipaddressList')">{$lang->add}</button></span>
|
||||
<span class="desc">{$lang->about_denied_ip}</span>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="spamKeyword">{$lang->cmd_denied_word}</label></p>
|
||||
<div class="a">
|
||||
<ul class="textList">
|
||||
<!--@foreach($word_list as $wordListKey)-->
|
||||
<li>{$wordListKey->word} <a href="#" onclick="doDeleteDeniedWord('{$wordListKey->word}')" class="side">삭제</a></li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
</div>
|
||||
<p class="a">
|
||||
<textarea rows="4" cols="42" name="wordList" title="스팸 키워드 추가"></textarea>
|
||||
<span class="btn small"><button type="button" onclick="doInsertDeniedSome('wordList')">{$lang->add}</button></span>
|
||||
<span class="desc">{$lang->about_denied_word}</span>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn medium"><input type="submit" value="Save" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue