From 0b00b8348b2b829ae8f4c46134adf1babf35f907 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Mar 2007 07:34:11 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@244 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/lang/ko.lang.php | 8 ++++ modules/spamfilter/conf/module.xml | 1 + modules/spamfilter/lang/ko.lang.php | 8 ++++ modules/spamfilter/spamfilter.controller.php | 13 +++++++ modules/spamfilter/spamfilter.view.php | 5 +++ .../spamfilter/tpl.admin/denied_ip_list.html | 33 ++++++++++++++++ .../tpl.admin/denied_word_list.html | 33 ++++++++++++++++ .../tpl.admin/filter/insert_config.xml | 7 ++++ modules/spamfilter/tpl.admin/index.html | 38 ++++++------------- 9 files changed, 120 insertions(+), 26 deletions(-) create mode 100644 modules/spamfilter/tpl.admin/denied_ip_list.html create mode 100644 modules/spamfilter/tpl.admin/denied_word_list.html create mode 100644 modules/spamfilter/tpl.admin/filter/insert_config.xml diff --git a/common/lang/ko.lang.php b/common/lang/ko.lang.php index 210af67a8..a0559cddb 100644 --- a/common/lang/ko.lang.php +++ b/common/lang/ko.lang.php @@ -96,6 +96,14 @@ $lang->use = "사용"; $lang->notuse = "미사용"; + $lang->unit_sec = "초"; + $lang->unit_min = "분"; + $lang->unit_hour = "시"; + $lang->unit_day = "일"; + $lang->unit_week = "주"; + $lang->unit_month = "월"; + $lang->unit_year = "년"; + // xml filter에서 사용되는 javascript용 alert msg $lang->filter->isnull = '%s의 값을 입력해주세요'; $lang->filter->outofrange = '%s의 글자 길이를 맞추어 주세요.'; diff --git a/modules/spamfilter/conf/module.xml b/modules/spamfilter/conf/module.xml index 3b7dd03e0..db3432674 100644 --- a/modules/spamfilter/conf/module.xml +++ b/modules/spamfilter/conf/module.xml @@ -6,6 +6,7 @@ + diff --git a/modules/spamfilter/lang/ko.lang.php b/modules/spamfilter/lang/ko.lang.php index ebe1074ea..c43401fe8 100644 --- a/modules/spamfilter/lang/ko.lang.php +++ b/modules/spamfilter/lang/ko.lang.php @@ -5,8 +5,16 @@ * @desc : 한국어 언어팩 (기본적인 내용만 수록) **/ + // action 관련 $lang->cmd_denied_ip = "금지IP 목록"; $lang->cmd_denied_word = "금지단어 목록"; + // 일반 단어 + $lang->interval = "스팸 처리 간격"; + + // 설명문 + $lang->about_interval = "지정된 시간내에 다시 글이 등록이 되면 스팸으로 간주가 됩니다"; + + // 메세지 출력용 $lang->msg_alert_registered_spamer = '스패머로 등록되셨습니다'; ?> diff --git a/modules/spamfilter/spamfilter.controller.php b/modules/spamfilter/spamfilter.controller.php index b3210653a..6983be802 100644 --- a/modules/spamfilter/spamfilter.controller.php +++ b/modules/spamfilter/spamfilter.controller.php @@ -12,6 +12,19 @@ **/ function init() { } + + /** + * @brief 스팸필터 설정 + **/ + function procInsertConfig() { + // 기본 정보를 받음 + $args = Context::gets('interval'); + + // module Controller 객체 생성하여 입력 + $oModuleController = &getController('module'); + $output = $oModuleController->insertModuleConfig('spamfilter',$args); + return $output; + } /** * @brief 금지 IP등록 diff --git a/modules/spamfilter/spamfilter.view.php b/modules/spamfilter/spamfilter.view.php index 9bc02702a..5cf70668a 100644 --- a/modules/spamfilter/spamfilter.view.php +++ b/modules/spamfilter/spamfilter.view.php @@ -19,6 +19,11 @@ * @brief 스팸필터의 설정 화면 **/ function dispConfig() { + // 설정 정보를 받아옴 (module model 객체를 이용) + $oModuleModel = &getModel('module'); + $config = $oModuleModel->getModuleConfig('spamfilter'); + Context::set('config',$config); + // 템플릿 파일 지정 $this->setTemplateFile('index'); } diff --git a/modules/spamfilter/tpl.admin/denied_ip_list.html b/modules/spamfilter/tpl.admin/denied_ip_list.html new file mode 100644 index 000000000..a6dcc1f0c --- /dev/null +++ b/modules/spamfilter/tpl.admin/denied_ip_list.html @@ -0,0 +1,33 @@ + + + +
+ {$lang->total_count} : {number_format($total_count)} +
+ + + +
+ + + + + + + + + + + + + + + +
{$lang->no}{$lang->ipaddress}{$lang->regdate}{$lang->cmd_delete}
{$no}{$val->ipaddress}{zdate($val->regdate,"Y-m-d")}{$lang->cmd_delete}
+
+ + + + diff --git a/modules/spamfilter/tpl.admin/denied_word_list.html b/modules/spamfilter/tpl.admin/denied_word_list.html new file mode 100644 index 000000000..a6dcc1f0c --- /dev/null +++ b/modules/spamfilter/tpl.admin/denied_word_list.html @@ -0,0 +1,33 @@ + + + +
+ {$lang->total_count} : {number_format($total_count)} +
+ + + +
+ + + + + + + + + + + + + + + +
{$lang->no}{$lang->ipaddress}{$lang->regdate}{$lang->cmd_delete}
{$no}{$val->ipaddress}{zdate($val->regdate,"Y-m-d")}{$lang->cmd_delete}
+
+ + + + diff --git a/modules/spamfilter/tpl.admin/filter/insert_config.xml b/modules/spamfilter/tpl.admin/filter/insert_config.xml new file mode 100644 index 000000000..66b1422ee --- /dev/null +++ b/modules/spamfilter/tpl.admin/filter/insert_config.xml @@ -0,0 +1,7 @@ + +
+ + + + + diff --git a/modules/spamfilter/tpl.admin/index.html b/modules/spamfilter/tpl.admin/index.html index a6dcc1f0c..70224dffe 100644 --- a/modules/spamfilter/tpl.admin/index.html +++ b/modules/spamfilter/tpl.admin/index.html @@ -1,33 +1,19 @@ - -
- {$lang->total_count} : {number_format($total_count)} -
- - - -
+ - - - - + + - - - - - + - -
{$lang->no}{$lang->ipaddress}{$lang->regdate}{$lang->cmd_delete}{$lang->interval} {$lang->unit_sec}
{$no}{$val->ipaddress}{zdate($val->regdate,"Y-m-d")}{$lang->cmd_delete}{$lang->about_interval}
-
- - - - + + + + + + + +