From 5c7f4c43ae4e8762fd8d2f5f3fe23136360e447a Mon Sep 17 00:00:00 2001 From: hide_d Date: Wed, 25 Apr 2018 00:28:26 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A6=AC=EC=85=8B=20=EC=8B=9C=20=ED=86=A0?= =?UTF-8?q?=EB=84=88=EB=A8=BC=ED=8A=B8=20=EA=B0=9C=EC=B5=9C=20=EC=97=AC?= =?UTF-8?q?=EB=B6=80=EB=8F=84=20=EA=B0=99=EC=9D=B4=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/install.php | 36 ++++++++++++++++++++++++++++++++++-- hwe/j_install.php | 14 ++++++++++++-- hwe/js/install.js | 4 +++- 3 files changed, 49 insertions(+), 5 deletions(-) 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();