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@1200 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
46ceabcbb9
commit
3ed4516b8a
29 changed files with 618 additions and 0 deletions
8
modules/counter/conf/info.xml
Normal file
8
modules/counter/conf/info.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module version="0.1">
|
||||
<title xml:lang="ko">기본 카운터</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<description xml:lang="ko">기본 접속 통계 프로그램입니다.</description>
|
||||
</author>
|
||||
</module>
|
||||
7
modules/counter/conf/module.xml
Normal file
7
modules/counter/conf/module.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispCounterAdminIndex" type="view" admin_index="true" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
8
modules/counter/lang/ko.lang.php
Normal file
8
modules/counter/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/counter/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
|
||||
?>
|
||||
8
modules/counter/queries/deleteDeniedIP.xml
Normal file
8
modules/counter/queries/deleteDeniedIP.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteDeniedIP" action="delete">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_ip" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/counter/queries/deleteDeniedWord.xml
Normal file
8
modules/counter/queries/deleteDeniedWord.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteDeniedWord" action="delete">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_word" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="word" var="word" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/counter/queries/getDeniedIPList.xml
Normal file
11
modules/counter/queries/getDeniedIPList.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getDeniedIPList" action="select">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_ip" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<navigation>
|
||||
<index var="sort_index" default="regdate" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
11
modules/counter/queries/getDeniedWordList.xml
Normal file
11
modules/counter/queries/getDeniedWordList.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getDeniedWordList" action="select">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_word" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<navigation>
|
||||
<index var="sort_index" default="regdate" order="desc" />
|
||||
</navigation>
|
||||
</query>
|
||||
12
modules/counter/queries/getLogCount.xml
Normal file
12
modules/counter/queries/getLogCount.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getLogCount" action="select">
|
||||
<tables>
|
||||
<table name="spamfilter_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" filter="number" notnull="notnull" />
|
||||
<condition operation="more" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/counter/queries/insertDeniedIP.xml
Normal file
9
modules/counter/queries/insertDeniedIP.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="insertDeniedIP" action="insert">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_ip" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="ipaddress" var="ipaddress" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
9
modules/counter/queries/insertDeniedWord.xml
Normal file
9
modules/counter/queries/insertDeniedWord.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="insertDeniedIP" action="insert">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_word" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="word" var="word" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
10
modules/counter/queries/insertLog.xml
Normal file
10
modules/counter/queries/insertLog.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="insertLog" action="insert">
|
||||
<tables>
|
||||
<table name="spamfilter_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="spamfilter_log_srl" default="sequence()"/>
|
||||
<column name="ipaddress" default="ipaddress()" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
11
modules/counter/queries/isDeniedIP.xml
Normal file
11
modules/counter/queries/isDeniedIP.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="isDeniedIP" action="select">
|
||||
<tables>
|
||||
<table name="spamfilter_denied_ip" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
4
modules/counter/schemas/spamfilter_denied_ip.xml
Normal file
4
modules/counter/schemas/spamfilter_denied_ip.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<table name="spamfilter_denied_ip">
|
||||
<column name="ipaddress" type="varchar" size="250" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
</table>
|
||||
4
modules/counter/schemas/spamfilter_denied_word.xml
Normal file
4
modules/counter/schemas/spamfilter_denied_word.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<table name="spamfilter_denied_word">
|
||||
<column name="word" type="varchar" size="250" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
</table>
|
||||
5
modules/counter/schemas/spamfilter_log.xml
Normal file
5
modules/counter/schemas/spamfilter_log.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<table name="spamfilter_log">
|
||||
<column name="spamfilter_log_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="ipaddress" type="varchar" size="250" notnull="notnull" index="idx_ipaddress" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
</table>
|
||||
43
modules/counter/spamfilter.class.php
Normal file
43
modules/counter/spamfilter.class.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* @class spamfilter
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief spamfilter 모듈의 high class
|
||||
**/
|
||||
|
||||
class spamfilter extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('spamfilter', 'view', 'dispSpamfilterAdminConfig');
|
||||
$oModuleController->insertActionForward('spamfilter', 'view', 'dispSpamfilterAdminDeniedIPList');
|
||||
$oModuleController->insertActionForward('spamfilter', 'view', 'dispSpamfilterAdminDeniedWordList');
|
||||
//$oModuleController->insertActionForward('spamfilter', 'controller', 'procSpamfilterAdminInsertConfig');
|
||||
//$oModuleController->insertActionForward('spamfilter', 'controller', 'procSpamfilterAdminInsertDeniedIP');
|
||||
//$oModuleController->insertActionForward('spamfilter', 'controller', 'procSpamfilterAdminDeleteDeniedIP');
|
||||
//$oModuleController->insertActionForward('spamfilter', 'controller', 'procSpamfilterAdminInsertDeniedWord');
|
||||
//$oModuleController->insertActionForward('spamfilter', 'controller', 'procSpamfilterAdminDeleteDeniedWord');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function moduleIsInstalled() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
115
modules/counter/spamfilter.controller.php
Normal file
115
modules/counter/spamfilter.controller.php
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
/**
|
||||
* @class spamfilterController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief spamfilter 모듈의 controller class
|
||||
**/
|
||||
|
||||
class spamfilterController extends spamfilter {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스팸필터 설정
|
||||
**/
|
||||
function procSpamfilterAdminInsertConfig() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('interval','limit_count','check_trackback');
|
||||
if($args->check_trackback!='Y') $args->check_trackback = 'N';
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('spamfilter',$args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 IP등록
|
||||
**/
|
||||
function procSpamfilterAdminInsertDeniedIP() {
|
||||
$ipaddress = Context::get('ipaddress');
|
||||
return $this->insertIP($ipaddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 IP삭제
|
||||
**/
|
||||
function procSpamfilterAdminDeleteDeniedIP() {
|
||||
$ipaddress = Context::get('ipaddress');
|
||||
return $this->deleteIP($ipaddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 Word등록
|
||||
**/
|
||||
function procSpamfilterAdminInsertDeniedWord() {
|
||||
$word = Context::get('word');
|
||||
return $this->insertWord($word);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 Word삭제
|
||||
**/
|
||||
function procSpamfilterAdminDeleteDeniedWord() {
|
||||
$word = Context::get('word');
|
||||
return $this->deleteWord($word);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief IP 등록
|
||||
* 등록된 IP는 스패머로 간주
|
||||
**/
|
||||
function insertIP($ipaddress) {
|
||||
$args->ipaddress = $ipaddress;
|
||||
return executeQuery('spamfilter.insertDeniedIP', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief IP 제거
|
||||
* 스패머로 등록된 IP를 제거
|
||||
**/
|
||||
function deleteIP($ipaddress) {
|
||||
if(!$ipaddress) return;
|
||||
|
||||
$args->ipaddress = $ipaddress;
|
||||
return executeQuery('spamfilter.deleteDeniedIP', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스팸단어 등록
|
||||
* 등록된 단어가 포함된 글은 스팸글로 간주
|
||||
**/
|
||||
function insertWord($word) {
|
||||
if(!$word) return;
|
||||
|
||||
$args->word = $word;
|
||||
return executeQuery('spamfilter.insertDeniedWord', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스팸단어 제거
|
||||
* 스팸 단어로 등록된 단어 제거
|
||||
**/
|
||||
function deleteWord($word) {
|
||||
if(!$word) return;
|
||||
|
||||
$args->word = $word;
|
||||
return executeQuery('spamfilter.deleteDeniedWord', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 로그 등록
|
||||
* 현 접속 IP를 로그에 등록, 로그의 간격이 특정 시간 이내일 경우 도배로 간주하여
|
||||
* 스패머로 등록할 수 있음
|
||||
**/
|
||||
function insertLog() {
|
||||
$output = executeQuery('spamfilter.insertLog');
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
73
modules/counter/spamfilter.model.php
Normal file
73
modules/counter/spamfilter.model.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
/**
|
||||
* @class spamfilterModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief spamfilter 모듈의 Model class
|
||||
**/
|
||||
|
||||
class spamfilterModel extends spamfilter {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스팸필터 모듈의 사용자 설정 값 return
|
||||
**/
|
||||
function getConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
return $oModuleModel->getModuleConfig('spamfilter');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 등록된 금지 IP의 목록을 return
|
||||
**/
|
||||
function getDeniedIPList() {
|
||||
$args->sort_index = "regdate";
|
||||
$args->page = Context::get('page')?Context::get('page'):1;
|
||||
$output = executeQuery('spamfilter.getDeniedIPList', $args);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) return array($output->data);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 인자로 넘겨진 ipaddress가 금지 ip인지 체크하여 return
|
||||
**/
|
||||
function isDeniedIP($ipaddress) {
|
||||
$args->ipaddress = $ipaddress;
|
||||
$output = executeQuery('spamfilter.isDeniedIP', $args);
|
||||
if($output->data->count>0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 등록된 금지 Word 의 목록을 return
|
||||
**/
|
||||
function getDeniedWordList() {
|
||||
$args->sort_index = "regdate";
|
||||
$output = executeQuery('spamfilter.getDeniedWordList', $args);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) return array($output->data);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 지정된 IPaddress의 특정 시간대 내의 로그 수를 return
|
||||
**/
|
||||
function getLogCount($time = 60, $ipaddress='') {
|
||||
if(!$ipaddress) $ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$args->ipaddress = $ipaddress;
|
||||
$args->regdate = date("YmdHis", time()-$time);
|
||||
$output = executeQuery('spamfilter.getLogCount', $args);
|
||||
$count = $output->data->count;
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
59
modules/counter/spamfilter.view.php
Normal file
59
modules/counter/spamfilter.view.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* @class spamfilterView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief spamfilter 모듈의 View class
|
||||
**/
|
||||
|
||||
class spamfilterView extends spamfilter {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
// 템플릿 경로 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스팸필터의 설정 화면
|
||||
**/
|
||||
function dispSpamfilterAdminConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('spamfilter');
|
||||
Context::set('config',$config);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 목록 출력
|
||||
**/
|
||||
function dispSpamfilterAdminDeniedIPList() {
|
||||
// 등록된 금지 IP 목록을 가져옴
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$ip_list = $oSpamFilterModel->getDeniedIPList();
|
||||
|
||||
Context::set('ip_list', $ip_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('denied_ip_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 목록 출력
|
||||
**/
|
||||
function dispSpamfilterAdminDeniedWordList() {
|
||||
// 등록된 금지 Word 목록을 가져옴
|
||||
$oSpamFilterModel = &getModel('spamfilter');
|
||||
$word_list = $oSpamFilterModel->getDeniedWordList();
|
||||
|
||||
Context::set('word_list', $word_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('denied_word_list');
|
||||
}
|
||||
}
|
||||
?>
|
||||
49
modules/counter/tpl/denied_ip_list.html
Normal file
49
modules/counter/tpl/denied_ip_list.html
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<!--%import("filter/insert_denied_ip.xml")-->
|
||||
<!--%import("filter/delete_denied_ip.xml")-->
|
||||
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<!-- 스패머 정보 -->
|
||||
<div>
|
||||
{$lang->total_count} : {count($ip_list)}
|
||||
</div>
|
||||
|
||||
<!-- xml js filter를 이용하기 위한 데이터 전달용 form -->
|
||||
<form id="fo_denied_ip" action="./" method="get">
|
||||
<input type="hidden" name="ipaddress" value="" />
|
||||
</form>
|
||||
|
||||
<!-- 목록 -->
|
||||
<div>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>{$lang->no}</th>
|
||||
<th>{$lang->ipaddress}</th>
|
||||
<th>{$lang->regdate}</th>
|
||||
<th>{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
<!--@foreach($ip_list as $no => $val)-->
|
||||
<tr>
|
||||
<td>{count($ip_list)-$no}</td>
|
||||
<td>{$val->ipaddress}</td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td><a href="#" onclick="doDeleteDeniedIP('{$val->ipaddress}');return false;">{$lang->cmd_delete}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 수동 추가 -->
|
||||
<div>
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_denied_ip)">
|
||||
<div>
|
||||
{$lang->denied_ip}
|
||||
<input type="text" name="ipaddress" value="" />
|
||||
<input type="submit" value="{$lang->cmd_insert}" />
|
||||
</div>
|
||||
<div>
|
||||
{$lang->about_denied_ip}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
50
modules/counter/tpl/denied_word_list.html
Normal file
50
modules/counter/tpl/denied_word_list.html
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<!--#include("header.html")-->
|
||||
|
||||
<!--%import("filter/insert_denied_word.xml")-->
|
||||
<!--%import("filter/delete_denied_word.xml")-->
|
||||
|
||||
<!-- 스패머 정보 -->
|
||||
<div>
|
||||
{$lang->total_count} : {count($word_list)}
|
||||
</div>
|
||||
|
||||
<!-- xml js filter를 이용하기 위한 데이터 전달용 form -->
|
||||
<form id="fo_denied_word" action="./" method="get">
|
||||
<input type="hidden" name="word" value="" />
|
||||
</form>
|
||||
|
||||
<!-- 목록 -->
|
||||
<div>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>{$lang->no}</th>
|
||||
<th>{$lang->word}</th>
|
||||
<th>{$lang->regdate}</th>
|
||||
<th>{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
<!--@foreach($word_list as $no => $val)-->
|
||||
<tr>
|
||||
<td>{count($word_list)-$no}</td>
|
||||
<td>{$val->word}</td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td><a href="#" onclick="doDeleteDeniedWord('{$val->word}');return false;">{$lang->cmd_delete}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 수동 추가 -->
|
||||
<div>
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_denied_word)">
|
||||
<div>
|
||||
{$lang->word}
|
||||
<input type="text" name="word" value="" />
|
||||
<input type="submit" value="{$lang->cmd_insert}" />
|
||||
</div>
|
||||
<div>
|
||||
{$lang->about_denied_word}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
7
modules/counter/tpl/filter/delete_denied_ip.xml
Normal file
7
modules/counter/tpl/filter/delete_denied_ip.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<filter name="delete_denied_ip" module="spamfilter" act="procSpamfilterAdminDeleteDeniedIP" confirm_msg_code="confirm_delete">
|
||||
<form />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
7
modules/counter/tpl/filter/delete_denied_word.xml
Normal file
7
modules/counter/tpl/filter/delete_denied_word.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<filter name="delete_denied_word" module="spamfilter" act="procSpamfilterAdminDeleteDeniedWord" confirm_msg_code="confirm_delete">
|
||||
<form />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
7
modules/counter/tpl/filter/insert_config.xml
Normal file
7
modules/counter/tpl/filter/insert_config.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<filter name="insert_config" module="spamfilter" act="procSpamfilterAdminInsertConfig" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
12
modules/counter/tpl/filter/insert_denied_ip.xml
Normal file
12
modules/counter/tpl/filter/insert_denied_ip.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<filter name="insert_denied_ip" module="spamfilter" act="procSpamfilterAdminInsertDeniedIP" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="ipaddress" required="true" minlength="4" maxlength="250" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param param="ipaddress" target="ipaddress" />
|
||||
</parameter>
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
12
modules/counter/tpl/filter/insert_denied_word.xml
Normal file
12
modules/counter/tpl/filter/insert_denied_word.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<filter name="insert_denied_word" module="spamfilter" act="procSpamfilterAdminInsertDeniedWord" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="word" required="true" minlength="4" maxlength="250" />
|
||||
</form>
|
||||
<parameter>
|
||||
<param param="word" target="word" />
|
||||
</parameter>
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
7
modules/counter/tpl/header.html
Normal file
7
modules/counter/tpl/header.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<!--%import("js/spamfilter_admin.js")-->
|
||||
|
||||
<div style="margin-bottom:20px;">
|
||||
<span <!--@if($act=='dispSpamfilterAdminConfig')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispSpamfilterAdminConfig','module_srl','')}">{$lang->cmd_module_config}</a>]</span>
|
||||
<span <!--@if($act=='dispSpamfilterAdminDeniedIPList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispSpamfilterAdminDeniedIPList')}">{$lang->cmd_denied_ip}</a>]</span>
|
||||
<span <!--@if($act=='dispSpamfilterAdminDeniedWordList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispSpamfilterAdminDeniedWordList')}">{$lang->cmd_denied_word}</a>]</span>
|
||||
</div>
|
||||
35
modules/counter/tpl/index.html
Normal file
35
modules/counter/tpl/index.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->interval}</th>
|
||||
<td><input type="text" name="interval" value="{$config->interval?$config->interval:60}" /> {$lang->unit_sec}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_interval}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->limit_count}</th>
|
||||
<td><input type="text" name="limit_count" value="{$config->limit_count?$config->limit_count:5}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_limit_count}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->check_trackback}</th>
|
||||
<td><input type="checkbox" name="check_trackback" value="Y" <!--@if($config->check_trackback=='Y')-->checked="true"<!--@end--> /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_check_trackback}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{getUrl('act','')}'" />
|
||||
<input type="submit" value="{$lang->cmd_registration}" accesskey="s" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
17
modules/counter/tpl/js/spamfilter_admin.js
Normal file
17
modules/counter/tpl/js/spamfilter_admin.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* @brief 금지 IP 삭제
|
||||
**/
|
||||
function doDeleteDeniedIP(ipaddress) {
|
||||
var fo_obj = xGetElementById('fo_denied_ip');
|
||||
fo_obj.ipaddress.value = ipaddress;
|
||||
procFilter(fo_obj, delete_denied_ip);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지 단어 삭제
|
||||
**/
|
||||
function doDeleteDeniedWord(word) {
|
||||
var fo_obj = xGetElementById('fo_denied_word');
|
||||
fo_obj.word.value = word;
|
||||
procFilter(fo_obj, delete_denied_word);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue