리셋 시 토너먼트 개최 여부도 같이 설정
This commit is contained in:
+34
-2
@@ -155,10 +155,42 @@ if($session->userGrade < 5){
|
||||
<input type="radio" name="show_img_level" value="1">전콘
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="show_img_level" value="2" checked>전콘, 병종
|
||||
<input type="radio" name="show_img_level" value="2">전콘, 병종
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="show_img_level" value="3">전콘, 병종, NPC
|
||||
<input type="radio" name="show_img_level" value="3" checked>전콘, 병종, NPC
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="tournament_trig" class="col-sm-3 col-form-label">토너먼트 자동 시작<br>경기 단위</label>
|
||||
<div class="col-sm-9" id="tournament_trig">
|
||||
<div id="tournament_trig" class="btn-group-toggle btn-group flex-wrap" data-toggle="buttons">
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="0">안함
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="1">12분(총 5일)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="2">7분(총 10시간)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="3">3분(총 4시간)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25 active">
|
||||
<input type="radio" name="tournament_trig" value="4" checked>1분(총 82분)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="5">30초(총 41분)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="6">15초(총 21분)
|
||||
</label>
|
||||
<label class="btn btn-secondary w-25">
|
||||
<input type="radio" name="tournament_trig" value="7">5초(총 7분)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+12
-2
@@ -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){
|
||||
|
||||
+3
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user