mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@242 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bec327d337
commit
a4e2f31a53
6 changed files with 83 additions and 17 deletions
|
|
@ -2,7 +2,9 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispContent" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispConfig" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispDeniedIPList" type="view" standalone="true" />
|
||||
<action name="dispDeniedWordList" type="view" standalone="true" />
|
||||
|
||||
<action name="procInsertDeniedIP" type="controller" standalone="true" />
|
||||
<action name="procDeleteDeniedIP" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<query id="getSpammerList" action="select">
|
||||
<query id="getDeniedIPList" action="select">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_ip" />
|
||||
</tables>
|
||||
|
|
@ -12,6 +12,38 @@
|
|||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 IP등록
|
||||
**/
|
||||
function procInsertDeniedIP() {
|
||||
$ipaddress = Context::get('ipaddress');
|
||||
return $this->insertIP($ipaddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 IP삭제
|
||||
**/
|
||||
function procDeleteDeniedIP() {
|
||||
$ipaddress = Context::get('ipaddress');
|
||||
return $this->deleteIP($ipaddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 Word등록
|
||||
**/
|
||||
function procInsertDeniedWord() {
|
||||
$word = Context::get('word');
|
||||
return $this->insertWord($word);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 Word삭제
|
||||
**/
|
||||
function procDeleteDeniedWord() {
|
||||
$word = Context::get('word');
|
||||
return $this->deleteWord($word);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief IP 등록
|
||||
|
|
|
|||
|
|
@ -14,13 +14,26 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 등록된 스패머의 목록을 return
|
||||
* @brief 등록된 금지 IP의 목록을 return
|
||||
**/
|
||||
function getSpammerList() {
|
||||
function getDeniedIPList() {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->sort_index = "regdate";
|
||||
$args->page = Context::get('page')?Context::get('page'):1;
|
||||
$output = $oDB->executeQuery('spamfilter.getSpammerList', $args);
|
||||
$output = $oDB->executeQuery('spamfilter.getDeniedIPList', $args);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) return array($output->data);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 등록된 금지 Word 의 목록을 return
|
||||
**/
|
||||
function getDeniedWordList() {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->sort_index = "regdate";
|
||||
$args->page = Context::get('page')?Context::get('page'):1;
|
||||
$output = $oDB->executeQuery('spamfilter.getDeniedWordList', $args);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) return array($output->data);
|
||||
return $output->data;
|
||||
|
|
|
|||
|
|
@ -16,20 +16,39 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 모드에서 보여줄 화면
|
||||
* @brief 스팸필터의 설정 화면
|
||||
**/
|
||||
function dispContent() {
|
||||
// 등록된 스패머의 목록을 가져옴
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$spammer_list = $oSpamFilterModel->getSpammerList();
|
||||
|
||||
Context::set('spammer_list', $spammer_list);
|
||||
Context::set('total_count', count($spammer_list));
|
||||
|
||||
function dispConfig() {
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 목록 출력
|
||||
**/
|
||||
function dispDeniedIPList() {
|
||||
// 등록된 금지 IP 목록을 가져옴
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$ip_list = $oSpamFilterModel->getDeniedIPList();
|
||||
|
||||
Context::set('ip_list', $ip_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('denied_ip_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 목록 출력
|
||||
**/
|
||||
function dispDeniedWordList() {
|
||||
// 등록된 금지 Word 목록을 가져옴
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$word_list = $oSpamFilterModel->getDeniedWordList();
|
||||
|
||||
Context::set('word_list', $word_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('denied_word_list');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div style="margin-bottom:20px;">
|
||||
<span <!--@if($act=='dispConfig')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispModuleConfig','module_srl','')}">{$lang->cmd_module_config}</a>]</span>
|
||||
<span <!--@if($act=='dispDeniedIP')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispDeniedIP')}">{$lang->cmd_denied_ip}</a>]</span>
|
||||
<span <!--@if($act=='dispDeniedWord')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispDeniedWord')}">{$lang->cmd_denied_word}</a>]</span>
|
||||
<span <!--@if($act=='dispConfig')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispConfig','module_srl','')}">{$lang->cmd_module_config}</a>]</span>
|
||||
<span <!--@if($act=='dispDeniedIPList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispDeniedIPList')}">{$lang->cmd_denied_ip}</a>]</span>
|
||||
<span <!--@if($act=='dispDeniedWordList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispDeniedWordList')}">{$lang->cmd_denied_word}</a>]</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue