(기분상의 이유로) <?=$value;?>를 <?=$value?> 로 수정
This commit is contained in:
+22
-20
@@ -6,7 +6,7 @@ include "func.php";
|
||||
//로그인 검사
|
||||
$session = Session::requireGameLogin()->setReadOnly();
|
||||
|
||||
if($session->userGrade < 5) {
|
||||
if ($session->userGrade < 5) {
|
||||
echo "<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -28,11 +28,11 @@ if($session->userGrade < 5) {
|
||||
$db = DB::db();
|
||||
$connect=$db->get();
|
||||
|
||||
if($btn == '정렬하기') {
|
||||
if ($btn == '정렬하기') {
|
||||
$gen = 0;
|
||||
}
|
||||
|
||||
if($type == 0) {
|
||||
if ($type == 0) {
|
||||
$type = 0;
|
||||
}
|
||||
$sel[$type] = "selected";
|
||||
@@ -51,7 +51,7 @@ $sel[$type] = "selected";
|
||||
<form name=form1 method=post>
|
||||
정렬순서 :
|
||||
<select name=type size=1>
|
||||
<option <?=$sel[0];?> value=0>상태</option>
|
||||
<option <?=$sel[0]?> value=0>상태</option>
|
||||
</select>
|
||||
<input type=submit name=btn value='정렬하기'>
|
||||
</form>
|
||||
@@ -68,31 +68,31 @@ $sel[$type] = "selected";
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
foreach(getAllNationStaticInfo() as $nation){
|
||||
foreach (getAllNationStaticInfo() as $nation) {
|
||||
$nationName[$nation['nation']] = $nation['name'];
|
||||
$nationColor[$nation['nation']] = $nation['color'];
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
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),"");
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
|
||||
$dipcount = MYDB_num_rows($result);
|
||||
for($i=0; $i < $dipcount; $i++) {
|
||||
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),"");
|
||||
$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'] == "") {
|
||||
if ($dip['state'] == 2 && $dip['fixed'] == "" && $dip['reserved'] == "" && $dip2['reserved'] == "") {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch($dip['state']) {
|
||||
switch ($dip['state']) {
|
||||
case 0: $state = "<font color=red>교 전</font>"; break;
|
||||
case 1: $state = "<font color=magenta>선포중</font>"; break;
|
||||
case 2: $state = "통 상"; break;
|
||||
@@ -105,34 +105,36 @@ for($i=0; $i < $dipcount; $i++) {
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$note = "";
|
||||
if($dip['fixed'] != "") {
|
||||
if($dip['state'] == 7) {
|
||||
if ($dip['fixed'] != "") {
|
||||
if ($dip['state'] == 7) {
|
||||
$note .= $dip['fixed'];
|
||||
} else {
|
||||
$note .= "<font color=gray>{$dip['fixed']}</font>";
|
||||
}
|
||||
if($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
if ($dip['reserved'] != "" || $dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
if($dip['reserved'] != "") {
|
||||
if($dip['showing'] >= $date) {
|
||||
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'] != "") {
|
||||
if ($dip2['reserved'] != "") {
|
||||
$note .= "<br>";
|
||||
}
|
||||
}
|
||||
if($dip2['reserved'] != "") {
|
||||
if($dip2['showing'] >= $date) {
|
||||
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 = " "; }
|
||||
if ($note == "") {
|
||||
$note = " ";
|
||||
}
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user