서버 관리 폼 수정
부운영자, 운영자 권한 표기
This commit is contained in:
@@ -1 +0,0 @@
|
||||
@charset "utf-8";
|
||||
@@ -19,6 +19,10 @@ th, td {
|
||||
font-family: '맑은 고딕'; line-height: 110%;
|
||||
}
|
||||
|
||||
a.just_link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div {
|
||||
margin:0px;
|
||||
padding: 0px;
|
||||
|
||||
@@ -20,7 +20,6 @@ $userGrade = $session->userGrade;
|
||||
|
||||
<!-- 스타일 -->
|
||||
<link type="text/css" rel="stylesheet" href='../css/config.css'>
|
||||
<link type="text/css" rel="stylesheet" href='../css/app.css'>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href='../css/entrance.css'>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ if($session->userGrade < 5){
|
||||
|
||||
$result = [];
|
||||
|
||||
$server = [];
|
||||
|
||||
|
||||
foreach (AppConf::getList() as $setting) {
|
||||
@@ -60,9 +61,12 @@ foreach (AppConf::getList() as $setting) {
|
||||
$state = array_merge($state, [
|
||||
'name' => $serverDir,
|
||||
'korName' => $serverKorName,
|
||||
'color' => $serverColor
|
||||
'color' => $serverColor,
|
||||
]);
|
||||
$result[] = $state;
|
||||
$server[] = $state;
|
||||
}
|
||||
|
||||
Json::die($result);
|
||||
Json::die([
|
||||
'server' => $server,
|
||||
'grade' => $session->userGrade
|
||||
]);
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
<!-- 스타일 -->
|
||||
<link type="text/css" rel="stylesheet" href='../css/config.css'>
|
||||
<link type="text/css" rel="stylesheet" href='../css/app.css'>
|
||||
<link type="text/css" rel="stylesheet" href='../css/user_info.css'>
|
||||
|
||||
<!-- 액션 -->
|
||||
|
||||
+16
-11
@@ -3,20 +3,20 @@ var serverAdminTemplate = '\
|
||||
<tr class="bg0" data-server_name="<%name%>">\
|
||||
<th style="color:<%color%>;"><%korName%>(<%name%>)</th>\
|
||||
<td><%status%></td>\
|
||||
<td><input class="with_skin obj_fill" type="button" value="폐쇄" onclick="modifyServerStatus(this, \'close\');"></td>\
|
||||
<td><input class="with_skin obj_fill" type="button" value="오픈" onclick="modifyServerStatus(this, \'open\');"></td>\
|
||||
<td><input class="with_skin obj_fill" type="button" value="리셋" onclick="modifyServerStatus(this, \'reset\');"></td>\
|
||||
<td><input class="with_skin obj_fill" type="button" value="하드리셋" onclick="modifyServerStatus(this, \'reset_full\');"></td>\
|
||||
<td><input class="with_skin obj_fill" type="button" value="폐쇄중 로그인" onclick="Entrance_AdminClosedLogin(this);"></td>\
|
||||
<td><input class="with_skin obj_fill" type="button" value="서버119" onclick="Entrance_AdminOpen119(this);"></td>\
|
||||
<td><input class="with_skin obj_fill" type="button" value="업데이트" onclick="Entrance_AdminOpen119(this);"></td>\
|
||||
<td><button class="valid_if_set with_border obj_fill" onclick="modifyServerStatus(this, \'close\');">폐쇄</button></td>\
|
||||
<td><button class="valid_if_set with_border obj_fill" onclick="modifyServerStatus(this, \'open\');">오픈</button></td>\
|
||||
<td><a class="just_link" href="../<%name%>/install.php"><button class="valid_if_set with_border obj_fill">리셋</button></a></td>\
|
||||
<td><a class="just_link" href="../<%name%>/install_db.php"><button class="valid_if_set only_admin with_border obj_fill">하드리셋</button></a></td>\
|
||||
<td><button class="valid_if_set with_border obj_fill" onclick="Entrance_AdminClosedLogin(this);">폐쇄중 로그인</button></td>\
|
||||
<td><button class="valid_if_set with_border obj_fill" onclick="Entrance_AdminOpen119(this);">서버119</button></td>\
|
||||
<td><button class="only_admin with_border obj_fill" onclick="Entrance_AdminOpen119(this);">업데이트</button></td>\
|
||||
</tr>\
|
||||
';
|
||||
|
||||
|
||||
function drawServerAdminList(serverList){
|
||||
var $table = $('#server_admin_list');
|
||||
$.each(serverList, function(idx, server){
|
||||
$.each(serverList.server, function(idx, server){
|
||||
console.log(server);
|
||||
var status = '';
|
||||
if(!server.valid){
|
||||
@@ -30,10 +30,15 @@ function drawServerAdminList(serverList){
|
||||
}
|
||||
server.status = status;
|
||||
|
||||
$table.append(
|
||||
TemplateEngine(serverAdminTemplate, server)
|
||||
);
|
||||
var $tr = $(TemplateEngine(serverAdminTemplate, server));
|
||||
$table.append($tr);
|
||||
if(!server.valid){
|
||||
$tr.find('.valid_if_set').css('background','#333333').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
if(serverList.grade == 5){
|
||||
$table.find('.only_admin').css('background','#333333').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
|
||||
+23
-18
@@ -4,6 +4,9 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
if(!class_exists('\sammo\DB')){
|
||||
header('Location:install_db.php');
|
||||
}
|
||||
if(Session::getUserGrade(true) < 5){
|
||||
die('관리자 아님');
|
||||
}
|
||||
@@ -25,11 +28,11 @@ if(Session::getUserGrade(true) < 5){
|
||||
<link rel="stylesheet" href="css/install.css" >
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="container" style="min-width:720px;">
|
||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiD 리셋</h1>
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-12 col-md-10 col-lg-7">
|
||||
<div class="col col-lg-8" >
|
||||
<div class="card" id="db_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
@@ -151,20 +154,7 @@ if(Session::getUserGrade(true) < 5){
|
||||
<option value="1">황건적의 난</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
<table class="table table-sm table-striped">
|
||||
<colgroup><col style="width:100px;"><col></colgroup>
|
||||
<thead><tr><th>설정</th><th>값</th></thead>
|
||||
<tbody>
|
||||
<tr><th>일자</th><td ><span id="scenario_begin">180년 1월</span><small id="scenario_begin_with_sync"></small></td></tr>
|
||||
<tr><th>NPC 수</th><td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td></tr>
|
||||
<tr><th>국가 수</th><td><span id="scenario_nation"></span></td></tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan="2">
|
||||
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -238,10 +228,25 @@ if(Session::getUserGrade(true) < 5){
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<h4 class="card-header">시나리오 정보</h4>
|
||||
<table class="table table-striped">
|
||||
<colgroup><col style="width:100px;"><col></colgroup>
|
||||
<thead>
|
||||
<tr><th>설정</th><th>값</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th>일자</th><td ><span id="scenario_begin">180년 1월</span><small id="scenario_begin_with_sync"></small></td></tr>
|
||||
<tr><th>NPC 수</th><td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td></tr>
|
||||
<tr><th>국가 수</th><td><span id="scenario_nation"></span></td></tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan="2">
|
||||
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div><!--ADMIN 폼 끝-->
|
||||
|
||||
<!-- TODO: conf_kakao.php -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
if(Session::getUserGrade(true) < 5){
|
||||
die('관리자 아님');
|
||||
}
|
||||
if(Session::getUserGrade(true) == 5){
|
||||
die('DB 리셋 권한을 가지고 있지 않습니다.');
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>설치</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<script src="../e_lib/jquery-3.2.1.min.js"></script>
|
||||
<script src="../e_lib/bootstrap.bundle.min.js"></script>
|
||||
<script src="../e_lib/jquery.validate.min.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<script src="js/install.js"></script>
|
||||
<link rel="stylesheet" href="css/normalize.css" >
|
||||
<link rel="stylesheet" href="../e_lib/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="css/install.css" >
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="min-width:720px;">
|
||||
<h1 class="row justify-content-md-center">삼국지 모의전투 HiD 리셋</h1>
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-8" >
|
||||
<div class="card" id="db_form_card" style="display:none">
|
||||
<h3 class="card-header">
|
||||
설치(DB 설정)
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="db_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="db_host" class="col-sm-3 col-form-label">DB호스트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_host" id="db_host" placeholder="호스트" value="localhost" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_port" class="col-sm-3 col-form-label">DB포트</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_port" id="db_port" placeholder="접속 포트" value="3306" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_id" class="col-sm-3 col-form-label">DB계정명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_id" id="db_id" placeholder="DB계정"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_pw" class="col-sm-3 col-form-label">DB비밀번호</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="db_pw" id="db_pw" placeholder="DB비밀번호"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="db_name" class="col-sm-3 col-form-label">DB명</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="db_name" id="db_name" placeholder="DB명(예:sammo_che)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">설정 파일 생성</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div><!--DB 폼 끝-->
|
||||
|
||||
<div class="card" id="game_form_card">
|
||||
<h3 class="card-header">
|
||||
설치(환경 설정)
|
||||
<!--턴시간, 시간동기화, 시나리오, 상성, 확장장수, NPC유저, 이미지설정-->
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form id="game_form" method="post" action="#">
|
||||
<div class="form-group row">
|
||||
<label for="turnterm" class="col-sm-3 col-form-label">턴 시간(분)</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="120">120
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="turnterm" value="60" checked>60
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="30">30
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="20">20
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="10">10
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="5">5
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="2">2
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="turnterm" value="1">1
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="sync" class="col-sm-3 col-form-label">시간 동기화</label>
|
||||
<div class="col-sm-9" style="display: inline-flex;">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="sync" value="1" checked>Y
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="sync" value="0">N
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<small class="text-muted">
|
||||
시간 단위에 맞게 년/월이 설정됩니다. <br>예: 120분(오전1시=1월), 60분(오전/오후 1시=1월)
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="confirm_password" class="col-sm-3 col-form-label">시나리오 선택</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" size="1">
|
||||
<optgroup label="공백지">
|
||||
<option value="0">공백지</option>
|
||||
</optgroup>
|
||||
<optgroup label="역사모드">
|
||||
<option value="1">황건적의 난</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="fiction" class="col-sm-3 col-form-label">NPC 상성</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="fiction" value="0" checked>연의
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="fiction" value="1">가상
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="extend" class="col-sm-3 col-form-label">확장 NPC</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="extend" value="1" checked>포함
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="extend" value="0">미포함
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="npcmode" class="col-sm-3 col-form-label">NPC 빙의</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="npcmode" value="1">가능
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="npcmode" value="0" checked>불가
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="img" class="col-sm-3 col-form-label">이미지 표기</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="img" value="0">안함
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="img" value="1">전콘
|
||||
</label>
|
||||
<label class="btn btn-secondary active">
|
||||
<input type="radio" name="img" value="2" checked>전콘, 병종
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input type="radio" name="img" value="3">전콘, 병종, NPC
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-primary btn-lg btn-block login-button">리셋 개시</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<h4 class="card-header">시나리오 정보</h4>
|
||||
<table class="table table-striped">
|
||||
<colgroup><col style="width:100px;"><col></colgroup>
|
||||
<thead>
|
||||
<tr><th>설정</th><th>값</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><th>일자</th><td ><span id="scenario_begin">180년 1월</span><small id="scenario_begin_with_sync"></small></td></tr>
|
||||
<tr><th>NPC 수</th><td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td></tr>
|
||||
<tr><th>국가 수</th><td><span id="scenario_nation"></span></td></tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan="2">
|
||||
|
||||
</td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div><!--ADMIN 폼 끝-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user