mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@256 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
de279750ba
commit
b675f26ac4
10 changed files with 151 additions and 5 deletions
|
|
@ -41,6 +41,14 @@ var clrOrg; // A color before the change
|
|||
var TimerID; // Timer ID
|
||||
|
||||
|
||||
if(xIE4Up) {
|
||||
xAddEventListener(document, 'mouseover', doRainbowAnchor);
|
||||
xAddEventListener(document, 'mouseout', stopRainbowAnchor);
|
||||
} else {
|
||||
xAddEventListener(document, 'mouseover', Mozilla_doRainbowAnchor);
|
||||
xAddEventListener(document, 'mouseout', Mozilla_stopRainbowAnchor);
|
||||
}
|
||||
/*
|
||||
if (document.all) {
|
||||
document.onmouseover = doRainbowAnchor;
|
||||
document.onmouseout = stopRainbowAnchor;
|
||||
|
|
@ -50,6 +58,7 @@ else if (document.getElementById) {
|
|||
document.onmouseover = Mozilla_doRainbowAnchor;
|
||||
document.onmouseout = Mozilla_stopRainbowAnchor;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
|
@ -128,14 +137,15 @@ function stopRainbowAnchor()
|
|||
// Mozilla_doRainbowAnchor(for Netscape6 and Mozilla browser)
|
||||
// This function begins to change a color. (of a anchor, automatically)
|
||||
//=============================================================================
|
||||
function Mozilla_doRainbowAnchor(e)
|
||||
function Mozilla_doRainbowAnchor(evt)
|
||||
{
|
||||
var e = new xEvent(evt);
|
||||
if (act == 0) {
|
||||
obj = e.target;
|
||||
while (obj.nodeName != 'A' && obj.nodeName != 'BODY') {
|
||||
obj = obj.parentNode;
|
||||
if (obj.nodeName == 'A' || obj.nodeName == 'BODY')
|
||||
break;
|
||||
if(typeof(obj)=='undefined'||!obj) return;
|
||||
if (obj.nodeName == 'A' || obj.nodeName == 'BODY') break;
|
||||
}
|
||||
|
||||
if (obj.nodeName == 'A' && obj.href != '') {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@
|
|||
* rainbow.js는 http://www.dynamicdrive.com에서 제작하였으며 저작권을 가지고 있습니다.
|
||||
**/
|
||||
|
||||
// admin 모듈의 경우 무조건 패스
|
||||
/*
|
||||
if(Context::get('module') == 'admin') {
|
||||
$this->rainbow_link_is_called = true;
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
// 한번이라도 요청이 되었다면 패스
|
||||
if($this->rainbow_link_is_called) return;
|
||||
$this->rainbow_link_is_called = true;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispConfig" type="view" admin_index="true" standalone="true" />
|
||||
<action name="procInsertConfig" type="controller" standalone="true" />
|
||||
<action name="getZipCodeList" type="model" index="true" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
var $hostname = 'kr.zip.zeroboard.com';
|
||||
var $port = 80;
|
||||
var $query = '/server.php?addr3=%s';
|
||||
var $query = '/server.php?addr3=';
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
33
modules/krzip/krzip.controller.php
Normal file
33
modules/krzip/krzip.controller.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* @class krzipController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief krzip 모듈의 controller class
|
||||
**/
|
||||
|
||||
class krzipController extends krzip {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스팸필터 설정
|
||||
**/
|
||||
function procInsertConfig() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('krzip_server_hostname','krzip_server_port','krzip_server_query');
|
||||
if(!$args->krzip_server_hostname) $args->krzip_server_hostname = $this->hostname;
|
||||
if(!$args->krzip_server_port) $args->krzip_server_port = $this->port;
|
||||
if(!$args->krzip_server_query) $args->krzip_server_query = $this->query;
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('krzip',$args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -18,12 +18,19 @@
|
|||
* 동이름을 입력받아서 지정된 서버에 우편번호 목록을 요청한다
|
||||
**/
|
||||
function getZipCodeList() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('krzip');
|
||||
if($args->krzip_server_hostname) $this->hostname = $args->krzip_server_hostname;
|
||||
if($args->krzip_server_port) $this->port = $args->krzip_server_port;
|
||||
if($args->krzip_server_query) $this->query = $args->krzip_server_query;
|
||||
|
||||
// 동네 이름을 받음
|
||||
$addr = trim(Context::get('addr'));
|
||||
if(!$addr) return new Object(-1,'msg_not_exists_addr');
|
||||
|
||||
// 지정된 서버에 요청을 시도한다
|
||||
$query_string = sprintf($this->query,urlencode($addr));
|
||||
$query_string = $this->query.urlencode($addr);
|
||||
|
||||
$fp = fsockopen($this->hostname, $this->port, $errno, $errstr);
|
||||
if(!$fp) return new Object(-1, 'msg_fail_to_socket_open');
|
||||
|
|
|
|||
32
modules/krzip/krzip.view.php
Normal file
32
modules/krzip/krzip.view.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* @class krzipView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief krzip 모듈의 View class
|
||||
**/
|
||||
|
||||
class krzipView extends krzip {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
$this->setTemplatePath($this->module_path.'tpl.admin');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 목록을 보여줌
|
||||
**/
|
||||
function dispConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('krzip');
|
||||
Context::set('config',$config);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -5,6 +5,16 @@
|
|||
* @desc : 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
|
||||
// 일반 단어들
|
||||
$lang->krzip_server_hostname = "우편번호 검사 서버의 이름";
|
||||
$lang->krzip_server_port = "우편번호 검사 서버 포트";
|
||||
$lang->krzip_server_query = "우편번호 검사 서버 경로";
|
||||
|
||||
// 설명문
|
||||
$lang->about_krzip_server_hostname = "우편번호를 검사하여 결과 목록을 가져올 서버의 도메인을 입력해주세요";
|
||||
$lang->about_krzip_server_port = "우편번호를 검사서버의 포트 번호를 입력해주세요";
|
||||
$lang->about_krzip_server_query = "우편번호를 검사서버에 요청할 query url을 입력해 주세요";
|
||||
|
||||
// 에러 메세지들
|
||||
$lang->msg_not_exists_addr = "검색하려는 대상이 없습니다";
|
||||
$lang->msg_fail_to_socket_open = "우편번호 검색 대상 서버 접속이 실패하였습니다";
|
||||
|
|
|
|||
11
modules/krzip/tpl.admin/filter/insert_config.xml
Normal file
11
modules/krzip/tpl.admin/filter/insert_config.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<filter name="insert_config" module="krzip" act="procInsertConfig" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="krzip_server_hostname" required="true" />
|
||||
<node target="krzip_server_port" required="true" />
|
||||
<node target="krzip_server_query" required="true" />
|
||||
</form>
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
33
modules/krzip/tpl.admin/index.html
Normal file
33
modules/krzip/tpl.admin/index.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->krzip_server_hostname}</th>
|
||||
<td><input type="text" name="krzip_server_hostname" value="{$config->krzip_server_hostname?$config->krzip_server_hostname:'kr.zip.zeroboard.com'}" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_krzip_server_hostname}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->krzip_server_port}</th>
|
||||
<td><input type="text" name="krzip_server_port" value="{$config->krzip_server_port?$config->krzip_server_port:'80'}" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_krzip_server_port}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->krzip_server_query}</th>
|
||||
<td><input type="text" name="krzip_server_query" value="{$config->krzip_server_query?$config->krzip_server_query:'/server.php?addr3='}" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_krzip_server_query}</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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue