포인트 모듈, 포인트 활성화 애드온, 포인트 레벨 아이콘 표시 애드온 추가
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2032 201d5d3c-b55e-5fd7-737f-ddc643e51545
10
addons/point/conf/info.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<addon version="0.1">
|
||||
<title xml:lang="ko">포인트 활성화 애드온</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 7. 26">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<description xml:lang="ko">
|
||||
포인트시스템 모듈에 설정된 내용을 바탕으로 글작성/삭제/댓글작성/삭제/파일업로드/삭제/다운로드등의 행동에 대해서 포인트를 기록합니다.
|
||||
</description>
|
||||
</author>
|
||||
</addon>
|
||||
221
addons/point/point.addon.php
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
/**
|
||||
* @file point.addon.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 포인트 애드온
|
||||
*
|
||||
* 포인트 시스템 모듈에 설정된 내용을 토대로 하여 포인트를 부여/차감하고,
|
||||
* 다운로드를 금지시키고,
|
||||
* 회원 이름 앞에 레벨 아이콘을 표시한다.
|
||||
**/
|
||||
|
||||
// 관리자 모듈이면 패스~
|
||||
if(Context::get('module')=='admin') return;
|
||||
|
||||
// 로그인 상태일때만 실행
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info->member_srl) return;
|
||||
|
||||
// point action cache file을 가져와서 현재 속한 캐시파일인지 확인
|
||||
$act_cache_file = "./files/cache/point.act.cache";
|
||||
$buff = FileHandler::readFile($act_cache_file);
|
||||
if(strpos($buff,$this->act)===false) return;
|
||||
|
||||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 현재 로그인 사용자의 포인트를 가져옴
|
||||
$member_srl = $logged_info->member_srl;
|
||||
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
// 파일다운로드를 제외한 action은 called_position가 before_module_proc일때 실행
|
||||
if($called_position == 'after_module_proc') {
|
||||
|
||||
// 게시글 작성
|
||||
if(strpos($config->insert_document_act,$this->act)!==false) {
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 신규 글인지 체크
|
||||
if($oDocument->get('regdate')!=$oDocument->get('last_update')) return;
|
||||
$module_srl = $oDocument->get('module_srl');
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['insert_document'];
|
||||
if(!$point) $point = $config->insert_document;
|
||||
|
||||
// 포인트 증감
|
||||
$cur_point += $point;
|
||||
$oPointController = &getController('point');
|
||||
$oPointController->setPoint($member_srl,$cur_point);
|
||||
|
||||
// 게시글 삭제
|
||||
} elseif(strpos($config->delete_document_act,$this->act)!==false) {
|
||||
if(!$this->toBool()) return;
|
||||
$target_member_srl = Context::get('_point_target_member_srl');
|
||||
if(!$target_member_srl) return;
|
||||
|
||||
$module_srl = $this->module_srl;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['insert_document'];
|
||||
if(!$point) $point = $config->insert_document;
|
||||
|
||||
// 포인트 차감
|
||||
$cur_point = $oPointModel->getPoint($target_member_srl, true);
|
||||
$cur_point -= $point;
|
||||
|
||||
$oPointController = &getController('point');
|
||||
$oPointController->setPoint($target_member_srl,$cur_point);
|
||||
|
||||
// 댓글 작성
|
||||
} elseif(strpos($config->insert_comment_act,$this->act)!==false) {
|
||||
$comment_srl = Context::get('comment_srl');
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment = $oCommentModel->getComment($comment_srl);
|
||||
|
||||
// 이미 존재하는 댓글인지 체크
|
||||
if($comment->last_update) return;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$module_srl = $comment->module_srl;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['insert_comment'];
|
||||
if(!$point) $point = $config->insert_comment;
|
||||
|
||||
// 포인트 증감
|
||||
$cur_point += $point;
|
||||
$oPointController = &getController('point');
|
||||
$oPointController->setPoint($member_srl,$cur_point);
|
||||
|
||||
|
||||
// 댓글 삭제
|
||||
} elseif(strpos($config->delete_comment_act,$this->act)!==false) {
|
||||
if(!$this->toBool()) return;
|
||||
$target_member_srl = Context::get('_point_target_member_srl');
|
||||
if(!$target_member_srl) return;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$module_srl = $this->module_srl;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['insert_comment'];
|
||||
if(!$point) $point = $config->insert_comment;
|
||||
|
||||
// 포인트 증감
|
||||
$cur_point = $oPointModel->getPoint($target_member_srl, true);
|
||||
$cur_point -= $point;
|
||||
|
||||
$oPointController = &getController('point');
|
||||
$oPointController->setPoint($target_member_srl,$cur_point);
|
||||
|
||||
// 파일업로드
|
||||
} elseif(strpos($config->upload_file_act,$this->act)!==false) {
|
||||
if(!$output->toBool()||!$output->get('file_srl')) return;
|
||||
$file_srl = $output->get('file_srl');
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
$file_info = $oFileModel->getFile($file_srl);
|
||||
|
||||
$module_srl = $this->module_srl;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['upload_file'];
|
||||
if(!$point) $point = $config->upload_file;
|
||||
|
||||
// 포인트 증감
|
||||
$cur_point += $point;
|
||||
$oPointController = &getController('point');
|
||||
$oPointController->setPoint($member_srl,$cur_point);
|
||||
|
||||
// 파일삭제
|
||||
} elseif(strpos($config->delete_file_act,$this->act)!==false) {
|
||||
// 파일 정보를 구해옴
|
||||
$file_srl = Context::get('file_srl');
|
||||
if(!$file_srl) return;
|
||||
$target_member_srl = Context::get('_point_target_member_srl');
|
||||
if(!$target_member_srl) return;
|
||||
|
||||
$module_srl = $this->module_srl;
|
||||
|
||||
$target_member_srl = Context::get('_point_target_member_srl');
|
||||
if(!$target_member_srl) return;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['upload_file'];
|
||||
if(!$point) $point = $config->upload_file;
|
||||
|
||||
// 포인트 차감
|
||||
$cur_point = $oPointModel->getPoint($target_member_srl, true);
|
||||
$cur_point -= $point;
|
||||
$oPointController = &getController('point');
|
||||
$oPointController->setPoint($target_member_srl,$cur_point);
|
||||
}
|
||||
|
||||
// 파일다운로드는 before_module_proc 일때 체크
|
||||
} else if($called_position == "before_module_proc") {
|
||||
|
||||
// 파일다운로드
|
||||
if(strpos($config->download_file_act,$this->act)!==false) {
|
||||
// 파일 정보를 구해옴
|
||||
$file_srl = Context::get('file_srl');
|
||||
if(!$file_srl) return;
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
$file_info = $oFileModel->getFile($file_srl);
|
||||
if($file_info->file_srl != $file_srl) return;
|
||||
|
||||
$module_srl = $file_info->module_srl;
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['download_file'];
|
||||
if(!$point) $point = $config->download_file;
|
||||
|
||||
// 포인트가 0보다 작고 포인트가 없으면 파일 다운로드가 안되도록 했다면 오류
|
||||
if($cur_point + $point < 0 && $config->disable_download == 'Y') {
|
||||
$this->stop('msg_cannot_download');
|
||||
}
|
||||
|
||||
// 포인트 차감
|
||||
$cur_point += $point;
|
||||
$oPointController = &getController('point');
|
||||
$oPointController->setPoint($member_srl,$cur_point);
|
||||
|
||||
// 글 삭제일 경우 대상 글의 사용자 번호 저장
|
||||
} elseif(strpos($config->delete_document_act,$this->act)!==false) {
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
$target_member_srl = $oDocument->get('member_srl');
|
||||
if($target_member_srl) Context::set('_point_target_member_srl', $target_member_srl);
|
||||
|
||||
// 댓글 삭제일 경우 대상 댓글의 사용자 번호 저장
|
||||
} elseif(strpos($config->delete_comment_act,$this->act)!==false) {
|
||||
$comment_srl = Context::get('comment_srl');
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment = $oCommentModel->getComment($comment_srl);
|
||||
$target_member_srl = $comment->member_srl;
|
||||
if($target_member_srl) Context::set('_point_target_member_srl', $target_member_srl);
|
||||
|
||||
// 파일삭제일 경우 대상 파일의 정보에서 사용자 번호 저장
|
||||
} elseif(strpos($config->delete_file_act,$this->act)!==false) {
|
||||
// 파일 정보를 구해옴
|
||||
$file_srl = Context::get('file_srl');
|
||||
if(!$file_srl) return;
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
$file_info = $oFileModel->getFile($file_srl);
|
||||
if($file_info->file_srl != $file_srl) return;
|
||||
|
||||
$target_member_srl = $file_info->member_srl;
|
||||
if($target_member_srl) Context::set('_point_target_member_srl', $target_member_srl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
BIN
addons/point_level_icon/.point_level_icon.addon.php.swp
Normal file
11
addons/point_level_icon/conf/info.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<addon version="0.1">
|
||||
<title xml:lang="ko">포인트 레벨 아이콘 표시 애드온</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 7. 26">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<description xml:lang="ko">
|
||||
포인트 시스템을 사용중일 경우 사용자 이름 앞에 레벨 아이콘을 표시하도록 합니다.
|
||||
레벨 아이콘은 모듈 > 포인트시스템에서 선택 가능합니다.
|
||||
</description>
|
||||
</author>
|
||||
</addon>
|
||||
17
addons/point_level_icon/point_level_icon.addon.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
/**
|
||||
* @file point.addon.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 포인트 레벨 아이콘 표시 애드온
|
||||
*
|
||||
* 포인트 시스템 사용중일때 사용자 이름 앞에 포인트 레벨 아이콘을 표시합니다.
|
||||
**/
|
||||
|
||||
// before_display_content 가 아니면 return
|
||||
if($called_position != "before_display_content") return;
|
||||
|
||||
$oPointController = &getController('point');
|
||||
$output = preg_replace_callback('!<(div|span)([^\>]*)member_([0-9\-]*)([^\>]*)>(.*?)\<\/(div|span)\>!is', array($oPointController, 'transLevelIcon'), $output);
|
||||
?>
|
||||
12
modules/point/conf/info.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?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. 7. 26">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<description xml:lang="ko">
|
||||
글작성/삭제/댓글작성/삭제시에 포인트를 부여할 수 있습니다.
|
||||
포인트마다 레벨을 지정하여 사용자 이름 앞에 아이콘을 표시할 수도 있습니다.
|
||||
단 포인트 관련 애드온을 활성화 시키셔야 됩니다.
|
||||
</description>
|
||||
</author>
|
||||
</module>
|
||||
13
modules/point/conf/module.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispPointAdminConfig" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispPointAdminModuleConfig" type="view" standalone="true" />
|
||||
<action name="dispPointAdminActConfig" type="view" standalone="true" />
|
||||
|
||||
<action name="procPointAdminInsertConfig" type="controller" standalone="true" />
|
||||
<action name="procPointAdminInsertModuleConfig" type="controller" standalone="true" />
|
||||
<action name="procPointAdminInsertActConfig" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
BIN
modules/point/icons/default/0.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/1.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/10.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/11.gif
Executable file
|
After Width: | Height: | Size: 681 B |
BIN
modules/point/icons/default/12.gif
Executable file
|
After Width: | Height: | Size: 685 B |
BIN
modules/point/icons/default/13.gif
Executable file
|
After Width: | Height: | Size: 683 B |
BIN
modules/point/icons/default/14.gif
Executable file
|
After Width: | Height: | Size: 685 B |
BIN
modules/point/icons/default/15.gif
Executable file
|
After Width: | Height: | Size: 683 B |
BIN
modules/point/icons/default/16.gif
Executable file
|
After Width: | Height: | Size: 683 B |
BIN
modules/point/icons/default/17.gif
Executable file
|
After Width: | Height: | Size: 681 B |
BIN
modules/point/icons/default/18.gif
Executable file
|
After Width: | Height: | Size: 683 B |
BIN
modules/point/icons/default/19.gif
Executable file
|
After Width: | Height: | Size: 683 B |
BIN
modules/point/icons/default/2.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/20.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/21.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/22.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/23.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/24.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/25.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/26.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/27.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/28.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/29.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/3.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/30.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/4.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/5.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/6.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/7.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/8.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/point/icons/default/9.gif
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
45
modules/point/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/point/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 포인트 (point) 모듈의 기본 언어팩
|
||||
**/
|
||||
|
||||
$lang->point = "포인트";
|
||||
$lang->level = "레벨";
|
||||
|
||||
$lang->about_point_module = "포인트 모듈은 글작성/댓글작성/업로드/다운로드등의 행동을 할때 포인트를 부여할 수 있습니다.<br />단 포인트 모듈에서는 설정만 할 뿐이고 포인트 애드온을 활성화 시켜야 포인트가 누적이 됩니다";
|
||||
$lang->about_act_config = "게시판,블로그등의 모듈마다 글작성/삭제/댓글작성/삭제등의 action이 있습니다.<br />게시판/블로그외의 모듈에 포인트 기능 연동을 하고 싶을때는 각 기능에 맞는 act값을 추가해주시면 됩니다.<br />연결은 ,(콤마)로 해주시면 됩니다.";
|
||||
|
||||
$lang->max_level = '최고 레벨';
|
||||
$lang->about_max_level = '최고레벨을 지정하실 수 있습니다. 레벨 아이콘을 염두에 두셔야 하고 최고 레벨은 100이 한계입니다';
|
||||
|
||||
$lang->level_icon = '레벨 아이콘';
|
||||
$lang->about_level_icon = '레벨아이콘은 ./modules/point/icons/레벨.gif 로 지정되며 최고레벨과 아이콘셋이 다를 수 있으니 주의해주세요';
|
||||
|
||||
$lang->point_name = '포인트 명칭';
|
||||
$lang->about_point_name = '포인트의 이름이나 단위를 정하실 수 있습니다';
|
||||
|
||||
$lang->level_point = '레벨 포인트';
|
||||
$lang->about_level_point = '아래 각 레벨별 포인트에 도달하거나 감소하게 되면 레벨이 조절됩니다';
|
||||
|
||||
$lang->disable_download = '다운로드 금지';
|
||||
$lang->about_disable_download = '포인트가 없을 경우 다운로드를 금지하게 합니다. (이미지파일은 제외입니다)';
|
||||
|
||||
$lang->about_module_point = '모듈별로 포인트를 지정할 수 있으며 지정되지 않은 모듈은 기본 포인트를 이용하게 됩니다<br />모든 점수는 반대 행동을 하였을 경우 원상복귀 됩니다.';
|
||||
|
||||
$lang->point_insert_document = '글 작성';
|
||||
$lang->point_delete_document = '글 삭제';
|
||||
$lang->point_insert_comment = '댓글 작성';
|
||||
$lang->point_delete_comment = '댓글 삭제';
|
||||
$lang->point_upload_file = '파일 업로드';
|
||||
$lang->point_delete_file = '파일 업로드';
|
||||
$lang->point_download_file = '파일 다운로드 (이미지 제외)';
|
||||
|
||||
|
||||
$lang->cmd_point_config = '기본 설정';
|
||||
$lang->cmd_point_module_config = '모듈별 설정';
|
||||
$lang->cmd_point_act_config = '기능별 act 설정';
|
||||
|
||||
$lang->msg_cannot_download = '포인트가 부족하여 다운로드를 하실 수 없습니다';
|
||||
?>
|
||||
138
modules/point/point.admin.controller.php
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
<?php
|
||||
/**
|
||||
* @class pointAdminController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief point모듈의 admin controller class
|
||||
**/
|
||||
|
||||
class pointAdminController extends point {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 기본 설정 저장
|
||||
**/
|
||||
function procPointAdminInsertConfig() {
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 변수 정리
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
$config->point_name = $args->point_name;
|
||||
if(!$config->point_name) $config->point_name = 'point';
|
||||
|
||||
$config->max_level = $args->max_level;
|
||||
if($config->max_level>100) $config->max_level = 100;
|
||||
if($config->max_level<1) $config->max_level = 1;
|
||||
|
||||
$config->level_icon = $args->level_icon;
|
||||
if($args->disable_download == 'Y') $config->disable_download = 'Y';
|
||||
else $config->disable_download = 'N';
|
||||
|
||||
for($i=1;$i<=$config->max_level;$i++) {
|
||||
$key = "level_step_".$i;
|
||||
$config->level_step[$i] = (int)$args->{$key};
|
||||
}
|
||||
|
||||
// 저장
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
|
||||
$this->cacheActList();
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈별 설정 저장
|
||||
**/
|
||||
function procPointAdminInsertModuleConfig() {
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 변수 정리
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
$config->insert_document = $args->insert_document;
|
||||
$config->insert_comment = $args->insert_comment;
|
||||
$config->upload_file = $args->upload_file;
|
||||
$config->download_file = $args->download_file;
|
||||
|
||||
foreach($args as $key => $val) {
|
||||
preg_match("/^(insert_document|insert_comment|upload_file|download_file)_([0-9]+)$/", $key, $matches);
|
||||
if(!$matches[1]) continue;
|
||||
$name = $matches[1];
|
||||
$module_srl = $matches[2];
|
||||
if(strlen($val)==0) unset($config->module_point[$module_srl][$name]);
|
||||
else $config->module_point[$module_srl][$name] = $val;
|
||||
}
|
||||
|
||||
// 저장
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
|
||||
$this->cacheActList();
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 기능별 act 저장
|
||||
**/
|
||||
function procPointAdminInsertActConfig() {
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 변수 정리
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
$config->insert_document_act = $args->insert_document_act;
|
||||
$config->delete_document_act = $args->delete_document_act;
|
||||
$config->insert_comment_act = $args->insert_comment_act;
|
||||
$config->delete_comment_act = $args->delete_comment_act;
|
||||
$config->upload_file_act = $args->upload_file_act;
|
||||
$config->delete_file_act = $args->delete_file_act;
|
||||
$config->download_file_act = $args->download_file_act;
|
||||
|
||||
// 저장
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
|
||||
$this->cacheActList();
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시파일 저장
|
||||
**/
|
||||
function cacheActList() {
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 각 act값을 정리
|
||||
$act_list = sprintf("%s,%s,%s,%s,%s,%s,%s",
|
||||
$config->insert_document_act,
|
||||
$config->delete_document_act,
|
||||
$config->insert_comment_act,
|
||||
$config->delete_comment_act,
|
||||
$config->upload_file_act,
|
||||
$config->delete_file_act,
|
||||
$config->download_file_act
|
||||
);
|
||||
|
||||
$act_cache_file = "./files/cache/point.act.cache";
|
||||
FileHandler::writeFile($act_cache_file, $act_list);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
59
modules/point/point.admin.view.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* @class pointAdminView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief point모듈의 admin view class
|
||||
**/
|
||||
|
||||
class pointAdminView extends point {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
Context::set('config', $config);
|
||||
|
||||
// 설정 변수 지정
|
||||
Context::set('config', $config);
|
||||
|
||||
// template path지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 기본 설정
|
||||
**/
|
||||
function dispPointAdminConfig() {
|
||||
// 레벨 아이콘 목록 구함
|
||||
$level_icon_list = FileHandler::readDir("./modules/point/icons");
|
||||
Context::set('level_icon_list', $level_icon_list);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('config');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈별 점수 지정
|
||||
**/
|
||||
function dispPointAdminModuleConfig() {
|
||||
// mid 목록 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$mid_list = $oModuleModel->getMidList();
|
||||
Context::set('mid_list', $mid_list);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('module_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 기능별 act 설정
|
||||
**/
|
||||
function dispPointAdminActConfig() {
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('action_config');
|
||||
}
|
||||
}
|
||||
?>
|
||||
92
modules/point/point.class.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
/**
|
||||
* @class point
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief point모듈의 high class
|
||||
**/
|
||||
|
||||
class point extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('point', 'view', 'dispPointAdminConfig');
|
||||
$oModuleController->insertActionForward('point', 'view', 'dispPointAdminModuleConfig');
|
||||
$oModuleController->insertActionForward('point', 'view', 'dispPointAdminActConfig');
|
||||
|
||||
// 포인트 정보를 기록할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/member_extra_info/point');
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
// 최고레벨
|
||||
$config->max_level = 30;
|
||||
|
||||
// 레벨별 점수
|
||||
for($i=1;$i<=30;$i++) {
|
||||
$config->level_step[$i] = pow($i,2)*90;
|
||||
}
|
||||
|
||||
// 포인트 호칭
|
||||
$config->point_name = 'point';
|
||||
|
||||
// 레벨 아이콘 디렉토리
|
||||
$config->level_icon = "default";
|
||||
|
||||
// 점수가 없을때 다운로드 금지 기능
|
||||
$config->disable_download = false;
|
||||
|
||||
/**
|
||||
* 모듈별 기본 점수 및 각 action 정의 (게시판,블로그외에 어떤 모듈이 생길지 모르니 act값을 명시한다
|
||||
**/
|
||||
// 글작성
|
||||
$config->insert_document = 10;
|
||||
|
||||
$config->insert_document_act = 'procBoardInsertDocument';
|
||||
$config->delete_document_act = 'procBoardDeleteDocument';
|
||||
|
||||
// 댓글작성
|
||||
$config->insert_comment = 5;
|
||||
|
||||
$config->insert_comment_act = 'procBoardInsertComment,procBlogInsertComment';
|
||||
$config->delete_comment_act = 'procBoardDeleteComment,procBlogDeleteComment';
|
||||
|
||||
// 업로드
|
||||
$config->upload_file = 5;
|
||||
|
||||
$config->upload_file_act = 'procFileUpload';
|
||||
$config->delete_file_act = 'procFileDelete';
|
||||
|
||||
// 다운로드
|
||||
$config->download_file = -5;
|
||||
$config->download_file_act = 'procFileDownload';
|
||||
|
||||
// 설정 저장
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
|
||||
// 빠른 실행을 위해서 act list를 캐싱
|
||||
$oPointController = &getAdminController('point');
|
||||
$oPointController->cacheActList();
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
85
modules/point/point.controller.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
/**
|
||||
* @class pointController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief point모듈의 Controller class
|
||||
**/
|
||||
|
||||
class pointController extends point {
|
||||
|
||||
var $config = null;
|
||||
var $oPointModel = null;
|
||||
var $member_code = array();
|
||||
var $icon_width = 0;
|
||||
var $icon_height = 0;
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 포인트 설정
|
||||
**/
|
||||
function setPoint($member_srl, $point) {
|
||||
// 변수 설정
|
||||
$args->member_srl = $member_srl;
|
||||
$args->point = $point;
|
||||
|
||||
// 포인트가 있는지 체크
|
||||
$oPointModel = &getModel('point');
|
||||
if($oPointModel->isExistsPoint($member_srl)) {
|
||||
executeQuery("point.updatePoint", $args);
|
||||
} else {
|
||||
executeQuery("point.insertPoint", $args);
|
||||
}
|
||||
|
||||
// 캐시 설정
|
||||
$cache_path = sprintf('./files/member_extra_info/point/%s/', getNumberingPath($member_srl));
|
||||
FileHandler::makedir($cache_path);
|
||||
|
||||
$cache_filename = sprintf('%s%d.cache.txt', $cache_path, $member_srl);
|
||||
FileHandler::writeFile($cache_filename, $point);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 포인트 레벨 아이콘 표시
|
||||
**/
|
||||
function transLevelIcon($matches) {
|
||||
if(!$this->config) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$this->config = $oModuleModel->getModuleConfig('point');
|
||||
}
|
||||
|
||||
if(!$this->oPointModel) $this->oPointModel = &getModel('point');
|
||||
|
||||
$member_srl = $matches[3];
|
||||
if($this->member_code[$member_srl]) return $this->member_code[$member_srl];
|
||||
|
||||
$point = $this->oPointModel->getPoint($member_srl);
|
||||
$level = $this->oPointModel->getLevel($point, $this->config->level_step);
|
||||
|
||||
$src = sprintf("modules/point/icons/%s/%d.gif", $this->config->level_icon, $level);
|
||||
if(!$this->icon_width) {
|
||||
$info = getimagesize($src);
|
||||
$this->icon_width = $info[0];
|
||||
$this->icon_height = $info[1];
|
||||
}
|
||||
|
||||
if($level < $this->config->max_level) {
|
||||
$next_point = $this->config->level_step[$level+1];
|
||||
if($next_point > 0) {
|
||||
$per = (int)($point / $next_point*100);
|
||||
}
|
||||
}
|
||||
|
||||
$code = str_replace('<'.$matches[6], sprintf('<%s title="%s:%s%s, %s:%s/%s" style="cursor:pointer;background:url(%s) no-repeat left;padding-left:%dpx; height:%dpx" ', $matches[1], Context::getLang('point'), $point, $per?"(".$per."%)":"", Context::getLang('level'), $level, $this->config->max_level, Context::getRequestUri().$src, $this->icon_width+2, $this->icon_height), $matches[0] );
|
||||
$this->member_code[$member_srl] = $code;
|
||||
|
||||
return $this->member_code[$member_srl];
|
||||
}
|
||||
}
|
||||
?>
|
||||
54
modules/point/point.model.php
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
/**
|
||||
* @class pointModel
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief point 모듈의 model class
|
||||
**/
|
||||
|
||||
class pointModel extends point {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 포인트 정보가 있는지 체크
|
||||
**/
|
||||
function isExistsPoint($member_srl) {
|
||||
$args->member_srl = $member_srl;
|
||||
$output = executeQuery('point.getPoint', $args);
|
||||
if($output->data->member_srl == $member_srl) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 포인트를 구해옴
|
||||
**/
|
||||
function getPoint($member_srl, $from_db = false) {
|
||||
$cache_filename = sprintf('./files/member_extra_info/point/%s%d.cache.txt', getNumberingPath($member_srl), $member_srl);
|
||||
|
||||
if(!$from_db && file_exists($target_filename)) return trim(FileHandler::readFile($cache_filename));
|
||||
|
||||
// DB에서 가져옴
|
||||
$args->member_srl = $member_srl;
|
||||
$output = executeQuery('point.getPoint', $args);
|
||||
$point = (int)$output->data->point;
|
||||
|
||||
FileHandler::writeFile($cache_filename, $point);
|
||||
|
||||
return $point;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 레벨을 구함
|
||||
**/
|
||||
function getLevel($point, $level_step) {
|
||||
$level_count = count($level_step);
|
||||
for($level=0;$level<=$level_count;$level++) if($point < $level_step[$level]) break;
|
||||
$level --;
|
||||
return $level;
|
||||
}
|
||||
}
|
||||
?>
|
||||
11
modules/point/queries/getPoint.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getPoint" action="select">
|
||||
<tables>
|
||||
<table name="point" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="member_srl" var="member_srl" />
|
||||
</conditions>
|
||||
</query>
|
||||
9
modules/point/queries/insertPoint.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<query id="insertPoint" action="insert">
|
||||
<tables>
|
||||
<table name="point" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
<column name="point" var="point" filter="number" notnull="notnull" default="0" />
|
||||
</columns>
|
||||
</query>
|
||||
11
modules/point/queries/updatePoint.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updatePoint" action="update">
|
||||
<tables>
|
||||
<table name="point" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="point" var="point" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
4
modules/point/schemas/point.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<table name="point">
|
||||
<column name="member_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="point" type="number" size="11" notnull="notnull" default="0" index="idx_point" />
|
||||
</table>
|
||||
81
modules/point/skins/default/css/poll.css
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
.poll_box {
|
||||
border:3px solid #555555;
|
||||
background-color:#EEEEEE;
|
||||
margin:5px;
|
||||
padding:8px 5px 8px 5px;
|
||||
}
|
||||
|
||||
.poll_title_box {
|
||||
border:2px solid #444444;
|
||||
background-color:#888888;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
margin:5px;
|
||||
padding:5px;
|
||||
height:13px;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.poll_stop_date {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.poll_join_count {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.poll_detail_box {
|
||||
border:1px solid #444444;
|
||||
background-color:#FFFFFF;
|
||||
margin:5px;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
.poll_detail_box .title {
|
||||
background-color:#555555;
|
||||
color:#FFFFFF;
|
||||
padding:5px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.poll_detail_box .item {
|
||||
padding:5px;
|
||||
border-bottom:1px solid #EEEEEE;
|
||||
}
|
||||
|
||||
.poll_detail_box .checkcount {
|
||||
background-color:#AAAAAA;
|
||||
text-align:right;
|
||||
color:#EEEEEE;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.poll_detail_box .text {
|
||||
margin:5px 0px 5px 20px;
|
||||
}
|
||||
|
||||
.poll_detail_box .bar_box {
|
||||
width:80%;
|
||||
margin-bottom:10px;
|
||||
border:1px solid #DDDDDD;
|
||||
margin:0px 5px 5px 35px;
|
||||
padding:1px;
|
||||
}
|
||||
|
||||
.poll_detail_box .bar {
|
||||
background-color:#444444;
|
||||
border-bottom:1px solid #AAAAAA;
|
||||
height:5px;
|
||||
}
|
||||
|
||||
|
||||
.poll_button_area {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.poll_button {
|
||||
border:1px solid #555555;
|
||||
background-color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
height:20px;
|
||||
}
|
||||
10
modules/point/skins/default/filter/poll.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<filter name="poll" module="poll" act="procPoll" confirm_msg_code="confirm_poll_submit">
|
||||
<form />
|
||||
<parameter />
|
||||
<response callback_func="completePoll">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
<tag name="poll_srl" />
|
||||
<tag name="tpl" />
|
||||
</response>
|
||||
</filter>
|
||||
59
modules/point/skins/default/form.html
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<!--%import("filter/poll.xml")-->
|
||||
<!--%import("js/poll.js")-->
|
||||
<!--%import("css/poll.css")-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var poll_alert_lang = "{$lang->msg_check_poll_item}";
|
||||
</script>
|
||||
|
||||
<div id="poll_{$poll->poll_srl}" style="{$poll->style}">
|
||||
|
||||
<div class="poll_box" style="{$poll->style}">
|
||||
|
||||
<form action="./" method="get" onsubmit="return doPoll(this)">
|
||||
|
||||
<input type="hidden" name="poll_srl" value="{$poll->poll_srl}" />
|
||||
<input type="hidden" name="poll_srl_indexes" value="" />
|
||||
|
||||
<div class="poll_title_box">
|
||||
<div class="poll_stop_date">
|
||||
{$lang->poll_stop_date} : {zdate($poll->stop_date, "Y-m-d H:i")}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--@foreach($poll->poll as $poll_srl_index => $val)-->
|
||||
<input type="hidden" name="checkcount_{$poll_srl_index}" value="{$val->checkcount}" />
|
||||
|
||||
<div class="poll_detail_box">
|
||||
<div class="title">{$val->title}</div>
|
||||
<!--@foreach($val->item as $item_srl => $item)-->
|
||||
{@$_idx = $poll->poll_srl.'_'.$poll_srl_index.'_'.$item_srl}
|
||||
|
||||
<div class="item">
|
||||
<!--@if($val->checkcount>1)-->
|
||||
<input type="checkbox" name="item_{$poll->poll_srl}_{$poll_srl_index}" value="{$item->poll_item_srl}" id="item_{$item->poll_item_srl}" />
|
||||
<!--@else-->
|
||||
<input type="radio" name="item_{$poll->poll_srl}_{$poll_srl_index}" value="{$item->poll_item_srl}" id="item_{$item->poll_item_srl}" />
|
||||
<!--@end-->
|
||||
<label for="item_{$item->poll_item_srl}">{$item->title}</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->checkcount>1)-->
|
||||
<div class="checkcount">
|
||||
{$lang->poll_checkcount} : {$val->checkcount}
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
<!--@end-->
|
||||
|
||||
<div class="poll_button_area">
|
||||
<input type="submit" value="{$lang->cmd_apply_poll}" class="poll_button" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
BIN
modules/point/skins/default/images/blank.gif
Normal file
|
After Width: | Height: | Size: 43 B |
51
modules/point/skins/default/js/poll.js
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/* 설문 참여 함수 */
|
||||
function doPoll(fo_obj) {
|
||||
|
||||
var checkcount = new Array();
|
||||
var item = new Array();
|
||||
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
var obj = fo_obj[i];
|
||||
if(obj.nodeName != 'INPUT') continue;
|
||||
|
||||
var name = obj.name;
|
||||
if(name.indexOf('checkcount')>-1) {
|
||||
var t = name.split('_');
|
||||
var poll_srl_index = parseInt(t[1],10);
|
||||
checkcount[poll_srl_index] = obj.value;
|
||||
item[poll_srl_index] = new Array();
|
||||
|
||||
} else if(name.indexOf('item_')>-1) {
|
||||
var t = name.split('_');
|
||||
var poll_srl = parseInt(t[1],10);
|
||||
var poll_srl_index = parseInt(t[2],10);
|
||||
if(obj.checked == true) item[poll_srl_index][item[poll_srl_index].length] = obj.value;
|
||||
}
|
||||
}
|
||||
|
||||
var poll_srl_indexes = "";
|
||||
for(var poll_srl_index in checkcount) {
|
||||
var count = checkcount[poll_srl_index];
|
||||
var items = item[poll_srl_index];
|
||||
if(count > items.length) {
|
||||
alert(poll_alert_lang);
|
||||
return false;
|
||||
}
|
||||
|
||||
poll_srl_indexes += items.join(',')+',';
|
||||
}
|
||||
fo_obj.poll_srl_indexes.value = poll_srl_indexes;
|
||||
|
||||
procFilter(fo_obj, poll);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 설문 조사후 내용을 바꿀 함수 */
|
||||
function completePoll(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
var poll_srl = ret_obj['poll_srl'];
|
||||
var tpl = ret_obj['tpl'];
|
||||
var width = xWidth("poll_"+poll_srl);
|
||||
xInnerHtml("poll_"+poll_srl, tpl);
|
||||
xWidth("poll_"+poll_srl, width);
|
||||
}
|
||||
35
modules/point/skins/default/result.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!--%import("css/poll.css")-->
|
||||
|
||||
<div class="poll_box" style="{$poll->style}">
|
||||
|
||||
<div class="poll_title_box">
|
||||
<div class="poll_join_count">
|
||||
{$lang->poll_join_count} : {number_format($poll->poll_count)}
|
||||
</div>
|
||||
<div class="poll_stop_date">
|
||||
{$lang->poll_stop_date} : {zdate($poll->stop_date, "Y-m-d H:i")}
|
||||
</div>
|
||||
</div>
|
||||
<!--@foreach($poll->poll as $poll_srl_index => $val)-->
|
||||
<div class="poll_detail_box">
|
||||
<div class="title">{$val->title} ({$val->poll_count})</div>
|
||||
<!--@foreach($val->item as $item_srl => $item)-->
|
||||
{@$per = (int)(( $item->poll_count / $val->poll_count)*100) }
|
||||
|
||||
<div class="text">
|
||||
{$item_srl+1}. {$item->title} : {$item->poll_count} ({$per}%)
|
||||
</div>
|
||||
<div class="bar_box">
|
||||
<!--@if($per)-->
|
||||
<div class="bar" style="width:{$per}%;"><img src="./images/blank.gif" alt="bar" width="1" height="5" /></div>
|
||||
<!--@else-->
|
||||
<div class="bar" style="width:2px;"><img src="./images/blank.gif" alt="bar" width="1" height="5" /></div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
</div>
|
||||
|
||||
<!--@end-->
|
||||
|
||||
</div>
|
||||
25
modules/point/skins/default/skin.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<skin>
|
||||
<title xml:lang="ko">설문조사 기본 스킨</title>
|
||||
<title xml:lang="jp">アンケート調査デフォルトスキン</title>
|
||||
<title xml:lang="zh-CN">投票调查基本皮肤</title>
|
||||
<title xml:lang="en">Default Skin of Poll</title>
|
||||
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">설문조사 기본 스킨</description>
|
||||
<description xml:lang="jp">アンケート調査デフォルトスキン</description>
|
||||
<description xml:lang="zh-CN">投票调查基本皮肤</description>
|
||||
<description xml:lang="en">Default Skin of Poll</description>
|
||||
</maker>
|
||||
<colorset>
|
||||
<color name="normal">
|
||||
<title xml:lang="ko">기본</title>
|
||||
<title xml:lang="jp">デフォルト</title>
|
||||
<title xml:lang="zh-CN">基本</title>
|
||||
<title xml:lang="en">Default</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||
BIN
modules/point/tpl/.action_config.html.swp
Normal file
45
modules/point/tpl/action_config.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<!--%import("filter/insert_act_config.xml")-->
|
||||
<!--#include("./header.html")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_act_config);" id="fo_point">
|
||||
|
||||
<div class="infoText">{$lang->about_act_config}</div>
|
||||
<table cellspacing="0" class="tableType2 gap1">
|
||||
<col width="200" />
|
||||
<col />
|
||||
<tr>
|
||||
<th>{$lang->point_insert_document}</th>
|
||||
<td><input type="text" name="insert_document_act" value="{$config->insert_document_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->point_delete_document}</th>
|
||||
<td><input type="text" name="delete_document_act" value="{$config->delete_document_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->point_insert_comment}</th>
|
||||
<td><input type="text" name="insert_comment_act" value="{$config->insert_comment_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->point_delete_comment}</th>
|
||||
<td><input type="text" name="delete_comment_act" value="{$config->delete_comment_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->point_upload_file}</th>
|
||||
<td><input type="text" name="upload_file_act" value="{$config->upload_file_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->point_delete_file}</th>
|
||||
<td><input type="text" name="delete_file_act" value="{$config->delete_file_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->point_download_file}</th>
|
||||
<td><input type="text" name="download_file_act" value="{$config->download_file_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div class="tRight gap1">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
64
modules/point/tpl/config.html
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<!--%import("filter/insert_config.xml")-->
|
||||
<!--#include("./header.html")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config);">
|
||||
|
||||
<div class="infoText">{$lang->about_point_module}</div>
|
||||
<table cellspacing="0" class="tableType2 gap1">
|
||||
<col width="200" />
|
||||
<col width="40" />
|
||||
<col width="40" />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="col">{$lang->max_level}</th>
|
||||
<td colspan="3">
|
||||
<input type="text" class="inputTypeText w80" value="{$config->max_level}" name="max_level" />
|
||||
<p>{$lang->about_max_level}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->point_name}</th>
|
||||
<td colspan="3">
|
||||
<input type="text" class="inputTypeText w80" value="{$config->point_name}" name="point_name" />
|
||||
<p>{$lang->about_point_name}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->level_icon}</th>
|
||||
<td colspan="3">
|
||||
<select name="level_icon">
|
||||
<!--@foreach($level_icon_list as $key => $val)-->
|
||||
<option value="{$val}" <!--@if($config->level_icon == $val)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<p>{$lang->about_level_icon}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->disable_download}</th>
|
||||
<td colspan="3">
|
||||
<input type="checkbox" name="disable_download" value="Y" <!--@if($config->disable_download=='Y')-->checked="checked"<!--@end--> />
|
||||
{$lang->about_disable_download}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" rowspan="{$config->max_level}">{$lang->level_point}</th>
|
||||
<td>1</td>
|
||||
<td><img src="{getUrl()}/modules/point/icons/{$config->level_icon}/1.gif" alt="" /></td>
|
||||
<td><input type="text" name="level_step_1" value="{$config->level_step[1]}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
</tr>
|
||||
<!--@for($i=2;$i<=$config->max_level;$i++)-->
|
||||
<tr>
|
||||
<td>{$i}</td>
|
||||
<td><img src="{getUrl()}/modules/point/icons/{$config->level_icon}/{$i}.gif" alt="" /></td>
|
||||
<td><input type="text" name="level_step_{$i}" value="{$config->level_step[$i]}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div class="tRight gap1">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
8
modules/point/tpl/filter/insert_act_config.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<filter name="insert_act_config" module="point" act="procPointAdminInsertActConfig" confirm_msg_code="confirm_update">
|
||||
<form />
|
||||
<parameter />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
8
modules/point/tpl/filter/insert_config.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<filter name="insert_config" module="point" act="procPointAdminInsertConfig" confirm_msg_code="confirm_update">
|
||||
<form />
|
||||
<parameter />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
8
modules/point/tpl/filter/insert_module_config.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<filter name="insert_module_config" module="point" act="procPointAdminInsertModuleConfig" confirm_msg_code="confirm_update">
|
||||
<form />
|
||||
<parameter />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
12
modules/point/tpl/header.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<!--%import("js/point_admin.js")-->
|
||||
<h3>{$lang->point} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<!--@if($module=='admin')-->
|
||||
<div class="header4">
|
||||
<ul class="localNavigation">
|
||||
<li <!--@if($act=='dispPointAdminConfig')-->class="on"<!--@end-->><a href="{getUrl('act','dispPointAdminConfig')}">{$lang->cmd_point_config}</a></li>
|
||||
<li <!--@if($act=='dispPointAdminModuleConfig')-->class="on"<!--@end-->><a href="{getUrl('act','dispPointAdminModuleConfig')}">{$lang->cmd_point_module_config}</a></li>
|
||||
<li <!--@if($act=='dispPointAdminActConfig')-->class="on"<!--@end-->><a href="{getUrl('act','dispPointAdminActConfig')}">{$lang->cmd_point_act_config}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--@end-->
|
||||
6
modules/point/tpl/js/point_admin.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* @file modules/point/js/point_admin.js
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief point 모듈의 관리자용 javascript
|
||||
**/
|
||||
|
||||
38
modules/point/tpl/module_config.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!--%import("filter/insert_module_config.xml")-->
|
||||
<!--#include("./header.html")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_module_config);" id="fo_point">
|
||||
|
||||
<div class="infoText">{$lang->about_module_point}</div>
|
||||
<table cellspacing="0" class="tableType2 gap1">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{$lang->point_insert_document}</th>
|
||||
<th>{$lang->point_insert_comment}</th>
|
||||
<th>{$lang->point_upload_file}</th>
|
||||
<th>{$lang->point_download_file}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">{$lang->is_default}</th>
|
||||
<td><input type="text" name="insert_document" value="{$config->insert_document}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="insert_comment" value="{$config->insert_comment}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="upload_file" value="{$config->upload_file}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="download_file" value="{$config->download_file}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
</tr>
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<tr>
|
||||
<th scope="col">{$val->browser_title} ({$val->mid})</th>
|
||||
<td><input type="text" name="insert_document_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['insert_document']}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="insert_comment_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['insert_comment']}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="upload_file_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['upload_file']}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="download_file_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['download_file']}" class="inputTypeText w80" /> {$config->point_name}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div class="tRight gap1">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||