- 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로 처리하도록 준비
153 lines
5.0 KiB
PHP
153 lines
5.0 KiB
PHP
<?php
|
|
include "lib.php";
|
|
include "func.php";
|
|
//로그인 검사
|
|
CheckLogin();
|
|
$connect = dbConn();
|
|
|
|
$query = "select skin from general where owner='{$_SESSION['noMember']}'";
|
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$me = MYDB_fetch_array($result);
|
|
|
|
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();
|
|
}
|
|
|
|
if($btn == '정렬하기') {
|
|
$gen = 0;
|
|
}
|
|
|
|
if($type == 0) {
|
|
$type = 0;
|
|
}
|
|
$sel[$type] = "selected";
|
|
?>
|
|
<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><?=closeButton()?></td></tr>
|
|
<tr><td>
|
|
<form name=form1 method=post>
|
|
정렬순서 :
|
|
<select name=type size=1>
|
|
<option <?=$sel[0];?> value=0>상태</option>
|
|
</select>
|
|
<input type=submit name=btn value='정렬하기'>
|
|
</form>
|
|
</td></tr>
|
|
</table>
|
|
<table width=1000 align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
|
|
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr>
|
|
<tr>
|
|
<td width=100 align=center id=bg1>국 가 명</td>
|
|
<td width=100 align=center id=bg1>국 가 명</td>
|
|
<td width=80 align=center id=bg1>상 태</td>
|
|
<td width=60 align=center id=bg1>기 간</td>
|
|
<td align=center id=bg1>비 고</td>
|
|
</tr>
|
|
<?php
|
|
|
|
foreach(getAllNationStaticInfo() as $nation){
|
|
$nationName[$nation['nation']] = $nation['name'];
|
|
$nationColor[$nation['nation']] = $nation['color'];
|
|
}
|
|
|
|
switch($type) {
|
|
case 0: $query = "select * from diplomacy where me < you order by state desc"; break;
|
|
}
|
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$dipcount = MYDB_num_rows($result);
|
|
for($i=0; $i < $dipcount; $i++) {
|
|
$dip = MYDB_fetch_array($result);
|
|
|
|
$me = $dip['me'];
|
|
$you = $dip['you'];
|
|
|
|
$query = "select reserved,showing from diplomacy where you='$me' and me='$you'";
|
|
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
$dip2 = MYDB_fetch_array($result2);
|
|
|
|
if($dip['state'] == 2 && $dip['fixed'] == "" && $dip['reserved'] == "" && $dip2['reserved'] == "") {
|
|
continue;
|
|
}
|
|
|
|
switch($dip['state']) {
|
|
case 0: $state = "<font color=red>교 전</font>"; break;
|
|
case 1: $state = "<font color=magenta>선포중</font>"; break;
|
|
case 2: $state = "통 상"; break;
|
|
case 3: $state = "<font color=cyan>통합수락중</font>"; break;
|
|
case 4: $state = "<font color=cyan>통합제의중</font>"; break;
|
|
case 5: $state = "<font color=cyan>합병수락중</font>"; break;
|
|
case 6: $state = "<font color=cyan>합병제의중</font>"; break;
|
|
case 7: $state = "<font color=green>불가침</font>"; break;
|
|
}
|
|
|
|
$date = date('Y-m-d H:i:s');
|
|
$note = "";
|
|
if($dip['fixed'] != "") {
|
|
if($dip['state'] == 7) {
|
|
$note .= $dip['fixed'];
|
|
} else {
|
|
$note .= "<font color=gray>{$dip['fixed']}</font>";
|
|
}
|
|
if($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
|
$note .= "<br>";
|
|
}
|
|
}
|
|
if($dip['reserved'] != "") {
|
|
if($dip['showing'] >= $date) {
|
|
$note .= "<font color=skyblue>아국측 제의</font>: {$dip['reserved']}";
|
|
} else {
|
|
$note .= "<font color=gray>아국측 제의: {$dip['reserved']}</font>";
|
|
}
|
|
if($dip2['reserved'] != "") {
|
|
$note .= "<br>";
|
|
}
|
|
}
|
|
if($dip2['reserved'] != "") {
|
|
if($dip2['showing'] >= $date) {
|
|
$note .= "<font color=limegreen>상대측 제의</font>: {$dip2['reserved']}";
|
|
} else {
|
|
$note .= "<font color=gray>상대측 제의: {$dip2['reserved']}</font>";
|
|
}
|
|
}
|
|
if($note == "") { $note = " "; }
|
|
|
|
echo "
|
|
<tr>
|
|
<td align=center style=color:".newColor($nationColor[$me]).";background-color:{$nationColor[$me]};>$nationName[$me]</td>
|
|
<td align=center style=color:".newColor($nationColor[$you]).";background-color:{$nationColor[$you]};>$nationName[$you]</td>
|
|
<td align=center>$state</td>
|
|
<td align=center>{$dip['term']} 개월</td>
|
|
<td align=left style=font-size:7px;>{$note}</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><?=closeButton()?></td></tr>
|
|
<tr><td><?=banner()?> </td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|