diff --git a/hwe/install.php b/hwe/install.php index bc34267c..0a39ef46 100644 --- a/hwe/install.php +++ b/hwe/install.php @@ -155,10 +155,42 @@ if($session->userGrade < 5){ 전콘 + + + + +
+ +
+
+ + + + + + + +
diff --git a/hwe/j_install.php b/hwe/j_install.php index 28349223..005057aa 100644 --- a/hwe/j_install.php +++ b/hwe/j_install.php @@ -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){ diff --git a/hwe/js/install.js b/hwe/js/install.js index 6f76bf75..12c19f9e 100644 --- a/hwe/js/install.js +++ b/hwe/js/install.js @@ -113,6 +113,7 @@ function formSetup(){ extend:"required", npcmode:"required", show_img_level:"required", + tournament_trig:"required" }, errorElement: "div", errorPlacement: function ( error, element ) { @@ -149,7 +150,8 @@ function formSetup(){ fiction:$('#fiction input:radio:checked').val(), extend:$('#extend input:radio:checked').val(), npcmode:$('#npcmode input:radio:checked').val(), - show_img_level:$('#show_img_level input:radio:checked').val() + show_img_level:$('#show_img_level input:radio:checked').val(), + tournament_trig:$('#tournament_trig input:radio:checked').val() } }).then(function(result){ var deferred = $.Deferred();