mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
레벨이 변경될때 소속 그룹도 변경되도록 포인트 모듈 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3505 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bf1c149c3d
commit
89466e6e0e
12 changed files with 136 additions and 1 deletions
|
|
@ -24,9 +24,11 @@
|
|||
// 변수 정리
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
// 포인트 이름 체크
|
||||
$config->point_name = $args->point_name;
|
||||
if(!$config->point_name) $config->point_name = 'point';
|
||||
|
||||
// 기본 포인트 지정
|
||||
$config->signup_point = (int)$args->signup_point;
|
||||
$config->login_point = (int)$args->login_point;
|
||||
$config->insert_document = (int)$args->insert_document;
|
||||
|
|
@ -35,20 +37,35 @@
|
|||
$config->upload_file = (int)$args->upload_file;
|
||||
$config->download_file = (int)$args->download_file;
|
||||
|
||||
// 최고 레벨
|
||||
$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';
|
||||
|
||||
// 레벨별 그룹 설정
|
||||
foreach($args as $key => $val) {
|
||||
if(substr($key, 0, strlen('point_group_')) != 'point_group_') continue;
|
||||
$group_srl = substr($key, strlen('point_group_'));
|
||||
$level = $val;
|
||||
if(!$level) unset($config->point_group[$group_srl]);
|
||||
else $config->point_group[$group_srl] = $level;
|
||||
}
|
||||
|
||||
// 레벨별 포인트 설정
|
||||
unset($config->level_step);
|
||||
for($i=1;$i<=$config->max_level;$i++) {
|
||||
$key = "level_step_".$i;
|
||||
$config->level_step[$i] = (int)$args->{$key};
|
||||
}
|
||||
|
||||
// 레벨별 포인트 계산 함수
|
||||
$config->expression = $args->expression;
|
||||
|
||||
// 저장
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue