- DB 불러오는 방식을 기존의 set.php에서 conf.php의 getRootDB()를 이용하도록 변경 - ADODB 에 기반한 _DB 클래스 폐기 - DBS.php 폐기 - _Setting 클래스 용도 변경 - 서버 목록 정의 방식을 하나로 모음 - 로그인시 세션에 사용자 등급을 추가 - "참여"(donation) 관련 코드 전면 제거 - 서버 리셋시 부운영자 비밀번호 문제 수정 - 서버 오픈,닫힘 여부를 새 서버 목록 정의 방식에 따르도록 수정 - DBS.php가 폐기 되었으므로 서버 오픈시 기본 정보를 json으로 받아오도록 하기 위하여 기본 준비 - 기존에 남아있던 세부 서버 로그인 처리 파일을 제거(enterPost.php) - DBS.php 삭제로 전콘 변경시에도 각 서버로 json 호출을 하도록 하는 방식으로 준비 - 전콘을 수동으로 서버에 올린뒤 처리할 수 있도록 하던 legacy 코드 제거 - general 테이블에서 userlevel 컬럼을 삭제하고, 세션에 기록된 userGrade를 이용하도록 변경 - 벌점 제한을 모든 유저 공통으로 하도록 수정 - 세부 서버 리셋을 json ajax로 처리하도록 준비
144 lines
5.2 KiB
PHP
144 lines
5.2 KiB
PHP
<?php
|
|
include "lib.php";
|
|
include "func.php";
|
|
//로그인 검사
|
|
CheckLogin();
|
|
$connect = dbConn();
|
|
|
|
if(getUserGrade() < 5) {
|
|
echo "
|
|
<html>
|
|
<head>
|
|
<title>관리메뉴</title>
|
|
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
|
<link rel=stylesheet href=css/common.css type=text/css>
|
|
</head>
|
|
<body>
|
|
관리자가 아닙니다.<br>
|
|
";
|
|
echo banner();
|
|
echo "
|
|
</body>
|
|
</html>";
|
|
|
|
exit();
|
|
}
|
|
|
|
$query = "select conlimit from game where no=1";
|
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$admin = MYDB_fetch_array($result);
|
|
?>
|
|
<html>
|
|
<head>
|
|
<title>멀티관리</title>
|
|
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
|
|
<link rel=stylesheet href=css/common.css type=text/css>
|
|
</head>
|
|
<body>
|
|
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
<tr><td>멀 티 관 리<br><?=backButton()?></td></tr>
|
|
</table>
|
|
<form name=form1 method=post action=_admin4_submit.php>
|
|
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
<tr>
|
|
<td width=80 align=center rowspan=3>회원선택<br><br><font color=cyan>NPC</font><br><font color=skyblue>NPC유저</font><br><font color=red>접속제한</font><br><b style=background-color:red;>블럭회원</b></td>
|
|
<td width=105 rowspan=3>
|
|
<?php
|
|
|
|
echo "
|
|
<select name=genlist[] size=20 multiple style=color:white;background-color:black;font-size:13>";
|
|
|
|
$query = "select no,name,npc,block from general where ip!='' order by npc,ip";
|
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$gencount = MYDB_num_rows($result);
|
|
|
|
for($i=0; $i < $gencount; $i++) {
|
|
$general = MYDB_fetch_array($result);
|
|
$style = "style=;";
|
|
if($general['block'] > 0) { $style .= "background-color:red;"; }
|
|
if($general['npc'] >= 2) { $style .= "color:cyan;"; }
|
|
elseif($general['npc'] == 1) { $style .= "color:skyblue;"; }
|
|
if($general['con'] > $admin['conlimit']) { $style .= "color:red;"; }
|
|
|
|
echo "
|
|
<option value={$general['no']} $style>{$general['name']}</option>";
|
|
}
|
|
|
|
echo "
|
|
</select>";
|
|
?>
|
|
</td>
|
|
<td width=100 align=center>블럭</td>
|
|
<td width=504>
|
|
<input type=submit name=btn value='블럭 해제'><input type=submit name=btn value='1단계 블럭'><input type=submit name=btn value='2단계 블럭'><input type=submit name=btn value='3단계 블럭'><input type=submit name=btn value='무한삭턴'><br>
|
|
1단계:발언권, 2단계:턴블럭
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align=center>강제 사망</td>
|
|
<td><input type=submit name=btn value='강제 사망'></td>
|
|
</tr>
|
|
<tr>
|
|
<td align=center>메세지 전달</td>
|
|
<td><input type=textarea size=60 maxlength=255 name=msg style=background-color:black;color:white;><input type=submit name=btn value='메세지 전달'></td>
|
|
</tr>
|
|
</table>
|
|
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
<tr>
|
|
<td align=center width=100>장수명</td>
|
|
<td align=center width=180>최근로그인</td>
|
|
<td align=center width=129>IP</td>
|
|
<td align=center width=100>ID</td>
|
|
<td align=center width=278>-</td>
|
|
</tr>
|
|
<tr>
|
|
<?php
|
|
$query = "select substring_index(ip,'.',3) as ip2 from general where ip!='' and npc<2 group by ip2 having count(*)>1";
|
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$ipCount = MYDB_num_rows($result);
|
|
$genName = "";
|
|
$genDate = "";
|
|
$genIP = "";
|
|
$genID = "";
|
|
$conMsg = "";
|
|
for($i=0; $i < $ipCount; $i++) {
|
|
$ip = MYDB_fetch_array($result);
|
|
|
|
$query = "select name,ip,lastconnect,owner,block,conmsg from general where ip like '{$ip['ip2']}%' and npc<2 order by ip";
|
|
$genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$genCount = MYDB_num_rows($genResult);
|
|
for($k=0; $k < $genCount; $k++) {
|
|
$gen = MYDB_fetch_array($genResult);
|
|
if($gen['block'] > 0) $genName .= "<font color=magenta>{$gen['name']}</font><br>";
|
|
else $genName .= $gen['name']."<br>";
|
|
$genDate .= $gen['lastconnect']."<br>";
|
|
$genIP .= $gen['ip']."<br>";
|
|
$genID .= $gen['owner']."<br>";
|
|
$conMsg .= $gen['conmsg']."<br>";
|
|
}
|
|
$genName .= "<br>";
|
|
$genDate .= "<br>";
|
|
$genIP .= "<br>";
|
|
$genID .= "<br>";
|
|
$conMsg .= "<br>";
|
|
}
|
|
echo "
|
|
<td align=right>$genName</td>
|
|
<td>$genDate</td>
|
|
<td>$genIP</td>
|
|
<td>$genID</td>
|
|
<td>$conMsg</td>";
|
|
?>
|
|
</tr>
|
|
</table>
|
|
<?php
|
|
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
|
|
?>
|
|
</form>
|
|
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
<tr><td><?=backButton()?></td></tr>
|
|
<tr><td><?=banner()?> </td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|