From 61b7b47d6c3bc8807d52d5e4642c51bf8c49603c Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 5 Mar 2007 06:48:49 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@240 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/spam_filter/conf/info.xml | 2 +- modules/spamfilter/lang/ko.lang.php | 2 + modules/spamfilter/queries/getSpammerList.xml | 17 +++++++ modules/spamfilter/spamfilter.model.php | 11 +++++ modules/spamfilter/spamfilter.view.php | 13 +++++ modules/spamfilter/tpl.admin/header.html | 4 ++ modules/spamfilter/tpl.admin/index.html | 48 +++++++++++++++++++ 7 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 modules/spamfilter/queries/getSpammerList.xml create mode 100644 modules/spamfilter/tpl.admin/header.html create mode 100644 modules/spamfilter/tpl.admin/index.html diff --git a/addons/spam_filter/conf/info.xml b/addons/spam_filter/conf/info.xml index 679e6d6d8..8a2b0e4e7 100644 --- a/addons/spam_filter/conf/info.xml +++ b/addons/spam_filter/conf/info.xml @@ -7,7 +7,7 @@ zero 스팸 필터링을 담당합니다. - 자세한 설정은 <a href="./?module=admin&mo=spamfiltet">스팸필터 모듈</a>에서 해주세요. + 자세한 설정은 <a href="./?module=admin&mo=spamfilter&act=dispContent">스팸필터 모듈</a>에서 해주세요. do spam filtering diff --git a/modules/spamfilter/lang/ko.lang.php b/modules/spamfilter/lang/ko.lang.php index 6e290cf53..b11c841aa 100644 --- a/modules/spamfilter/lang/ko.lang.php +++ b/modules/spamfilter/lang/ko.lang.php @@ -5,5 +5,7 @@ * @desc : 한국어 언어팩 (기본적인 내용만 수록) **/ + $lang->cmd_spamer_list = "등록된 스패머 목록"; + $lang->msg_alert_registered_spamer = '스패머로 등록되셨습니다'; ?> diff --git a/modules/spamfilter/queries/getSpammerList.xml b/modules/spamfilter/queries/getSpammerList.xml new file mode 100644 index 000000000..391ee305e --- /dev/null +++ b/modules/spamfilter/queries/getSpammerList.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/modules/spamfilter/spamfilter.model.php b/modules/spamfilter/spamfilter.model.php index 075e0666e..402291966 100644 --- a/modules/spamfilter/spamfilter.model.php +++ b/modules/spamfilter/spamfilter.model.php @@ -13,6 +13,17 @@ function init() { } + /** + * @brief 등록된 스패머의 목록을 return + **/ + function getSpammerList() { + $oDB = &DB::getInstance(); + $args->sort_index = "regdate"; + $args->list_count = 50; + $args->page = Context::get('page')?Context::get('page'):1; + return $oDB->executeQuery('spamfilter.getSpammerList', $args); + } + /** * @brief 지정된 IPaddress의 특정 시간대 내의 로그 수를 return **/ diff --git a/modules/spamfilter/spamfilter.view.php b/modules/spamfilter/spamfilter.view.php index 306839793..a8d9ed0c7 100644 --- a/modules/spamfilter/spamfilter.view.php +++ b/modules/spamfilter/spamfilter.view.php @@ -11,6 +11,7 @@ * @brief 초기화 **/ function init() { + // 템플릿 경로 지정 $this->setTemplatePath($this->module_path.'tpl.admin'); } @@ -18,6 +19,18 @@ * @brief 관리자 모드에서 보여줄 화면 **/ function dispContent() { + // 등록된 스패머의 목록을 가져옴 + $oSpamFilterModel = &getModel('spamfilter'); + $output = $oSpamFilterModel->getSpammerList(); + + Context::set('total_count', $output->total_count); + Context::set('total_page', $output->total_page); + Context::set('page', $output->page); + Context::set('document_list', $output->data); + Context::set('page_navigation', $output->page_navigation); + + // 템플릿 파일 지정 + $this->setTemplateFile('index'); } diff --git a/modules/spamfilter/tpl.admin/header.html b/modules/spamfilter/tpl.admin/header.html new file mode 100644 index 000000000..11fd3d4e6 --- /dev/null +++ b/modules/spamfilter/tpl.admin/header.html @@ -0,0 +1,4 @@ +
+ style="font-weight:bold">[{$lang->cmd_spamer_list}] + style="font-weight:bold">[{$lang->cmd_module_config}] +
diff --git a/modules/spamfilter/tpl.admin/index.html b/modules/spamfilter/tpl.admin/index.html new file mode 100644 index 000000000..e8a873e62 --- /dev/null +++ b/modules/spamfilter/tpl.admin/index.html @@ -0,0 +1,48 @@ + + + +
+ {number_format($total_count)}, + {$lang->page_count} : {number_format($page)} / {number_format($total_page)} +
+ + + +
+
+ + + + + + + + + + + + + + +
{$lang->no}{$lang->ipaddress}{$lang->regdate}{$lang->cmd_delete}
{$no}{$val->ipaddress}{zdate($val->regdate,"Y-m-d")}{$lang->cmd_delete}
+ + + +
+ [{$lang->cmd_insert}] +
+ + +
+ [{$lang->first_page}] + + + + {$page_no} + + [{$page_no}] + + + + [{$lang->last_page}] +