리셋 시 토너먼트 개최 여부도 같이 설정

This commit is contained in:
2018-04-25 00:28:26 +09:00
parent 3da256cc29
commit 5c7f4c43ae
3 changed files with 49 additions and 5 deletions
+12 -2
View File
@@ -28,7 +28,8 @@ $v->rule('required', [
'fiction',
'extend',
'npcmode',
'show_img_level'
'show_img_level',
'tournament_trig'
]);
if(!$v->validate()){
Json::die([
@@ -44,6 +45,7 @@ $fiction = (int)$_POST['fiction'];
$extend = (int)$_POST['extend'];
$npcmode = (int)$_POST['npcmode'];
$show_img_level = (int)$_POST['show_img_level'];
$tournament_trig = (int)$_POST['tournament_trig'];
if(120 % $turnterm != 0){
Json::die([
@@ -52,6 +54,13 @@ if(120 % $turnterm != 0){
]);
}
if($tournament_trig < 0 || $tournament_trig > 7){
Json::die([
'result'=>false,
'reason'=>'올바르지 않은 토너먼트 주기입니다.'
]);
}
if(!file_exists(__dir__.'/logs') || !file_exists(__dir__.'/data')){
if(!is_writable(__dir__)){
Json::die([
@@ -184,7 +193,8 @@ $env = [
'show_img_level'=>$show_img_level,
'npcmode'=>$npcmode,
'extended_general'=>$extend,
'fiction'=>$fiction
'fiction'=>$fiction,
'tnmt_trig'=>$tournament_trig
];
foreach(RootDB::db()->query('SELECT `no`, `name`, `picture`, `imgsvr` FROM member WHERE grade >= 5') as $admin){