삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
31
modules/point/conf/info.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module version="0.1">
|
||||
<title xml:lang="ko">포인트 시스템</title>
|
||||
<title xml:lang="zh-CN">积分系统</title>
|
||||
<title xml:lang="jp">ポイントシステム</title>
|
||||
<title xml:lang="en">Point System</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 7. 26">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="zh-CN">Zero</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">
|
||||
글작성/삭제/댓글작성/삭제시에 포인트를 부여할 수 있습니다.
|
||||
포인트마다 레벨을 지정하여 사용자 이름 앞에 아이콘을 표시할 수도 있습니다.
|
||||
단 포인트 관련 애드온을 활성화 시키셔야 됩니다.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
可以在发表/删除新帖,发表/删除评论时,付与相应积分。
|
||||
也可以以积分设置级别,并在用户名前显示级别图标。
|
||||
必须是先激活积分系统才可以使用。
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
書き込み作成・削除/コメント作成・削除の活動に対するポイントを計算するシステムです。ポイントごとレベルを指定してユーザ名の前にアイコンを表示させることができます。但し、ポイントシステムアドオンを「使用」に設定しないと作動しません。
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
You can grant point on writing/deleting/adding comments/deleting comments.
|
||||
You can also display point icon in front of user name by selecting level on each point.
|
||||
But to enable these functions, you need to activate point related addons.
|
||||
</description>
|
||||
</author>
|
||||
</module>
|
||||
15
modules/point/conf/module.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?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="dispPointAdminPointList" 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" />
|
||||
<action name="procPointAdminUpdatePoint" 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 |
46
modules/point/lang/en.lang.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/point/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief Default language pack of point module
|
||||
**/
|
||||
|
||||
$lang->point = "Point";
|
||||
$lang->level = "Level";
|
||||
|
||||
$lang->about_point_module = "You can grant points on writing/adding comments/uploading/downloading.<br />But point module only configure settings, and the point will be accumulated only when point addon is activated";
|
||||
$lang->about_act_config = "Each module like board/blog has action such as writing/deleting/adding comments/deleting comments.<br />You can just add act value to link module except board/blog with point system.<br />Comma(,) will distinguish multiple values.";
|
||||
|
||||
$lang->max_level = 'Max Level';
|
||||
$lang->about_max_level = 'You can set the max level. Level icons should be considered and 1000 is the maximum value you can set';
|
||||
|
||||
$lang->level_icon = 'Level Icon';
|
||||
$lang->about_level_icon = 'Path of level icon is ./module/point/icons/[level].gif and max level could be different with icon set. So be careful';
|
||||
|
||||
$lang->point_name = 'Point Name';
|
||||
$lang->about_point_name = 'You can give point name or unit';
|
||||
|
||||
$lang->level_point = 'Level Point';
|
||||
$lang->about_level_point = 'Level will be adjusted when point reaches to each level point or decrease under each level point';
|
||||
|
||||
$lang->disable_download = 'Prohibit Downloads';
|
||||
$lang->about_disable_download = "It will prohibit downloads when there isn't enough point. (Exclude image files)";
|
||||
|
||||
$lang->about_module_point = "You can set point for each module and modules which don't have any value will use default point.<br />All point will be restored on acting reverse.";
|
||||
|
||||
$lang->point_insert_document = 'On Writing';
|
||||
$lang->point_delete_document = 'On Deleting';
|
||||
$lang->point_insert_comment = 'On Adding Comments';
|
||||
$lang->point_delete_comment = 'On Deleting Comments';
|
||||
$lang->point_upload_file = 'On Uploading';
|
||||
$lang->point_delete_file = 'On Deleting Files';
|
||||
$lang->point_download_file = 'On Downloading Files (Exclude images)';
|
||||
|
||||
|
||||
$lang->cmd_point_config = 'Default Setting';
|
||||
$lang->cmd_point_module_config = 'Module Setting';
|
||||
$lang->cmd_point_act_config = 'Act Setting';
|
||||
$lang->cmd_point_member_list = 'Member Point List';
|
||||
|
||||
$lang->msg_cannot_download = "You don't have enough point to download";
|
||||
?>
|
||||
46
modules/point/lang/jp.lang.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/point/lang/jp.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa
|
||||
* @brief ポイント(point)モジュールの基本言語パッケージ
|
||||
**/
|
||||
|
||||
$lang->point = "ポイント";
|
||||
$lang->level = "レベル";
|
||||
|
||||
$lang->about_point_module = "ポイントモジュールでは、書き込み作成/コメント作成/アップロード/ダウンロードなどのユーザの活動に対してポイントの計算を行います。但し、ポイントモジュールでは設定のみを行い、アドオンでポイントシステムを「使用」に設定しなければポイントは累積されません。";
|
||||
$lang->about_act_config = "掲示板、ブログなどのモジュールごと書き込み作成・削除/コメント作成・削除などのアクションがあります。掲示板/ブログ以外のモジュールにポイントシステムを連動させたい場合は、各機能のアクションの「act値」を追加します。連動は「,(コンマ)」で行います。";
|
||||
|
||||
$lang->max_level = '最高レベル';
|
||||
$lang->about_max_level = '最高レベルを指定することができます。最高レベルは「1000」がマクシマムなので、レベルアイコンに注意が必要です。';
|
||||
|
||||
$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 = 'モジュール別にポイントを指定することができますが、指定されていないモジュールでは、デフォルトポイントが使用されます。すべてのポイント数は、反対のアクションを行った際には原状復帰されます。';
|
||||
|
||||
$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 = '機能別アクション設定';
|
||||
$lang->cmd_point_member_list = '会員ポイントリスト';
|
||||
|
||||
$lang->msg_cannot_download = 'ポイントが不足しているため、ダウンロードできません。';
|
||||
?>
|
||||
46
modules/point/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?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 = '최고레벨을 지정하실 수 있습니다. 레벨 아이콘을 염두에 두셔야 하고 최고 레벨은 1000이 한계입니다';
|
||||
|
||||
$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->cmd_point_member_list = '회원 포인트 목록';
|
||||
|
||||
$lang->msg_cannot_download = '포인트가 부족하여 다운로드를 하실 수 없습니다';
|
||||
?>
|
||||
46
modules/point/lang/zh-CN.lang.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?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 = "版面,博客等模块都有发表/删除新帖,发表/删除评论等动作。 <br />要想与版面/博客之外的模块关联积分功能时,添加与其各模块功能相适合的act值即可。";
|
||||
|
||||
$lang->max_level = '最高级别';
|
||||
$lang->about_max_level = '可以指定最高级别。级别共设1000级,因此制作级别图标时要好好考虑一下。';
|
||||
|
||||
$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 />所有积分在相反动作下恢复原始值。即:发表新帖后再删除得到的积分为0分。';
|
||||
|
||||
$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->cmd_point_member_list = '会员积分目录';
|
||||
|
||||
$lang->msg_cannot_download = '积分不足无法下载!';
|
||||
?>
|
||||
150
modules/point/point.admin.controller.php
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
<?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>1000) $config->max_level = 1000;
|
||||
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';
|
||||
|
||||
unset($config->level_step);
|
||||
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 procPointAdminUpdatePoint() {
|
||||
$member_srl = Context::get('member_srl');
|
||||
$point = Context::get('point');
|
||||
|
||||
$oPointController = &getController('point');
|
||||
return $oPointController->setPoint($member_srl, $point);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
78
modules/point/point.admin.view.php
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?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);
|
||||
|
||||
// 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');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 포인트순 목록 가져오기
|
||||
**/
|
||||
function dispPointAdminPointList() {
|
||||
$oPointModel = &getModel('point');
|
||||
$args->list_count = 20;
|
||||
$args->page = Context::get('page');
|
||||
|
||||
$output = $oPointModel->getMemberList($args);
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('member_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('member_list');
|
||||
}
|
||||
}
|
||||
?>
|
||||
93
modules/point/point.class.php
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<?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');
|
||||
$oModuleController->insertActionForward('point', 'view', 'dispPointAdminPointList');
|
||||
|
||||
// 포인트 정보를 기록할 디렉토리 생성
|
||||
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');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
87
modules/point/point.controller.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?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($member_srl<1) return $matches[0];
|
||||
|
||||
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 = sprintf('<%s title="%s:%s%s %s, %s:%s/%s" style="cursor:pointer;background:url(%s) no-repeat left;padding-left:%dpx; height:%dpx">%s</%s> ', $matches[6], Context::getLang('point'), $point, $this->config->point_name, $per?"(".$per."%)":"", Context::getLang('level'), $level, $this->config->max_level, Context::getRequestUri().$src, $this->icon_width+2, $this->icon_height, $matches[0], $matches[6]);
|
||||
$this->member_code[$member_srl] = $code;
|
||||
|
||||
return $this->member_code[$member_srl];
|
||||
}
|
||||
}
|
||||
?>
|
||||
76
modules/point/point.model.php
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<?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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 포인트 순 회원목록 가져오기
|
||||
**/
|
||||
function getMemberList($args = null) {
|
||||
if(!$args) {
|
||||
$args->list_count = 20;
|
||||
$args->page = 1;
|
||||
}
|
||||
$output = executeQuery("point.getMemberList", $args);
|
||||
if($output->total_count) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
foreach($output->data as $key => $val) {
|
||||
$point = $val->point;
|
||||
$level = $this->getLevel($val->point, $config->level_step);
|
||||
$output->data[$key]->level = $level;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
16
modules/point/queries/getMemberList.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<query id="getMemberListWithinGroup" action="select">
|
||||
<tables>
|
||||
<table name="member" alias="member"/>
|
||||
<table name="point" alias="point"/>
|
||||
</tables>
|
||||
<columns />
|
||||
<conditions>
|
||||
<condition operation="equal" column="member.member_srl" var="point.member_srl" pipe="and" notnull="notnull" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="point.point" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
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>
|
||||
8
modules/point/tpl/filter/update_point.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<filter name="update_point" module="point" act="procPointAdminUpdatePoint" confirm_msg_code="confirm_update">
|
||||
<form />
|
||||
<parameter />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
13
modules/point/tpl/header.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!--%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>
|
||||
<li <!--@if($act=='dispPointAdminPointList')-->class="on"<!--@end-->><a href="{getUrl('act','dispPointAdminPointList')}">{$lang->cmd_point_member_list}</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
|
||||
**/
|
||||
|
||||
48
modules/point/tpl/member_list.html
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<!--%import("filter/update_point.xml")-->
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<!-- 목록 -->
|
||||
<table cellspacing="0" class="tableType1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->no}</th>
|
||||
<th scope="col">{$lang->user_id}</th>
|
||||
<th scope="col">{$lang->user_name}</th>
|
||||
<th scope="col">{$lang->nick_name}</th>
|
||||
<th scope="col">{$lang->point}</th>
|
||||
<th scope="col">{$lang->level}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($member_list as $no => $val)-->
|
||||
<tr>
|
||||
<td class="tahoma">{$no}</td>
|
||||
<td class="blue">{htmlspecialchars($val->user_id)}</td>
|
||||
<td>{htmlspecialchars($val->user_name)}</td>
|
||||
<td class="left"><div class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</div></td>
|
||||
<td class="tahoma">
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, update_point);">
|
||||
<input type="hidden" name="member_srl" value="{$val->member_srl}" />
|
||||
<input type="text" name="point" value="{$val->point}" class="inputTypeText w80" />
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_update}" /></span>
|
||||
</form>
|
||||
</td>
|
||||
<td class="tahoma">{$val->level}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 페이지 네비게이션 -->
|
||||
<div class="pageNavigation">
|
||||
<a href="{getUrl('page','','module_srl','')}" class="goToFirst"><img src="../../admin/tpl/images/bottomGotoFirst.gif" alt="{$lang->first_page}" width="7" height="5" /></a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<span class="current">{$page_no}</span>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="goToLast"><img src="../../admin/tpl/images/bottomGotoLast.gif" alt="{$lang->last_page}" width="7" height="5" /></a>
|
||||
</div>
|
||||
|
||||
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>
|
||||