서버 관리 패널 일부 수정

This commit is contained in:
2018-03-19 02:52:50 +09:00
parent efa6cc2889
commit e483fe93a4
10 changed files with 109 additions and 132 deletions
+6 -2
View File
@@ -57,8 +57,13 @@ input {
}
*/
.obj_fill{
display:block;
width:100%;
height:100%;
}
button.with_skin {
width: 100px; height: 18px;
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
@@ -66,7 +71,6 @@ button.with_skin {
}
input.with_skin {
width: 100px; height: 18px;
background-color: black; color: white;
font-family: '맑은 고딕';
font-size: 13px;
-2
View File
@@ -7,8 +7,6 @@ class _Setting {
private $exist = false;
public function __construct($basepath) {
$basepath = realpath($basepath);
$this->basepath = $basepath;
$this->settingFile = realpath($basepath.'/d_setting/conf.php');
+2 -1
View File
@@ -3,8 +3,9 @@
@import url("manage/Style.css");
#server_notice {
height: 50px;
margin:10px 0;
border: none;
text-align:center;
}
#server_list_container{
+60 -21
View File
@@ -1,22 +1,51 @@
var serverAdminTemplate = '\
<tr data-server_name="<%name%>\
<th><%korName%>(<%name%>)</th>\
<tr class="bg0" data-server_name="<%name%>">\
<th style="color:<%color%>;"><%korName%>(<%name%>)</th>\
<td><%status%></td>\
<td><input type="button" value="폐쇄" onclick="Entrance_AdminPost(0);"></td>\
<td><input type="button" value="오픈" onclick="Entrance_AdminPost(2);"></td>\
<td><input type="button" value="리셋" onclick="Entrance_AdminPost(1);"></td>\
<td><input type="button" class="Entrance_ServerAdminListSelectButton2" value="N로그인" onclick="Entrance_AdminNPCLogin();"></td>\
<td><input type="button" value="N생성" onclick="Entrance_AdminNPCCreate();"></td>\
<td><input type="button" value="폐쇄중로그인" onclick="Entrance_AdminClosedLogin();"></td>\
<td><input class="with_skin obj_fill" type="button" value="폐쇄" onclick="Entrance_AdminPost(this, 0);"></td>\
<td><input class="with_skin obj_fill" type="button" value="오픈" onclick="Entrance_AdminPost(this, 2);"></td>\
<td><input class="with_skin obj_fill" type="button" value="리셋" onclick="Entrance_AdminPost(this, 1);"></td>\
<td><input class="with_skin obj_fill" type="button" value="하드리셋" onclick="Entrance_AdminPost(this, 3);"></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>\
</tr>\
';
function drawServerAdminList(serverList){
var $table = $('#server_admin_list');
$.each(serverList, function(idx, server){
console.log(server);
var status = '';
if(!server.valid){
status = '에러, {0}'.format(server.reason);
}
else if(!server.run){
status = '폐쇄됨';
}
else{
status = '운영 중';
}
server.status = status;
$table.append(
TemplateEngine(serverAdminTemplate, server)
);
});
}
$(function(){
Entrance_AdminImport();
Entrance_AdminInit();
Entrance_AdminUpdate();
$.ajax({
cache:false,
type:'post',
url:'j_serverAdminStatus.php',
dataType:'json'
}).then(drawServerAdminList);
});
function Entrance_AdminImport() {
}
@@ -25,7 +54,7 @@ function Entrance_AdminInit() {
console.log('adminInit');
$("#Entrance_000201").click(Entrance_Donation);
$("#Entrance_000202").click(Entrance_Member);
$("#Entrance_000204").click(Entrance_AdminChangeNotice);
$("#notice_change_btn").click(Entrance_AdminChangeNotice);
}
function Entrance_AdminUpdate() {
@@ -44,7 +73,7 @@ function Entrance_Member() {
}
function Entrance_AdminChangeNotice() {
var notice = $("#Entrance_000203").val();
var notice = $("#notice_edit").val();
Popup_Confirm('정말 실행하시겠습니까?', function() {
Popup_Wait(function() {
@@ -55,8 +84,7 @@ function Entrance_AdminChangeNotice() {
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
Popup_WaitHide();
Replace(ENTRANCE+PHP);
location.reload();
} else {
Popup_WaitShow(response.msg);
}
@@ -66,7 +94,10 @@ function Entrance_AdminChangeNotice() {
});
}
function Entrance_AdminPost(server, select) {
function Entrance_AdminPost(caller, select) {
var $caller = $(caller);
var server = $caller.parents('tr').data('server_name');
Popup_Confirm('정말 실행하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
@@ -92,18 +123,26 @@ function Entrance_AdminPost(server, select) {
});
}
function Entrance_AdminNPCLogin(serverDir) {
ReplaceFrame(serverDir+W+'npc_login'+PHP);
function Entrance_AdminNPCLogin(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+W+'npc_login'+PHP;
}
function Entrance_AdminNPCCreate(serverDir) {
ReplaceFrame(serverDir+W+'npc_join'+PHP);
function Entrance_AdminNPCCreate(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+W+'npc_join'+PHP;
}
function Entrance_AdminClosedLogin(serverDir) {
ReplaceFrame(serverDir+W+'npc_login'+PHP);
function Entrance_AdminClosedLogin(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+W+'npc_login'+PHP;
}
function Entrance_AdminOpen119(serverDir) {
Open(serverDir+W+'_119'+PHP);
function Entrance_AdminOpen119(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+W+'_119'+PHP;
}
+1 -1
View File
@@ -72,7 +72,7 @@ function doAdminPost($member, $action, $notice, $server, $select){
}
if($action == 0) {
$db->update('SYSTEM', ['NOTICE'=>$notice], 'NO=1');
getRootDB()->update('SYSTEM', ['NOTICE'=>$notice], 'NO=1');
$response['result'] = 'SUCCESS';
return $response;
}
+22 -95
View File
@@ -1,108 +1,35 @@
@charset "utf-8";
#admin_userlist{
margin-top:10px;
}
#server_admin_table{
width:100%;
margin-top:30px;
margin-bottom:30px;
}
#Entrance_0002 {
width: 800px; height: 170px;
/*position: absolute; top: 304px; left: 0px;*/
#server_admin_table input{
padding:2px 3px;
}
#Entrance_000200 {
width: 798px; height: 50px;
position: absolute; top: 0px; left: 0px;
font-size: 30px; font-weight: bold;
#admin_userlist .center_ordered_items {
padding:10px;
}
#Entrance_000201 {
width: 200px; height: 50px;
position: absolute; top: 65px; left: 150px;
#notice_edit{
vertical-align: top;
display:inline-block;
margin:0;
padding:0;
height:4em;
background:black;
color:white;
}
#Entrance_000202 {
width: 200px; height: 50px;
position: absolute; top: 65px; left: 450px;
}
#Entrance_000203 {
width: 590px; height: 20px;
position: absolute; top: 130px; left: 50px;
}
#Entrance_000204 {
width: 100px; height: 20px;
position: absolute; top: 130px; left: 650px;
}
#Entrance_0003 {
width: 800px; height: 176px;
}
#Entrance_000300 {
width: 798px; height: 50px;
font-size: 30px; font-weight: bold;
}
#Entrance_000301 {
width: 798px; height: 20px;
border: none;
}
#Entrance_00030000 {
width: 98px; height: 20px;
}
#Entrance_00030001 {
width: 198px; height: 20px;
}
#Entrance_00030002 {
width: 498px; height: 20px;
}
#Entrance_00030003 {
width: 118px; height: 20px;
}
#Entrance_000302 {
width: 798px;
border: none;
}
.Entrance_ServerAdminList {
width: 800px; height: 20px;
border: none;
float: left;
}
.Entrance_ServerAdminListServer {
width: 98px; height: 20px;
float: left;
}
.Entrance_ServerAdminListState {
width: 198px; height: 20px;
float: left;
}
.Entrance_ServerAdminListSelect {
width: 498px; height: 20px;
float: left;
}
.Entrance_ServerAdminListSelectButton1 {
width: 50px; height: 20px;
float: left;
}
.Entrance_ServerAdminListSelectButton2 {
width: 80px; height: 20px;
float: left;
}
.Entrance_ServerAdminListSelectButton3 {
width: 100px; height: 20px;
float: left;
#notice_change_btn{
vertical-align: top;
display:inline-block;
height:4em;
}
+3
View File
@@ -0,0 +1,3 @@
<?php
//
+11 -6
View File
@@ -1,6 +1,11 @@
<div id="Entrance_0002" class="bg0">
<div id="Entrance_000200" class="bg2"> </div>
<input id="Entrance_000202" type="button" value="회 원 관 리">
<input id="Entrance_000203" type="text" value="<?=$notice?>">
<input id="Entrance_000204" type="button" value="공 지 변 경">
</div>
<div id="admin_userlist">
<div class="bg2 section_title with_border"> </div>
<div class="center_ordered_items with_border bg0">
<a href="admin_userlist.php"><button class="with_skin" type="button">회원 관리</button></a>
<button id="btn_icon_scrub" class="with_skin" >전콘 정리</button>
</div>
<div class="center_ordered_items with_border bg0">
<textarea cols="80" rows="3" id="notice_edit" name="notice"><?=$notice?></textarea>
<button id="notice_change_btn" class="with_skin">공지 변경</button>
</div>
</div>
+4 -4
View File
@@ -6,16 +6,16 @@
<col style="width:50px;"><!--폐쇄-->
<col style="width:50px;"><!--오픈-->
<col style="width:50px;"><!--리셋-->
<col style="width:50px;"><!--하드리셋-->
<col style="width:50px;"><!--폐쇄중 로그인-->
<col style="width:50px;"><!--119-->
<col style="width:70px;"><!--하드리셋-->
<col style="width:100px;"><!--폐쇄중 로그인-->
<col style="width:70px;"><!--서버119-->
</colgroup>
<thead>
<th class="bg1">서버</th>
<th class="bg1">상태</th>
<th class="bg1" colspan="6">명령 선택</th>
</thead>
<tbody id="sever_admin_list">
<tbody id="server_admin_list">
</tbody>
</table>
View File