js, css파일 위치 이동

This commit is contained in:
2018-03-25 22:41:30 +09:00
parent bd975e4f79
commit 5e29443256
21 changed files with 83 additions and 707 deletions
-184
View File
@@ -1,184 +0,0 @@
var serverListTemplate = "\
<tr class='server_item bg0 server_name_<%name%>' data-server='<%name%>'>\
<td class='server_name'>\
<span style='font-weight:bold;font-size:1.4em;color:<%color%>'><%korName%>섭</span><br>\
<span class='n_country'></span>\
</td>\
<td colspan='4' class='server_down'>- 폐 쇄 중 -</td>\
</tr>\
";
var serverTextInfo = "\
<td>\
서기 <%year%>년 <%month%>월 (<span style='color:orange;'><%scenario%></span>)<br>\
유저 : <%userCnt%> / <%maxUserCnt%>명 <span style='color:cyan;'>NPC : <%npcCnt%>명</span> (<span style='color:limegreen;'><%turnTerm%></span>)\
</td>\
";
var serverFullTemplate = "\
<td colspan='4' class='server_full'>- 장수 등록 마감 -</td>\
";
var serverCreateAndSelectTemplate = "\
<td colspan='2' class='not_registered'>- 미 등 록 -</td>\
<td class='ignore_border'>\
<a href='<%serverPath%>/select_npc.php'><button class='general_select with_skin'>장수선택</button></a>\
<a href='<%serverPath%>/join.php'><button class='general_create with_skin'>장수생성</button></a>\
</td>\
";
var serverCreateTemplate = "\
<td colspan='2' class='not_registered'>- 미 등 록 -</div>\
<td class='ignore_border'>\
<a href='<%serverPath%>/join.php'><button class='general_create with_skin'>장수생성</button></a>\
</td>\
";
var serverLoginTemplate = "\
<td style='background:url(<%picture%>);background-size: 64px 64px;'></td>\
<td><%name%></td>\
<td class='ignore_border'>\
<a href='<%serverPath%>/'><button class='general_login with_skin'>입장</button></a>\
</td>\
";
function Entrance_Import() {
}
function Entrance_Init() {
$("#btn_logout").click(Entrance_Logout);
}
function Entrance_Update() {
Entrance_UpdateServer();
}
function Entrance_UpdateServer() {
Popup_Wait(function() {
PostJSON(
"../i_entrance/j_server_get_status.php", {
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
Entrance_drawServerList(response.server);
//Entrance_ServerList(response.serverCount, response.servers);
//Entrance_ServerListPosition();
Popup_WaitHide();
} else {
Popup_WaitShow("서버목록 로드 실패!");
}
}
)
});
}
function Entrance_drawServerList(serverInfos){
var $serverList = $('#server_list');
$.each(serverInfos, function(idx, serverInfo){
var $serverHtml = $(TemplateEngine(serverListTemplate, serverInfo));
$serverList.append($serverHtml);
if(!serverInfo.enable){
return true;
}
var serverPath = "../"+serverInfo.name;
$.getJSON("../"+serverInfo.name+'/j_server_basic_info.php',{}, function(result){
console.log(result);
console.log(result.game);
if(!result.game){
return;
}
var game= result.game;
//TODO: 서버 폐쇄 방식을 새롭게 변경
$serverHtml.find('.server_down').detach();
if(game.isUnited == 2){
$serverHtml.find('.n_country').html('§천하통일§');
}
else{
$serverHtml.find('.n_country').html('<{0}국 경쟁중>'.format(game.nationCnt));
}
$serverHtml.append(
TemplateEngine(serverTextInfo, game)
);
if(result.me && result.me.length > 1){
var me = result.me;
me.serverPath = serverPath;
$serverHtml.append(
TemplateEngine(serverLoginTemplate, me)
);
}
else if(game.userCnt >= game.maxUserCnt){
$serverHtml.append(
TemplateEngine(serverFullTemplate, {})
);
}
else if(game.npcMode == 1){
$serverHtml.append(
TemplateEngine(serverCreateAndSelectTemplate, {serverPath:serverPath})
).addClass('server_create_and_select');
}
else{
$serverHtml.append(
TemplateEngine(serverCreateTemplate, {serverPath:serverPath})
);
}
});
});
}
function Entrance_ServerListPosition() {
var heightTitle = $("#Entrance_000000").height();
var heightSub = $("#Entrance_000001").height();
var heightList = $("#Entrance_000002").height();
var heightComment = $("#Entrance_000003").height();
var top = heightTitle+heightSub+heightList+5;
$("#Entrance_000003").css("top", top+"px");
top += heightComment;
$("#Entrance_0000").height(top+2);
top = 20 + top;
$("#Entrance_0001").css("top", top+"px");
top = 20 + top + $("#Entrance_0001").height();
$("#Entrance_0002").css("top", top+"px");
top = 20 + top + $("#Entrance_0002").height();
$("#Entrance_0003").css("top", top+"px");
}
function Entrance_Logout() {
Popup_Wait(function() {
PostJSON(
"../i_entrance/j_logout.php", {
},
function(response, textStatus) {
if(response.result) {
Popup_WaitHide();
ReplaceFrame("../");
} else {
Popup_WaitShow("로그아웃 실패!");
}
}
)
});
}
$(function(){
ImportView("body", "../i_popup/Frame.php");
//ImportView("body", "Frame.php");
Popup_Import();
Popup_Init();
Popup_Update();
Entrance_Import();
Entrance_Init();
Entrance_Update();
});
-221
View File
@@ -1,221 +0,0 @@
@charset "utf-8";
#server_notice {
margin:10px 0;
border: none;
text-align:center;
}
#server_list_container{
width:800px;
position:absolute;
left:50%;
margin-left:-400px;
}
#server_list_table{
width:100%;
}
#server_list tr{
height:66px;
}
#server_list .server_create_and_select .general_create,
#server_list .server_create_and_select .general_select {
width: 120px; height: 33px;
float: left;
}
#server_list .general_create,
#server_list .general_login {
width: 120px; height: 66px;
float: left;
}
.ignore_border{
border:0;
margin:0;
padding:0;
}
#user_info {
margin-top:20px;
width: 800px; height: 130px;
}
#user_info button{
width: 200px;
height: 50px;
margin: 10px 50px;
}
.center_ordered_items{
text-align:center;
}
/*Legacy*/
#Entrance_00 {
width: 800px;
position: absolute; top: 50px; left: 50%;
margin-left: -400px;
border: none;
}
#Entrance_0004 {
width: 52px; height: 52px;
position: absolute; top: 0px; left: -62px;
border: 1px solid white;
}
#Entrance_0005 {
width: 160px; height: 600px;
position: absolute; top: 62px; left: -170px;
}
#Entrance_0006 {
width: 160px; height: 600px;
position: absolute; top: 62px; left: 810px;
}
#Entrance_0000 {
width: 800px; height: 134px;
position: absolute; top: 0px; left: 0px;
}
#Entrance_000000 {
width: 798px; height: 50px;
position: absolute; top: 0px; left: 0px;
font-size: 30px; font-weight: bold;
}
#Entrance_000001 {
width: 798px; height: 20px;
position: absolute; top: 52px; left: 0px;
border: none;
}
#Entrance_00000000 {
width: 98px; height: 20px;
position: absolute; top: 0px; left: 0px;
}
#Entrance_00000001 {
width: 398px; height: 20px;
position: absolute; top: 0px; left: 100px;
}
#Entrance_00000002 {
width: 178px; height: 20px;
position: absolute; top: 0px; left: 500px;
}
#Entrance_00000003 {
width: 118px; height: 20px;
position: absolute; top: 0px; left: 680px;
}
#Entrance_000002 {
width: 798px; height: 64px;
position: absolute; top: 74px; left: 0px;
border: none;
}
.Entrance_ServerList {
width: 800px; height: 64px;
border: none;
float: left;
}
.Entrance_ServerListServer {
width: 98px; height: 64px;
float: left;
}
.Entrance_ServerListDown {
width: 698px; height: 64px;
float: left;
}
.Entrance_ServerListInfo {
width: 398px; height: 64px;
float: left;
}
.Entrance_ServerListBlock {
width: 298px; height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListCharacter {
width: 64px; height: 64px;
float: left;
}
.Entrance_ServerListName {
width: 112px; height: 64px;
float: left;
line-height: 64px;
}
.Entrance_ServerListSelect {
width: 120px; height: 32px;
float: left;
}
#Entrance_000003 {
width: 798px; height: 155px;
text-align: left;
}
.Entrance_Alert {
color: red; font-size: 15px; font-weight: bold;
}
.Entrance_Che {
color: white; font-size: 15px; font-weight: bold;
}
.Entrance_Kwe {
color: yellow; font-size: 15px; font-weight: bold;
}
.Entrance_Pwe {
color: orange; font-size: 15px; font-weight: bold;
}
.Entrance_Twe {
color: magenta; font-size: 15px; font-weight: bold;
}
.Entrance_Hwe {
color: red; font-size: 15px; font-weight: bold;
}
#Entrance_0001 {
width: 800px; height: 130px;
position: absolute; top: 154px; left: 0px;
}
#Entrance_000100 {
width: 798px; height: 50px;
position: absolute; top: 0px; left: 0px;
font-size: 30px; font-weight: bold;
}
#Entrance_000101 {
width: 200px; height: 50px;
position: absolute; top: 65px; left: 150px;
}
#Entrance_000102 {
width: 200px; height: 50px;
position: absolute; top: 65px; left: 450px;
}
-152
View File
@@ -1,152 +0,0 @@
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>\
</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_server_get_admin_status.php',
dataType:'json'
}).then(drawServerAdminList);
});
function Entrance_AdminImport() {
}
function Entrance_AdminInit() {
console.log('adminInit');
$("#Entrance_000201").click(Entrance_Donation);
$("#Entrance_000202").click(Entrance_Member);
$("#notice_change_btn").click(Entrance_AdminChangeNotice);
}
function Entrance_AdminUpdate() {
}
function Entrance_Donation() {
$("#Entrance_00").hide();
$("#EntranceDonation_00").show();
EntranceDonation_Update();
}
function Entrance_Member() {
$("#Entrance_00").hide();
$("#EntranceMember_00").show();
EntranceMember_Update();
}
function Entrance_AdminChangeNotice() {
var notice = $("#notice_edit").val();
Popup_Confirm('정말 실행하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
"../i_entrance/j_server_change_status.php", {
action: 'notice',
notice: notice
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
location.reload();
} else {
Popup_WaitShow(response.msg);
}
}
)
})
});
}
function modifyServerStatus(caller, action) {
var $caller = $(caller);
var server = $caller.parents('tr').data('server_name');
Popup_Confirm('정말 실행하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
"../i_entrance/j_server_change_status.php", {
server: server,
action: action
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
Popup_WaitHide();
if(action == 'reset') {
ReplaceFrame(response.installURL);
} else {
Replace("entrance.php");
}
} else {
Popup_WaitShow(response.msg);
}
}
)
})
});
}
function Entrance_AdminNPCLogin(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+"/npc_login.php";
}
function Entrance_AdminNPCCreate(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+"/npc_join.php";
}
function Entrance_AdminClosedLogin(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+"/npc_login.php";
}
function Entrance_AdminOpen119(caller) {
var $caller = $(caller);
var serverDir = $caller.parents('tr').data('server_name');
location.href = serverDir+"/_119.php";
}
function tryServerUpdateAndUpgrade(caller){
var $caller = $(caller);
}
-35
View File
@@ -1,35 +0,0 @@
@charset "utf-8";
#admin_userlist{
margin-top:10px;
}
#server_admin_table{
width:100%;
margin-top:30px;
margin-bottom:30px;
}
#server_admin_table input{
padding:2px 3px;
}
#admin_userlist .center_ordered_items {
padding:10px;
}
#notice_edit{
vertical-align: top;
display:inline-block;
margin:0;
padding:0;
height:4em;
background:black;
color:white;
}
#notice_change_btn{
vertical-align: top;
display:inline-block;
height:4em;
}
+6 -4
View File
@@ -23,20 +23,22 @@ if($userGrade < 6){
<!-- 스타일 -->
<link type="text/css" rel="stylesheet" href="../e_lib/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href='memberAdmin.css'>
<link type="text/css" rel="stylesheet" href='../css/admin_member.css'>
<script type="text/javascript" src='../js/common.js'></script>
<script type="text/javascript" src='../e_lib/jquery-3.2.1.min.js'></script>
<script type="text/javascript" src="../e_lib/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src='../js/func.js'></script>
<script type="text/javascript" src='memberAdmin.js'></script>
<script type="text/javascript" src='../js/admin_member.js'></script>
</head>
<body>
<div class="container">
<div class="card">
<div class="card-header">
회원 관리
<a href="entrance.php"><button class="btn btn-primary" style="float:right;">돌아가기</button></a>
<h3>회원 관리</h3>
</div>
<div class="card-body">
가입 허용&nbsp;
@@ -61,7 +63,7 @@ if($userGrade < 6){
<div class="btn-group" role="group">
<button onclick="changeSystem('scrub_deleted');" type="button" class="btn btn-secondary">탈퇴 계정 정리(1개월+)</button>
<button onclick="changeSystem('scrub_icon');"type="button" class="btn btn-secondary">전콘 정리(1개월+)</button>
<button onclick="changeSystem('scrub_icon');" type="button" class="btn btn-secondary">전콘 정리(1개월+)</button>
</div>
<button onclick="changeSystem('scrub_old_user');" type="button" class="btn btn-secondary">오래된 계정 정리(6개월+)</button>
+7 -11
View File
@@ -22,21 +22,18 @@ $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='../i_popup/Style.css'>
<link type="text/css" rel="stylesheet" href='../i_entrance/Style.css'>
<link type="text/css" rel="stylesheet" href='../css/entrance.css'>
<!-- 액션 -->
<script type="text/javascript" src='../js/common.js'></script>
<script type="text/javascript" src='../e_lib/jquery-3.2.1.min.js'></script>
<script type="text/javascript" src='../js/func.js'></script>
<script type="text/javascript" src='../js/entrance.js'></script>
<script type="text/javascript" src='../i_popup/Action.js'></script>
<script type="text/javascript" src='../i_entrance/Action.js'></script>
<?php if($userGrade >= 6): ?>
<?php if($userGrade >= 5): ?>
<!-- 운영자 -->
<link type="text/css" rel="stylesheet" href='adminStyle.css'>
<script type="text/javascript" src='adminAction.js'></script>
<link type="text/css" rel="stylesheet" href='../css/admin_server.css'>
<script type="text/javascript" src='../js/admin_server.js'></script>
<?php endif;?>
</head>
@@ -45,7 +42,7 @@ $userGrade = $session->userGrade;
<div id="server_list_container">
<?php
if($userGrade >= 6){
if($userGrade >= 5){
echo $templates->render('global_panel',['notice'=>$notice]);
}
?>
@@ -97,9 +94,8 @@ if($userGrade >= 6){
</div>
<?php
if($userGrade >= 6){
if($userGrade >= 5){
echo $templates->render('server_panel',[]);
//include('adminInc.php');
}
?>
-73
View File
@@ -1,73 +0,0 @@
<?php
namespace sammo;
require_once('_common.php');
?>
<script type="text/javascript">
ImportStyle("<?=ROOT;?>/i_entrance/member/Style.css");
ImportAction("<?=ROOT;?>/i_entrance/member/Action.js");
EntranceMember_Import();
EntranceMember_Init();
</script>
<div id="EntranceMember_00">
<div id="EntranceMember_0000" class="bg2 font4">
회 원 정 보
<font id="EntranceMember_000000">(0/0)</font>
</div>
<input id="EntranceMember_0001" type="button" value="돌아가기">
<div id="EntranceMember_0006" class="bg2 font2">
<div id="EntranceMember_000600"></div>
<input id="btn_allow_join" type="button" value="가입허용">
<input id="btn_deny_join" type="button" value="가입금지">
<input id="btn_allow_login" type="button" value="로그인허용">
<input id="btn_deny_login" type="button" value="로그인금지">
<input id="btn_process_withdraw" type="button" value="탈퇴처리(1개월)">
<input id="btn_process_scrub_olduser" type="button" value="오래된계정(6개월)">
</div>
<div id="EntranceMember_0002" class="bg2 font2">
선택:
<select id="EntranceMember_000200" size="1">
<option value="0">순서</option>
<option value="1">ID</option>
<option value="2">장수</option>
<option value="3">민번</option>
<option value="4">IP</option>
<option value="5">등급</option>
<option value="6">등록</option>
<option value="7">최근</option>
</select>
<input id="EntranceMember_000201" type="button" value="정렬">
</div>
<div id="EntranceMember_0003" class="bg2 font2">
선택:
<select id="EntranceMember_000300" size="1">
</select>
<input id="EntranceMember_000301" type="button" value="블럭회원">
<input id="EntranceMember_000302" type="button" value="일반회원">
<input id="EntranceMember_000303" type="button" value="참여회원">
<input id="EntranceMember_000304" type="button" value="유효회원">
<input id="EntranceMember_000305" type="button" value="특별회원">
<input id="EntranceMember_000306" type="button" value="전콘제거">
<input id="EntranceMember_000307" type="button" value="비번초기화">
<input id="EntranceMember_000308" type="button" value="회원삭제">
</div>
<div id="EntranceMember_0004" class="bg1">
<div id="EntranceMember_000400">순번</div>
<div id="EntranceMember_000401">ID</div>
<div id="EntranceMember_000402">민번</div>
<div id="EntranceMember_000403">닉네임</div>
<div id="EntranceMember_000404">IP</div>
<div id="EntranceMember_000405">블럭</div>
<div id="EntranceMember_000406">최근블럭일</div>
<div id="EntranceMember_000407">등록</div>
<div id="EntranceMember_000408">최근등록일</div>
<div id="EntranceMember_000409">등급</div>
<div id="EntranceMember_000412">사진</div>
<div id="EntranceMember_000413">SVR</div>
<div id="EntranceMember_000414">탈퇴</div>
</div>
<div id="EntranceMember_0005">
</div>
</div>
-80
View File
@@ -1,80 +0,0 @@
<?php
namespace sammo;
require_once('_common.php');
$session = Session::requireLogin();
// 외부 파라미터
// $_GET['select'] : 정렬선택
$select = $_GET['select'];
$db = RootDB::db();
$userGrade = $session->userGrade;
if($userGrade < 6) {
Json::die([
'result'=>'FAIL',
'msg'=>'운영자 권한이 없습니다.'
]);
}
$orderByStr = '';
switch($select) {
case 0: $orderByStr = 'ORDER BY NO'; break;
case 1: $orderByStr = 'ORDER BY ID'; break;
case 2: $orderByStr = 'ORDER BY NAME'; break;
case 3: $orderByStr = 'ORDER BY PID'; break;
case 4: $orderByStr = 'ORDER BY IP'; break;
case 5: $orderByStr = 'ORDER BY GRADE DESC'; break;
case 6: $orderByStr = 'ORDER BY REG_NUM DESC'; break;
case 7: $orderByStr = 'ORDER BY REG_DATE DESC'; break;
}
$response['lists'] = '';
$response['members'] = '<table id="EntranceMember_000500" class="bg0">';
$members = $db->queryFirstRow('SELECT NO, ID, PID, NAME, IP, PICTURE, IMGSVR, GRADE, REG_NUM, REG_DATE, BLOCK_NUM, BLOCK_DATE, QUIT FROM MEMBER %l', $orderByStr);
$count = count($members);
foreach($members as $member){
$member['PID'] = substr($member['PID'], 0, 8);
$member['PICTURE'] = substr($member['PICTURE'], -8);
if($member['GRADE'] == 2) { $member['GRADE'] = "<font color=skyblue>{$member['GRADE']}</font>"; }
if($member['GRADE'] == 3) { $member['GRADE'] = "<font color=limegreen>{$member['GRADE']}</font>"; }
if($member['GRADE'] == 4) { $member['GRADE'] = "<font color=cyan>{$member['GRADE']}</font>"; }
if($member['GRADE'] == 5) { $member['GRADE'] = "<font color=blue>{$member['GRADE']}</font>"; }
if($member['GRADE'] == 6) { $member['GRADE'] = "<font color=blue>{$member['GRADE']}</font>"; }
$response['lists'] .= "<option value='{$member['NO']}'>{$member['NAME']}</option>";
$response['members'] .= "
<tr>
<td class='EntranceMember_00050000'>{$member['NO']}</td>
<td class='EntranceMember_00050001'>{$member['ID']}</td>
<td class='EntranceMember_00050002'>{$member['PID']}</td>
<td class='EntranceMember_00050003'>{$member['NAME']}</td>
<td class='EntranceMember_00050004'>{$member['IP']}</td>
<td class='EntranceMember_00050005'>{$member['BLOCK_NUM']}</td>
<td class='EntranceMember_00050006'>{$member['BLOCK_DATE']}</td>
<td class='EntranceMember_00050007'>{$member['REG_NUM']}</td>
<td class='EntranceMember_00050008'>{$member['REG_DATE']}</td>
<td class='EntranceMember_00050009'>{$member['GRADE']}</td>
<td class='EntranceMember_00050012'>{$member['PICTURE']}</td>
<td class='EntranceMember_00050013'>{$member['IMGSVR']}</td>
<td class='EntranceMember_00050014'>{$member['QUIT']}</td>
</tr>";
}
$response['members'] .= '</table>';
$response['count'] = "(0000/{$count})";
$system = RootDB::db()->queryFirstRow('SELECT `REG`, `LOGIN` FROM `SYSTEM` WHERE `NO`=1');
$response['state'] = "가입: {$system['REG']}, 로그인: {$system['LOGIN']}";
$response['result'] = 'SUCCESS';
Json::die($response);
-9
View File
@@ -1,9 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '../..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
-223
View File
@@ -1,223 +0,0 @@
@charset "utf-8";
#user_list_frame{
min-width:920px;
}
#user_list_frame td, #user_list_frame th{
text-align:center;
vertical-align: middle;
}
#user_list td button{
padding: 0.15rem 0.3rem;
line-height:1.1em;
}
p.small, td.small{
line-height:1.2em;
}
.hide_text{
display:none;
}
p.user_grade_0 {
display:block;
color:#E74C3C;
}
#EntranceMember_00 {
width: 1100px; height: 20px;
border: none;
z-index: 2;
}
#EntranceMember_0000 {
width: 1098px; height: 50px;
top: 0px; left: 0px;
}
#EntranceMember_0001 {
width: 100px; height: 30px;
top: 10px; left: 750px;
}
#EntranceMember_0006 {
width: 1098px; height: 20px;
top: 52px; left: 0px;
}
#EntranceMember_000600 {
width: 200px; height: 20px;
top: 0px; left: 0px;
border: 0px;
line-height: 20px;
}
#EntranceMember_0002 {
width: 1098px; height: 20px;
top: 74px; left: 0px;
}
#EntranceMember_000200 {
width: 70px; height: 20px;
}
#EntranceMember_000201 {
width: 50px; height: 20px;
}
#EntranceMember_0003 {
width: 1098px; height: 20px;
top: 96px; left: 0px;
}
#EntranceMember_0004 {
width: 1100px; height: 20px;
top: 118px; left: 0px;
border: none;
}
#EntranceMember_000400 {
width: 38px; height: 20px;
}
#EntranceMember_000401 {
width: 98px; height: 20px;
}
#EntranceMember_000402 {
width: 68px; height: 20px;
}
#EntranceMember_000403 {
width: 88px; height: 20px;
}
#EntranceMember_000404 {
width: 98px; height: 20px;
}
#EntranceMember_000405 {
width: 38px; height: 20px;
}
#EntranceMember_000406 {
width: 138px; height: 20px;
}
#EntranceMember_000407 {
width: 38px; height: 20px;
}
#EntranceMember_000408 {
width: 138px; height: 20px;
}
#EntranceMember_000409 {
width: 38px; height: 20px;
}
#EntranceMember_000410 {
width: 58px; height: 20px;
}
#EntranceMember_000411 {
width: 78px; height: 20px;
}
#EntranceMember_000412 {
width: 88px; height: 20px;
}
#EntranceMember_000413 {
width: 28px; height: 20px;
}
#EntranceMember_000414 {
width: 38px; height: 20px;
}
#EntranceMember_0005 {
width: 1100px; height: 20px;
top: 140px; left: 0px;
border: none;
}
#EntranceMember_000500 {
border: none;
}
.EntranceMember_00050000 {
width: 38px;
}
.EntranceMember_00050001 {
width: 98px;
}
.EntranceMember_00050002 {
width: 68px;
}
.EntranceMember_00050003 {
width: 88px;
}
.EntranceMember_00050004 {
width: 98px;
}
.EntranceMember_00050005 {
width: 38px;
}
.EntranceMember_00050006 {
width: 138px;
}
.EntranceMember_00050007 {
width: 38px;
}
.EntranceMember_00050008 {
width: 138px;
}
.EntranceMember_00050009 {
width: 38px;
}
.EntranceMember_00050010 {
width: 58px;
}
.EntranceMember_00050011 {
width: 78px;
}
.EntranceMember_00050012 {
width: 88px;
}
.EntranceMember_00050013 {
width: 28px;
}
.EntranceMember_00050014 {
width: 38px;
}
-219
View File
@@ -1,219 +0,0 @@
var userFrame = '\
<tr id="userinfo_<%userID%>" data-username="<%userName%>" data-id="<%userID%>">\
<th scope="row"><%userID%></th>\
<td><%userName%></td>\
<td class="small"><%emailFunc(email)%><br>(<%authType%>)</td>\
<td><%userGradeText%><p class="small hide_text user_grade_<%userGrade%>" style="margin:0;"><%shortDate(blockUntil)%></p></td>\
<td><%nickname%></td>\
<td><img src="<%icon%>" width="64px" height="64px"></td>\
<td class="small"><%slotGeneralList%></td>\
<td class="small"><%shortDate(joinDate)%></td>\
<td class="small"><%shortDate(loginDate)%></td>\
<td class="small"><%shortDate(deleteAfter)%></td>\
<td>\
<div class="btn-group" role="group">\
<button type="button" onclick="changeUserStatus(\'delete\', this);" class="btn btn-danger btn-sm">강제<br>탈퇴</button>\
<button type="button" onclick="changeUserStatus(\'reset_pw\', this);" class="btn btn-info btn-sm">암호<br>변경</button>\
<button type="button" onclick="changeUserStatus(\'block\', this);" class="btn btn-warning btn-sm">유저<br>차단</button>\
<button type="button" onclick="changeUserStatus(\'unblock\', this);" class="btn btn-secondary btn-sm">차단<br>해제</button>\
<button type="button" onclick="changeUserStatus(\'set_userlevel\', this);" class="btn btn-primary btn-sm">별도<br>권한</button>\
</div>\
</td>\
</tr>';
function convUserGrade(grade){
var userGradeMap = {
0:'차단',
1:'일반',
4:'특별',
5:'부운영자',
6:'운영자'
};
if(grade in userGradeMap){
return userGradeMap[grade];
}
return grade;
}
function fillAllowJoinLogin(result){
$('#radios_allow_join .active').removeClass('active');
$('#radios_allow_login .active').removeClass('active');
if(result.allowJoin){
$('#allow_join_y').parent().addClass('active');
}
else{
$('#allow_join_n').parent().addClass('active');
}
if(result.allowLogin){
$('#allow_login_y').parent().addClass('active');
}
else{
$('#allow_login_n').parent().addClass('active');
}
}
function fillUserList(result){
var $user_list = $('#user_list');
$user_list.empty();
var slotGeneralList = $.map(result.servers, function(value){
return '<span class="server_generalName_{0}"></span>'.format(value)
}).join('<br>');
var emailFunc = function(text){
return String(text).replace('@','@<br>');
}
var brFunc = function(text){
return String(text).split(' ').join('<br>');
};
var shortDateFunc = function(date){
if(!date){
return '-';
}
return brFunc(date.substr(2));
}
$.each(result.users, function(idx, user){
user.br = brFunc;
user.shortDate = shortDateFunc;
user.emailFunc = emailFunc;
if(!user.email){
user.email = '-';
}
user.slotGeneralList = slotGeneralList;
user.userGradeText = convUserGrade(user.userGrade);
$user_list.append(
TemplateEngine(userFrame, user)
)
});
//TODO: slotGeneralList에 값을 채워야함. ajax로 받아올 필요 있음
}
function changeSystem(action, param=null){
var text = '{0}{1}을 진행합니다.'.format(action, param?(', '+param):'');
if(!confirm(text)){
return;
}
$.ajax({
type:'post',
url:'j_set_userlist.php',
dataType:'json',
data:{
'action':action,
'param':param
}
}).then(function(result){
if(result.result){
if(result.affected !== undefined){
alert('{0}건이 처리되었습니다.'.format(result.affected));
refreshAll();
}
else{
alert('완료되었습니다.');
}
}
else{
alert(result.reason);
}
});
}
function changeUserStatus(action, userID, param=null){
if(userID instanceof Element){
userID = parseInt($(userID).parents('tr').data('id'));
}
if(!$.isNumeric(userID)){
alert('userID가 올바르게 지정되지 않았습니다!');
return;
}
userID = parseInt(userID);
if(action == 'set_userlevel'){
if(!$.isNumeric(param)){
param = prompt('원하는 등급을 입력해주세요.(1:일반, 4:특별, 5:부운영자, 6:운영자)', '1');
}
param = parseInt(param);
if(param < 1 || param > 6){
alert('올바르지 않습니다.');
return;
}
}
if(action == 'block'){
if(!$.isNumeric(param)){
param = prompt('블록 기간을 입력해주세요. <= 0은 반영구(50년)입니다.', '7');
}
param = parseInt(param);
}
var userName = $('#userinfo_'+userID).data('username');
var text = '{0}에 대해서 {1}{2}을 진행합니다.'.format(userName, action, param?(', '+param):'');
if(!confirm(text)){
return;
}
$.ajax({
type:'post',
url:'j_set_userlist.php',
dataType:'json',
data:{
'action':action,
'user_id':userID,
'param':param
}
}).then(function(result){
if(result.result){
if(result.detail !== undefined){
alert('완료되었습니다. : {0}'.format(result.detail));
refreshAll();
}
else{
alert('완료되었습니다.');
refreshAll();
}
}
else{
alert(result.reason);
}
});
}
function refreshAll(){
$.ajax({
type:'post',
url:'j_get_userlist.php',
dataType:'json'
}).then(function(result){
if(!result.result){
alert(reuslt.reason);
return;
}
fillAllowJoinLogin(result);
fillUserList(result);
});
}
$(function(){
refreshAll();
$('input[name=allow_join], input[name=allow_login]').on('change', function(){
var $this = $(this);
changeSystem($this.attr('name'), $this.val());
})
});
-1
View File
@@ -2,7 +2,6 @@
<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>
-248
View File
@@ -1,248 +0,0 @@
@charset "utf-8";
#user_info_container{
width:500px;
position:absolute;
left:50%;
margin-left:-250px;
}
#user_info_table{
width:100%;
margin-top:30px;
}
#user_info_table th{
padding:5px;
}
#btn_back1{
position:absolute;
right: 6px;
margin:6px;
height:40px;
}
#btn_delete_me{
bottom:0;
left:0;
margin:0 1px;
position:absolute;
width:100%;
}
#change_pw{
width:100%;
}
#image_upload_filename{
position:absolute;
height:16px;
left:10px;
width:130px;
top:16px;
}
#image_upload_fake_btn{
top:16px;
height:20px;
right:10px;
position:absolute;
}
#image_upload{
opacity: 0;
position:absolute;
top:16px;
height:22px;
left:0;
height:20px;
width:100%;
}
#slot_new_icon{
visibility: hidden;
}
#btn_image_submit{
position:absolute;
bottom:0;
left:0;
width:50%;
height:20px;
}
#btn_remove_icon{
position:absolute;
bottom:0;
right:0;
width:50%;
height:20px;
}
#EntranceManage_00 {
width: 500px; height: 409px;
z-index: 2;
}
#EntranceManage_0000 {
width: 498px; height: 50px;
}
#EntranceManage_0001 {
width: 100px; height: 30px;
}
#EntranceManage_0002 {
width: 498px; height: 25px;
}
#EntranceManage_0003 {
width: 98px; height: 84px;
line-height: 84px;
}
#EntranceManage_0004 {
width: 148px; height: 84px;
line-height: 84px;
}
#EntranceManage_0005 {
width: 98px; height: 84px;
line-height: 84px;
}
#EntranceManage_0006 {
width: 148px; height: 84px;
text-align: left;
}
#EntranceManage_000600 {
width: 80px; height: 17px;
}
#EntranceManage_000601 {
width: 80px; height: 17px;
}
#EntranceManage_000602 {
width: 80px; height: 17px;
}
#EntranceManage_000603 {
width: 144px; height: 20px;
}
#EntranceManage_0007 {
width: 98px; height: 64px;
line-height: 64px;
}
#EntranceManage_0008 {
width: 148px; height: 64px;
line-height: 64px;
}
#EntranceManage_0009 {
width: 98px; height: 64px;
line-height: 64px;
}
#EntranceManage_0010 {
width: 148px; height: 64px;
line-height: 64px;
}
#EntranceManage_0011 {
width: 98px; height: 20px;
}
#EntranceManage_0012 {
width: 148px; height: 20px;
}
#EntranceManage_0013 {
width: 248px; height: 20px;
}
#EntranceManage_0014 {
width: 98px; height: 64px;
line-height: 64px;
}
#EntranceManage_0015 {
width: 148px; height: 64px;
}
#EntranceManage_001500 {
width: 64px; height: 64px;
}
#EntranceManage_001501 {
width: 64px; height: 64px;
}
#EntranceManage_0016 {
width: 248px; height: 64px;
}
#EntranceManage_001600 {
width: 100px; height: 16px;
display: none;
}
#EntranceManage_001601 {
width: 70px; height: 20px;
}
#EntranceManage_001602 {
width: 85px; height: 20px;
}
#EntranceManage_001603 {
width: 85px; height: 20px;
}
#EntranceManage_0017 {
width: 98px; height: 100px;
line-height: 100px;
}
#EntranceManage_0018 {
width: 398px; height: 100px;
text-align: left;
}
#EntranceManage_0019 {
width: 149px; height: 20px;
}
#EntranceManage_0020 {
width: 500px; height: 20px;
border: none;
}
#EntranceManage_002000 {
width: 500px;
}
#EntranceManage_00200000 {
width: 498px; height: 20px;
}
.EntranceManage_Sequence {
width: 48px; height: 20px;
}
.EntranceManage_Date {
width: 148px; height: 20px;
}
.EntranceManage_Amount {
width: 148px; height: 20px;
}
.EntranceManage_Cumul {
width: 148px; height: 20px;
}
+2 -6
View File
@@ -8,18 +8,14 @@
<!-- 스타일 -->
<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='../i_popup/Style.css'>
<link type="text/css" rel="stylesheet" href='../i_entrance/user_info.css'>
<link type="text/css" rel="stylesheet" href='../css/user_info.css'>
<!-- 액션 -->
<script type="text/javascript" src='../js/common.js'></script>
<script type="text/javascript" src='../e_lib/jquery-3.2.1.min.js'></script>
<script type="text/javascript" src='../e_lib/sha512.min.js'></script>
<script type="text/javascript" src='../js/func.js'></script>
<script type="text/javascript" src='../i_popup/Action.js'></script>
<script type="text/javascript" src='user_info.js'></script>
<script type="text/javascript" src='../js/user_info.js'></script>
</head>
<body>
<div id="user_info_container">
-308
View File
@@ -1,308 +0,0 @@
function fillUserInfo(result){
if(!result.result){
alert(result.reason);
location.href='entrance.php';
return;
}
$('#slot_id').html(result.id);
$('#slot_nickname').html(result.name);
$('#slot_grade').html(result.grade);
$('#slot_icon').attr('src', result.picture);
$('#global_salt').val(result.global_salt);
}
function changeIconPreview(){
var $preview = $(this);
console.log($preview);
var filename = $preview[0].files[0].name;
var reader = new FileReader();
reader.onload = function(e) {
$('#slot_new_icon').attr('src', e.target.result).css('visibility','visible');
}
reader.readAsDataURL($preview[0].files[0]);
$('#image_upload_filename').val(filename);
}
function deleteIcon(){
$.ajax({
type:'post',
url:'j_icon_delete.php',
dataType:'json'
}).then(function(result){
if(!result.result){
alert(result.reason);
location.reload();
return;
}
var ajaxResults = result.servers.map(function(server){
return $.ajax({
type:'post',
url:'../{0}/j_adjust_icon.php'.format(server),
dataType:'json'
});
});
$.when.apply($, ajaxResults).then(function(){
alert('이미지를 삭제했습니다.');
location.reload();
},function(){
//서버 폐쇄등으로 접근하지 못할 수도 있음.
alert('이미지를 삭제했습니다.');
location.reload();
});
},function(){
alert('알 수 없는 이유로 아이콘 삭제를 실패했습니다.');
location.reload();
});
}
function changeIcon(e){
e.preventDefault();
var $icon = $('#image_upload');
if($icon[0].files.length == 0){
alert('파일을 선택해주세요');
return false;
}
var icon = $icon[0].files[0];
$.ajax({
type:'post',
url:'j_icon_change.php',
dataType:'json',
contentType:false,
processData:false,
data:new FormData($(this)[0])
}).then(function(result){
if(!result.result){
alert(result.reason);
location.reload();
return;
}
var ajaxResults = result.servers.map(function(server){
return $.ajax({
type:'post',
url:'../{0}/j_adjust_icon.php'.format(server),
dataType:'json'
});
});
$.when.apply($, ajaxResults).then(function(){
alert('이미지를 업로드했습니다.');
location.reload();
},function(){
//서버 폐쇄등으로 접근하지 못할 수도 있음.
alert('이미지를 업로드했습니다.');
location.reload();
});
},function(){
alert('알 수 없는 이유로 아이콘 업로드를 실패했습니다.');
location.reload();
});
}
function changePassword(e){
e.preventDefault();
var $form = $(this);
var old_pw = $('#current_pw').val();
var new_pw = $('#new_pw').val();
var new_pw_confirm = $('#new_pw_confirm').val();
if(!old_pw){
alert('이전 비밀번호를 입력해야 합니다.');
return;
}
if(new_pw.length < 6){
alert('비밀번호 길이는 6글자 이상이어야 합니다.');
return;
}
if(new_pw != new_pw_confirm){
alert('입력 값이 일치하지 않습니다.');
return;
}
var global_salt = $('#global_salt').val();
var old_password = sha512(global_salt+old_pw+global_salt);
var new_password = sha512(global_salt+new_pw+global_salt);
$.ajax({
type:'post',
url:'j_change_password.php',
dataType:'json',
data:{
old_pw:old_password,
new_pw:new_password
}
}).then(function(result){
if(!result.result){
alert(result.reason);
}
else{
alert('비밀번호를 바꾸었습니다');
location.reload();
}
},function(){
alert('알 수 없는 이유로 비밀번호를 바꾸지 못했습니다.');
});
}
function deleteMe(){
var $form = $('#delete_me_form');
var pw = $('#delete_pw').val();
if(!pw){
alert('비밀번호를 입력해야 합니다.');
return;
}
var global_salt = $('#global_salt').val();
var password = sha512(global_salt+pw+global_salt);
$.ajax({
type:'post',
url:'j_delete_me.php',
dataType:'json',
data:{
pw:password
}
}).then(function(result){
if(!result.result){
alert(result.reason);
}
else{
alert('탈퇴 처리되었습니다.');
location.href='../';
}
},function(){
alert('알 수 없는 이유로 회원탈퇴에 실패했습니다.');
});
}
$(function(){
$.ajax({
type:'post',
url:'j_get_user_info.php',
dataType:'json'
}).then(function(result){
fillUserInfo(result);
},function(){
alert('알 수 없는 이유로, 회원 정보를 불러오지 못했습니다.');
location.href='entrance.php';
});
$('#image_upload').change(changeIconPreview);
$('#btn_remove_icon').click(function(){
if(confirm('아이콘을 제거할까요?')){
deleteIcon();
}
return false;
});
$('#change_pw_form').submit(changePassword);
$('#change_icon_form').submit(changeIcon);
$('#delete_me_form').submit(function(e){
e.preventDefault();
if(confirm('한 달 동안 재 가입할 수 없습니다. 정말로 탈퇴할까요?')){
deleteMe(e);
}
});
})
function EntranceManage_Update() {
Popup_Wait(function() {
PostJSON(
"../../i_entrance/manage/Get.php", {
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
EntranceManage_UpdateInfo(response);
Popup_WaitHide();
} else {
Popup_WaitShow("정보 로드 실패!");
}
}
)
});
}
function EntranceManage_ChangeIcon() {
if($("#EntranceManage_001601").val() == "") {
Popup_Alert("파일을 선택해 주세요!");
} else {
Popup_Wait(function() {
$("#formIcon").submit();
});
}
}
function EntranceManage_DeleteIcon() {
Popup_Confirm('정말 실행하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
"../../i_entrance/manage/deletePost.php", {
},
function(response, textStatus) {
Popup_WaitShow(response.msg, function() {
EntranceManage_Update();
});
}
)
})
});
}
function EntranceManage_Quit() {
var pw = $("#EntranceManage_000600").val();
if(pw.length < 4 || pw.length > 12) {
Popup_Alert("현재 비밀번호를 입력해주세요.", function() {
$("#EntranceManage_000600").val("");
$("#EntranceManage_000600").focus();
});
return false;
}
Popup_Confirm('정말 탈퇴하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
"../../i_entrance/manage/quitPost.php", {
pw: hex_md5(pw+""+pw)
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
Popup_WaitShow(response.msg, function() {
ReplaceFrame("../../");
});
} else {
Popup_WaitShow(response.msg, function() {
EntranceManage_Update();
});
}
}
)
})
});
}