mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +09:00
moduleModel 및 moduleController에서 제공하던 각 모듈별 설정을 이용시 너무 많은 설정값들이 생길 경우 이를 serialize/ unserialize하는데 드는 부하가 커짐을 방지하기 위해서 module_config외에 module_part_config 테이블을 주고 module_srl 별 설정을 분산하도록 하여 쓸데없는 부하가 생기지 않도록 수정.
files/cache/module_info내에 있던 module_config 캐시 파일도 사용하지 않도록 변경 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4696 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc7dd67ed2
commit
5934906056
41 changed files with 372 additions and 445 deletions
|
|
@ -4,12 +4,10 @@
|
|||
<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" />
|
||||
<action name="procPointAdminInsertPointModuleConfig" type="controller" standalone="true" />
|
||||
<action name="procPointAdminApplyPoint" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -83,11 +83,6 @@
|
|||
* @brief 모듈별 설정 저장
|
||||
**/
|
||||
function procPointAdminInsertModuleConfig() {
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 변수 정리
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
foreach($args as $key => $val) {
|
||||
|
|
@ -95,13 +90,15 @@
|
|||
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] = (int)$val;
|
||||
if(strlen($val)>0) $module_config[$module_srl][$name] = (int)$val;
|
||||
}
|
||||
|
||||
// 저장
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
if(count($module_config)) {
|
||||
foreach($module_config as $module_srl => $config) {
|
||||
$oModuleController->insertModulePartConfig('point',$module_srl,$config);
|
||||
}
|
||||
}
|
||||
|
||||
$this->cacheActList();
|
||||
|
||||
|
|
@ -119,58 +116,26 @@
|
|||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 설정 저장
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$config->module_point[$srl]['insert_document'] = (int)Context::get('insert_document');
|
||||
$config->module_point[$srl]['insert_comment'] = (int)Context::get('insert_comment');
|
||||
$config->module_point[$srl]['upload_file'] = (int)Context::get('upload_file');
|
||||
$config->module_point[$srl]['download_file'] = (int)Context::get('download_file');
|
||||
$config->module_point[$srl]['read_document'] = (int)Context::get('read_document');
|
||||
$config->module_point[$srl]['voted'] = (int)Context::get('voted');
|
||||
$config->module_point[$srl]['blamed'] = (int)Context::get('blamed');
|
||||
unset($config);
|
||||
$config['insert_document'] = (int)Context::get('insert_document');
|
||||
$config['insert_comment'] = (int)Context::get('insert_comment');
|
||||
$config['upload_file'] = (int)Context::get('upload_file');
|
||||
$config['download_file'] = (int)Context::get('download_file');
|
||||
$config['read_document'] = (int)Context::get('read_document');
|
||||
$config['voted'] = (int)Context::get('voted');
|
||||
$config['blamed'] = (int)Context::get('blamed');
|
||||
$oModuleController->insertModulePartConfig('point', $srl, $config);
|
||||
}
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
|
||||
$this->setError(-1);
|
||||
$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 회원 포인트 변경
|
||||
**/
|
||||
|
|
@ -192,6 +157,8 @@
|
|||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
$module_config = $oModuleModel->getModulePartConfigs('point');
|
||||
|
||||
// 회원의 포인트 저장을 위한 변수
|
||||
$member = array();
|
||||
|
||||
|
|
@ -201,7 +168,7 @@
|
|||
|
||||
if($output->data) {
|
||||
foreach($output->data as $key => $val) {
|
||||
if($config->module_point[$val->module_srl]['insert_document']) $insert_point = $config->module_point[$val->module_srl]['insert_document'];
|
||||
if($module_config[$val->module_srl]['insert_document']) $insert_point = $module_config[$val->module_srl]['insert_document'];
|
||||
else $insert_point = $config->insert_document;
|
||||
|
||||
if(!$val->member_srl) continue;
|
||||
|
|
@ -217,7 +184,7 @@
|
|||
|
||||
if($output->data) {
|
||||
foreach($output->data as $key => $val) {
|
||||
if($config->module_point[$val->module_srl]['insert_comment']) $insert_point = $config->module_point[$val->module_srl]['insert_comment'];
|
||||
if($module_config[$val->module_srl]['insert_comment']) $insert_point = $module_config[$val->module_srl]['insert_comment'];
|
||||
else $insert_point = $config->insert_comment;
|
||||
|
||||
if(!$val->member_srl) continue;
|
||||
|
|
@ -233,7 +200,7 @@
|
|||
|
||||
if($output->data) {
|
||||
foreach($output->data as $key => $val) {
|
||||
if($config->module_point[$val->module_srl]['upload_file']) $insert_point = $config->module_point[$val->module_srl]['upload_file'];
|
||||
if($module_config[$val->module_srl]['upload_file']) $insert_point = $module_config[$val->module_srl]['upload_file'];
|
||||
else $insert_point = $config->upload_file;
|
||||
|
||||
if(!$val->member_srl) continue;
|
||||
|
|
@ -306,23 +273,7 @@
|
|||
* @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);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@
|
|||
$mid_list = $oModuleModel->getMidList();
|
||||
Context::set('mid_list', $mid_list);
|
||||
|
||||
Context::set('module_config', $oModuleModel->getModulePartConfigs('point'));
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplateFile('module_config');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,6 @@
|
|||
function checkUpdate() {
|
||||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 가입/글작성/댓글작성/파일업로드/다운로드에 대한 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('member.insertMember', 'point', 'controller', 'triggerInsertMember', 'after')) return true;
|
||||
|
|
@ -144,8 +143,6 @@
|
|||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 가입/글작성/댓글작성/파일업로드/다운로드에 대한 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('member.insertMember', 'point', 'controller', 'triggerInsertMember', 'after'))
|
||||
$oModuleController->insertTrigger('member.insertMember', 'point', 'controller', 'triggerInsertMember', 'after');
|
||||
|
|
|
|||
|
|
@ -81,17 +81,18 @@
|
|||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point',$module_srl);
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $config->module_point[$module_srl]['insert_document'];
|
||||
$point = $module_config['insert_document'];
|
||||
if(!isset($point)) $point = $config->insert_document;
|
||||
$cur_point += $point;
|
||||
|
||||
// 첨부파일 등록에 대한 포인트 추가
|
||||
$point = $config->module_point[$module_srl]['upload_file'];
|
||||
$point = $module_config['upload_file'];
|
||||
if(!isset($point)) $point = $config->upload_file;
|
||||
if($obj->uploaded_count) $cur_point += $point * $obj->uploaded_count;
|
||||
|
||||
|
|
@ -108,12 +109,17 @@
|
|||
$document_srl = $obj->document_srl;
|
||||
$member_srl = $obj->member_srl;
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->isExists()) return new Object();
|
||||
|
||||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point',$oDocument->get('module_srl'));
|
||||
|
||||
// 지울 대상 글의 댓글에 대한 처리
|
||||
$comment_point = $config->module_point[$module_srl]['insert_comment'];
|
||||
$comment_point = $module_config['insert_comment'];
|
||||
if(!isset($comment_point)) $comment_point = $config->insert_comment;
|
||||
|
||||
// 댓글 포인트가 있으면 증감(+) 이면 차감 시도
|
||||
|
|
@ -142,7 +148,7 @@
|
|||
$oPointModel = &getModel('point');
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['download_file'];
|
||||
$point = $module_config['download_file'];
|
||||
foreach($member_srls as $member_srl => $cnt) {
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
$cur_point -= $cnt * $comment_point;
|
||||
|
|
@ -173,8 +179,9 @@
|
|||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
$point = $config->module_point[$module_srl]['insert_document'];
|
||||
$point = $module_config['insert_document'];
|
||||
if(!isset($point)) $point = $config->insert_document;
|
||||
|
||||
// 포인트가 마이너스 즉 글을 작성시 마다 차감되는 경우라면 글 삭제시 증가시켜주지 않도록 수정
|
||||
|
|
@ -182,7 +189,7 @@
|
|||
$cur_point -= $point;
|
||||
|
||||
// 첨부파일 삭제에 대한 포인트 추가
|
||||
$point = $config->module_point[$module_srl]['upload_file'];
|
||||
$point = $module_config['upload_file'];
|
||||
if(!isset($point)) $point = $config->upload_file;
|
||||
if($obj->uploaded_count) $cur_point -= $point * $obj->uploaded_count;
|
||||
|
||||
|
|
@ -209,12 +216,13 @@
|
|||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $config->module_point[$module_srl]['insert_comment'];
|
||||
$point = $module_config['insert_comment'];
|
||||
if(!isset($point)) $point = $config->insert_comment;
|
||||
|
||||
// 포인트 증감
|
||||
|
|
@ -235,12 +243,13 @@
|
|||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $config->module_point[$module_srl]['insert_comment'];
|
||||
$point = $module_config['insert_comment'];
|
||||
if(!isset($point)) $point = $config->insert_comment;
|
||||
|
||||
// 포인트가 마이너스 즉 댓글을 작성시 마다 차감되는 경우라면 댓글 삭제시 증가시켜주지 않도록 수정
|
||||
|
|
@ -259,26 +268,6 @@
|
|||
**/
|
||||
function triggerInsertFile(&$obj) {
|
||||
return new Object();
|
||||
$module_srl = $obj->module_srl;
|
||||
$member_srl = $obj->member_srl;
|
||||
if(!$module_srl || !$member_srl) return new Object();
|
||||
|
||||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $config->module_point[$module_srl]['upload_file'];
|
||||
if(!isset($point)) $point = $config->upload_file;
|
||||
|
||||
// 포인트 증감
|
||||
$cur_point += $point;
|
||||
$this->setPoint($member_srl,$cur_point);
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -295,12 +284,13 @@
|
|||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $config->module_point[$module_srl]['upload_file'];
|
||||
$point = $module_config['upload_file'];
|
||||
if(!isset($point)) $point = $config->upload_file;
|
||||
|
||||
// 포인트 증감
|
||||
|
|
@ -314,27 +304,25 @@
|
|||
* @brief 파일 다운로드 전에 호출되는 trigger
|
||||
**/
|
||||
function triggerBeforeDownloadFile(&$obj) {
|
||||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
// 포인트가 없으면 다운로드가 안되도록 하였으면 비로그인 회원일 경우 중지
|
||||
if(!Context::get('is_logged') && $config->disable_download == 'Y') return new Object(-1,'msg_not_permitted_download');
|
||||
|
||||
// 로그인 상태일때만 실행
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info->member_srl) return new Object();
|
||||
|
||||
$member_srl = $logged_info->member_srl;
|
||||
$module_srl = $obj->module_srl;
|
||||
if(!$module_srl) return new Object();
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
// 포인트가 없으면 다운로드가 안되도록 하였으면 비로그인 회원일 경우 중지
|
||||
if(!Context::get('is_logged') && $config->disable_download == 'Y') return new Object(-1,'msg_not_permitted_download');
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['download_file'];
|
||||
$point = $module_config['download_file'];
|
||||
if(!isset($point)) $point = $config->download_file;
|
||||
|
||||
// 포인트가 0보다 작고 포인트가 없으면 파일 다운로드가 안되도록 했다면 오류
|
||||
|
|
@ -350,7 +338,6 @@
|
|||
// 로그인 상태일때만 실행
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info->member_srl) return new Object();
|
||||
|
||||
$module_srl = $obj->module_srl;
|
||||
$member_srl = $logged_info->member_srl;
|
||||
if(!$module_srl) return new Object();
|
||||
|
|
@ -358,13 +345,14 @@
|
|||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$module_srl]['download_file'];
|
||||
$point = $module_config['download_file'];
|
||||
if(!isset($point)) $point = $config->download_file;
|
||||
|
||||
// 포인트 증감
|
||||
|
|
@ -381,20 +369,20 @@
|
|||
// 로그인 상태일때만 실행
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info->member_srl) return new Object();
|
||||
$member_srl = $logged_info->member_srl;
|
||||
$module_srl = $obj->get('module_srl');
|
||||
|
||||
// point 모듈 정보 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
$member_srl = $logged_info->member_srl;
|
||||
$module_srl = $obj->get('module_srl');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
// 대상 회원의 포인트를 구함
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
// 포인트를 구해옴
|
||||
$point = $config->module_point[$obj->get('module_srl')]['read_document'];
|
||||
$point = $module_config['read_document'];
|
||||
if(!isset($point)) $point = $config->read_document;
|
||||
|
||||
// 조회 포인트가 없으면 패스
|
||||
|
|
@ -427,18 +415,16 @@
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
$oPointModel = &getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
if( $obj->point > 0 )
|
||||
{
|
||||
$point = $config->module_point[$module_srl]['voted'];
|
||||
if( $obj->point > 0 ) {
|
||||
$point = $module_config['voted'];
|
||||
if(!isset($point)) $point = $config->voted;
|
||||
}
|
||||
else
|
||||
{
|
||||
$point = $config->module_point[$module_srl]['blamed'];
|
||||
} else {
|
||||
$point = $module_config['blamed'];
|
||||
if(!isset($point)) $point = $config->blamed;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
$current_module_srls = Context::get('module_srls');
|
||||
|
||||
if(!$current_module_srl && !$current_module_srls) {
|
||||
// 선택된 모듈의 정보를 가져옴
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
|
|
@ -33,24 +32,23 @@
|
|||
|
||||
// 설정 정보 가져오기
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
|
||||
if($config->module_point[$current_module_srl]) $module_config = $config->module_point[$current_module_srl];
|
||||
else {
|
||||
$module_config['insert_document'] = $config->insert_document;
|
||||
$module_config['insert_comment'] = $config->insert_comment;
|
||||
$module_config['upload_file'] = $config->upload_file;
|
||||
$module_config['download_file'] = $config->download_file;
|
||||
$module_config['read_document'] = $config->read_document;
|
||||
|
||||
//2008.05.13 haneul
|
||||
$module_config['voted'] = $config->voted;
|
||||
$module_config['blamed'] = $config->blamed;
|
||||
if($current_module_srl) {
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $current_module_srl);
|
||||
if(!$module_config) {
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config['insert_document'] = $config->insert_document;
|
||||
$module_config['insert_comment'] = $config->insert_comment;
|
||||
$module_config['upload_file'] = $config->upload_file;
|
||||
$module_config['download_file'] = $config->download_file;
|
||||
$module_config['read_document'] = $config->read_document;
|
||||
$module_config['voted'] = $config->voted;
|
||||
$module_config['blamed'] = $config->blamed;
|
||||
}
|
||||
}
|
||||
|
||||
$module_config['module_srl'] = $current_module_srl;
|
||||
$module_config['point_name'] = $config->point_name;
|
||||
|
||||
Context::set('module_config', $module_config);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
<!--%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 topGap">
|
||||
<tr>
|
||||
<th><div>{$lang->point_insert_document}</div></th>
|
||||
<td><input type="text" name="insert_document_act" value="{$config->insert_document_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th><div>{$lang->point_delete_document}</div></th>
|
||||
<td><input type="text" name="delete_document_act" value="{$config->delete_document_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->point_insert_comment}</div></th>
|
||||
<td><input type="text" name="insert_comment_act" value="{$config->insert_comment_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th><div>{$lang->point_delete_comment}</div></th>
|
||||
<td><input type="text" name="delete_comment_act" value="{$config->delete_comment_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->point_upload_file}</div></th>
|
||||
<td><input type="text" name="upload_file_act" value="{$config->upload_file_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th><div>{$lang->point_delete_file}</div></th>
|
||||
<td><input type="text" name="delete_file_act" value="{$config->delete_file_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->point_download_file}</div></th>
|
||||
<td><input type="text" name="download_file_act" value="{$config->download_file_act}" class="inputTypeText w100" /></td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<td colspan="2" class="right">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<tbody>
|
||||
<!--@foreach($member_list as $no => $val)-->
|
||||
<tr>
|
||||
<td class="number">{$no}</td>
|
||||
<td class="center number">{$no}</td>
|
||||
<td class="nowrap">{htmlspecialchars($val->user_id)}</td>
|
||||
<td class="nowrap">{htmlspecialchars($val->user_name)}</td>
|
||||
<td class="nowrap"><span class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</span></td>
|
||||
|
|
|
|||
|
|
@ -25,17 +25,17 @@
|
|||
<tbody>
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<!--@if(in_array($val->module,array('guestbook','board','blog')))-->
|
||||
<tr>
|
||||
<tr class="row2">
|
||||
<th colspan="7" scope="col"><div><strong>{$val->browser_title}</strong> ({$val->mid})</div></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" name="insert_document_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['insert_document']}" class="inputTypeText w40" /> {$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 w40" /> {$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 w40" /> {$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 w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="read_document_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['read_document']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="voted_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['voted']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="blamed_{$val->module_srl}" value="{$config->module_point[$val->module_srl]['blamed']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="insert_document_{$val->module_srl}" value="{$module_config[$val->module_srl]['insert_document']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="insert_comment_{$val->module_srl}" value="{$module_config[$val->module_srl]['insert_comment']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="upload_file_{$val->module_srl}" value="{$module_config[$val->module_srl]['upload_file']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="download_file_{$val->module_srl}" value="{$module_config[$val->module_srl]['download_file']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="read_document_{$val->module_srl}" value="{$module_config[$val->module_srl]['read_document']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="voted_{$val->module_srl}" value="{$module_config[$val->module_srl]['voted']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
<td><input type="text" name="blamed_{$val->module_srl}" value="{$module_config[$val->module_srl]['blamed']}" class="inputTypeText w40" /> {$config->point_name}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
|
|
|
|||
36
modules/point/tpl/point_module_config.html
Normal file
36
modules/point/tpl/point_module_config.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!--%import("filter/insert_point_module_config.xml")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_point_module_config);" id="fo_point">
|
||||
<input type="hidden" name="target_module_srl" value="{$module_config['module_srl']?$module_config['module_srl']:$module_srls}" />
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<caption>{$lang->point}</caption>
|
||||
<tr>
|
||||
<th><div>{$lang->point_insert_document}</div></th>
|
||||
<td class="wide"><input type="text" name="insert_document" value="{$module_config['insert_document']}" class="inputTypeText w80" /> {$module_config['point_name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->point_insert_comment}</div></th>
|
||||
<td><input type="text" name="insert_comment" value="{$module_config['insert_comment']}" class="inputTypeText w80" /> {$module_config['point_name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->point_upload_file}</div></th>
|
||||
<td><input type="text" name="upload_file" value="{$module_config['upload_file']}" class="inputTypeText w80" /> {$module_config['point_name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->point_download_file}</div></th>
|
||||
<td><input type="text" name="download_file" value="{$module_config['download_file']}" class="inputTypeText w80" /> {$module_config['point_name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div>{$lang->point_read_document}</div></th>
|
||||
<td><input type="text" name="read_document" value="{$module_config['read_document']}" class="inputTypeText w80" /> {$module_config['point_name']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="right"><span class="button"><input type="submit" value="{$lang->cmd_save}" /></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 버튼 -->
|
||||
|
||||
</form>
|
||||
<div class="gap1"></div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue