(기분상의 이유로) <?=$value;?>를 <?=$value?> 로 수정

This commit is contained in:
2018-04-08 13:14:28 +09:00
parent 463994df42
commit fe53fb9359
19 changed files with 732 additions and 500 deletions
+22 -20
View File
@@ -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 = "&nbsp;"; }
if ($note == "") {
$note = "&nbsp;";
}
echo "
<tr>
+5 -5
View File
@@ -109,13 +109,13 @@ $history = MYDB_fetch_array($result);
<tr><td colspan=5 align=center id=bg1>중 원 지 도</td></tr>
<tr height=520>
<td width=698>
<iframe src='map_history.php?year=<?=$year;?>&month=<?=$month;?>' width=698 height=520 frameborder=0 marginwidth=0 marginheight=0 topmargin=0 scrolling=no>
<iframe src='map_history.php?year=<?=$year?>&month=<?=$month?>' width=698 height=520 frameborder=0 marginwidth=0 marginheight=0 topmargin=0 scrolling=no>
</iframe>
</td>
<td width=98 valign=top><?=$history['nation'];?></td>
<td width=78 valign=top><?=$history['power'];?></td>
<td width=58 valign=top><?=$history['gen'];?></td>
<td width=58 valign=top><?=$history['city'];?></td>
<td width=98 valign=top><?=$history['nation']?></td>
<td width=78 valign=top><?=$history['power']?></td>
<td width=58 valign=top><?=$history['gen']?></td>
<td width=58 valign=top><?=$history['city']?></td>
</tr>
<tr><td colspan=5 align=center id=bg1>중 원 정 세</td></tr>
<tr>
+1 -1
View File
@@ -48,7 +48,7 @@ function captureKey(e) {
</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>
<form name=form1 action=c_vote.php method=post>
<tr><td colspan=3 align=center id=bg2><font size=5>설 문 조 사 (<?=$admin['develcost']*5;?>금과 추첨으로 유니크템 증정!)</font></td></tr>
<tr><td colspan=3 align=center id=bg2><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr>
<?php
if($session->userGrade >= 5) {
+66 -31
View File
@@ -13,34 +13,41 @@ $connect=$db->get();
increaseRefresh("거래장", 2);
$query = "select no,special,con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
$query = "select no from auction where no1='{$me['no']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$tradeCount = MYDB_num_rows($result);
$query = "select no from auction where no2='{$me['no']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$bidCount = MYDB_num_rows($result);
$btCount = $tradeCount + $bidCount;
if($session->userGrade >= 5 || ($me['special'] != 30 && $btCount < 1) || ($me['special'] == 30 && $btCount < 3)) {
if ($session->userGrade >= 5 || ($me['special'] != 30 && $btCount < 1) || ($me['special'] == 30 && $btCount < 3)) {
$btn = "submit";
} else {
$btn = "hidden";
}
if($msg == "") $msg = "-";
if($msg2 == "") $msg2 = "-";
if ($msg == "") {
$msg = "-";
}
if ($msg2 == "") {
$msg2 = "-";
}
?>
<!DOCTYPE html>
<html>
@@ -73,21 +80,35 @@ if($msg2 == "") $msg2 = "-";
</tr>
<?php
$query = "select * from auction where type=0 order by expire";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
$chk = 0;
for($i=0; $i < $count; $i++) {
for ($i=0; $i < $count; $i++) {
$auction = MYDB_fetch_array($result);
$itemname = GetStuffName($auction['stuff']);
$radio = ""; $alert = ""; $alert2 = "";
if($auction['no1'] == $me['no']) { $radio = " disabled"; }
elseif($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value'] && $auction['stuff'] == 0) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
elseif($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
elseif($chk == 0) { $radio = " checked"; $chk = 1; }
$radio = "";
$alert = "";
$alert2 = "";
if ($auction['no1'] == $me['no']) {
$radio = " disabled";
} elseif ($auction['no2'] > 0 && $auction['amount'] * 2 <= $auction['value'] && $auction['stuff'] == 0) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($auction['no2'] > 0 && $auction['topv'] <= $auction['value']) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($chk == 0) {
$radio = " checked";
$chk = 1;
}
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
$pv = substr($pv, 0, 4);
if($auction['stuff'] != 0) { $pv = '-'; }
if ($auction['stuff'] != 0) {
$pv = '-';
}
echo "
<tr align=center>
<td>{$auction['no']}</td>
@@ -107,13 +128,13 @@ for($i=0; $i < $count; $i++) {
?>
<tr height=25>
<td align=center id=bg1>등록결과</td>
<td colspan=10><?=ConvertLog($msg);?></td>
<td colspan=10><?=ConvertLog($msg)?></td>
</tr>
<tr>
<td align=center id=bg1>입찰등록</td>
<td colspan=10>
 지불할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?=$btn;?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
<input type=<?=$btn?> name=btn value='구매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
@@ -126,7 +147,7 @@ for($i=0; $i < $count; $i++) {
 판매량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
 시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=500>
 즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=2000>
<input type=<?=$btn;?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
<input type=<?=$btn?> name=btn value='판매' onclick='return confirm("정말 판매하시겠습니까?");'>
</td>
</tr>
<tr>
@@ -157,21 +178,35 @@ for($i=0; $i < $count; $i++) {
</tr>
<?php
$query = "select * from auction where type=1 order by expire";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
$chk = 0;
for($i=0; $i < $count; $i++) {
for ($i=0; $i < $count; $i++) {
$auction = MYDB_fetch_array($result);
$itemname = GetStuffName($auction['stuff']);
$radio = ""; $alert = ""; $alert2 = "";
if($auction['no1'] == $me['no']) { $radio = " disabled"; }
elseif($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2 && $auction['stuff'] == 0) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
elseif($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) { $radio = " disabled"; $alert = "<font color=red>"; $alert2 = "</font>"; }
elseif($chk == 0) { $radio = " checked"; $chk = 1; }
$radio = "";
$alert = "";
$alert2 = "";
if ($auction['no1'] == $me['no']) {
$radio = " disabled";
} elseif ($auction['no2'] > 0 && $auction['amount'] >= $auction['value'] * 2 && $auction['stuff'] == 0) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($auction['no2'] > 0 && $auction['topv'] >= $auction['value']) {
$radio = " disabled";
$alert = "<font color=red>";
$alert2 = "</font>";
} elseif ($chk == 0) {
$radio = " checked";
$chk = 1;
}
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
$pv = substr($pv, 0, 4);
if($auction['stuff'] != 0) { $pv = '-'; }
if ($auction['stuff'] != 0) {
$pv = '-';
}
echo "
<tr align=center>
<td>{$auction['no']}</td>
@@ -191,13 +226,13 @@ for($i=0; $i < $count; $i++) {
?>
<tr height=25>
<td align=center id=bg1>등록결과</td>
<td colspan=10><?=ConvertLog($msg2);?></td>
<td colspan=10><?=ConvertLog($msg2)?></td>
</tr>
<tr>
<td align=center id=bg1>입찰등록</td>
<td colspan=10>
 수령할 금액: <input type=text style=color:white;background-color:black; size=6 maxlength=6 name=value>
<input type=<?=$btn;?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
<input type=<?=$btn?> name=btn value='판매시도' onclick='return confirm("정말 입찰하시겠습니까?");'>
</td>
</tr>
<tr>
@@ -210,7 +245,7 @@ for($i=0; $i < $count; $i++) {
 구입량: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=amount value=1000>
 시작가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=cost value=2000>
 즉구가: <input type=text style=color:white;background-color:black; size=5 maxlength=5 name=topv value=500>
<input type=<?=$btn;?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
<input type=<?=$btn?> name=btn value='구매' onclick='return confirm("정말 구매하시겠습니까?");'>
</td>
</tr>
<tr>
@@ -226,7 +261,7 @@ for($i=0; $i < $count; $i++) {
<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 id=bg2><font size=5>최 근 기 록</font></td></tr>
<tr><td>
<?=getAuctionLogRecent(20);?>
<?=getAuctionLogRecent(20)?>
</td></tr>
<tr><td align=center id=bg2><font size=5>도 움 말</font></td></tr>
<tr><td>
+21 -18
View File
@@ -15,41 +15,44 @@ increaseRefresh("감찰부", 2);
checkTurn();
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select nation from general where no='$gen'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$general = MYDB_fetch_array($result);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
//재야인 경우
$meLevel = $me['level'];
if($meLevel == 0 || ($meLevel == 1 && $me['belong'] < $nation['secretlimit'])) {
if ($meLevel == 0 || ($meLevel == 1 && $me['belong'] < $nation['secretlimit'])) {
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
}
//잘못된 접근
if($general['nation'] != $me['nation']) {
if ($general['nation'] != $me['nation']) {
$gen = 0;
}
if($btn == '정렬하기') {
if ($btn == '정렬하기') {
$gen = 0;
}
if($type == 0) {
if ($type == 0) {
$type = 0;
}
$sel[$type] = "selected";
@@ -72,31 +75,31 @@ $sel[$type] = "selected";
<form name=form1 method=post>
정렬순서 :
<select name=type size=1>
<option <?=$sel[0];?> value=0>최근턴</option>
<option <?=$sel[1];?> value=1>최근전투</option>
<option <?=$sel[2];?> value=2>장수명</option>
<option <?=$sel[3];?> value=3>전투수</option>
<option <?=$sel[0]?> value=0>최근턴</option>
<option <?=$sel[1]?> value=1>최근전투</option>
<option <?=$sel[2]?> value=2>장수명</option>
<option <?=$sel[3]?> value=3>전투수</option>
</select>
<input type=submit name=btn value='정렬하기'>
대상장수 :
<select name=gen size=1>
<?php
switch($type) {
switch ($type) {
case 0: $query = "select no,name from general where nation='{$me['nation']}' order by turntime desc"; break;
case 1: $query = "select no,name from general where nation='{$me['nation']}' order by recwar desc"; break;
case 2: $query = "select no,name from general where nation='{$me['nation']}' order by npc,binary(name)"; break;
case 3: $query = "select no,name from general where nation='{$me['nation']}' order by warnum desc"; break;
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($result);
for($i=0; $i < $gencount; $i++) {
for ($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($result);
// 선택 없으면 맨 처음 장수
if($gen == 0) {
if ($gen == 0) {
$gen = $general['no'];
}
if($gen == $general['no']) {
if ($gen == $general['no']) {
echo "
<option selected value={$general['no']}>{$general['name']}</option>";
} else {
+129 -73
View File
@@ -14,17 +14,20 @@ increaseRefresh("베팅장", 1);
checkTurn();
$query = "select no,tournament,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select conlimit,tournament,phase,tnmt_type,develcost,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
switch($admin['tnmt_type']) {
switch ($admin['tnmt_type']) {
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break;
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break;
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break;
@@ -38,7 +41,9 @@ $str3 = getTournamentTerm();
?>
<!DOCTYPE html>
<html>
<?php if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다!"); } ?>
<?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<title>베팅장</title>
@@ -48,9 +53,9 @@ table { font-family:'맑은 고딕'; line-height:110%; }
font { font-family:'맑은 고딕'; line-height:110%; }
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
select { font-family:'굴림'; line-height:100%; }
#bg0 { background-image:url(<?=$images;?>/back_walnut.jpg); }
#bg1 { background-image:url(<?=$images;?>/back_green.jpg); }
#bg2 { background-image:url(<?=$images;?>/back_blue.jpg); }
#bg0 { background-image:url(<?=$images?>/back_walnut.jpg); }
#bg1 { background-image:url(<?=$images?>/back_green.jpg); }
#bg2 { background-image:url(<?=$images?>/back_blue.jpg); }
</style>
</head>
@@ -61,20 +66,25 @@ select { font-family:'굴림'; line-height:100%; }
</table>
<table align=center width=1120 border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10;word-break:break-all; id=bg0>
<tr><td colspan=16><input type=button value='갱신' onclick='location.reload()'></td></tr>
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type;?> (<?=$str1.", ".$str2.", ".$str3;?>)</font></td></tr>
<tr><td height=50 colspan=16 align=center id=bg2><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$admin['bet'];?> / 내 투자 금액 : <?=$me['bet'];?>)</font></td></tr>
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.", ".$str2.", ".$str3?>)</font></td></tr>
<tr><td height=50 colspan=16 align=center id=bg2><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$admin['bet']?> / 내 투자 금액 : <?=$me['bet']?>)</font></td></tr>
</table>
<table align=center width=1120 border=0 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:10;word-break:break-all; id=bg0>
<tr align=center><td height=10 colspan=16></td></tr>
<tr align=center>
<?php
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 1; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 1; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
echo "<td colspan=16>{$general['name']}</td>";
}
@@ -83,18 +93,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=50 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 1; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 2; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 1; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 2; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 1; $i++) {
for ($i=0; $i < 1; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"."</font>";
@@ -104,7 +125,7 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 2; $i++) {
for ($i=0; $i < 2; $i++) {
echo "<td colspan=8>{$gen[$i]}</td>";
}
@@ -113,18 +134,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=40 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 2; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 4; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 2; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 4; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 2; $i++) {
for ($i=0; $i < 2; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━┓"."</font>";
@@ -134,7 +166,7 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 4; $i++) {
for ($i=0; $i < 4; $i++) {
echo "<td colspan=4>{$gen[$i]}</td>";
}
@@ -143,18 +175,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=30 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 4; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 8; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 4; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 8; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 4; $i++) {
for ($i=0; $i < 4; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━┓"."</font>";
@@ -164,7 +207,7 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 8; $i++) {
for ($i=0; $i < 8; $i++) {
echo "<td colspan=2>{$gen[$i]}</td>";
}
@@ -173,18 +216,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=20 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 8; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 16; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 8; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 16; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 8; $i++) {
for ($i=0; $i < 8; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━┓"."</font>";
@@ -194,23 +248,25 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "<td width=70>{$gen[$i]}</td>";
}
$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
$myBet[$i] = $me["bet{$i}"];
}
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
$bet[$i] = @round($admin['bet'] / $admin["bet{$i}"], 2);
if($bet[$i] == 0) { $bet[$i] = "∞"; }
if ($bet[$i] == 0) {
$bet[$i] = "∞";
}
}
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
$gold[$i] = round($myBet[$i] * $bet[$i]);
}
?>
@@ -222,7 +278,7 @@ for($i=0; $i < 16; $i++) {
echo "
<tr align=center>";
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "<td width=70><font color=skyblue>{$bet[$i]}</font></td>";
}
?>
@@ -233,7 +289,7 @@ for($i=0; $i < 16; $i++) {
</tr>
<tr align=center>
<?php
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "<td><font color=orange>{$myBet[$i]}</font></td>";
}
?>
@@ -244,7 +300,7 @@ for($i=0; $i < 16; $i++) {
</tr>
<tr align=center>
<?php
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "<td><font color=cyan>{$gold[$i]}</font></td>";
}
@@ -252,12 +308,12 @@ echo "
</tr>
<tr align=center><td height=10 colspan=16></td></tr>";
if($admin['tournament'] == 6) {
if ($admin['tournament'] == 6) {
echo "
<form method=post action=c_betting.php>
<tr align=center>";
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "
<td>
<select size=1 name=gold{$i} style=color:white;background-color:black;>
@@ -276,7 +332,7 @@ if($admin['tournament'] == 6) {
</tr>
<tr align=center>";
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "
<td><input type=submit name=btn{$i} value=베팅! style=width:100%;color:white;background-color:black;></td>";
}
@@ -301,12 +357,12 @@ if($admin['tournament'] == 6) {
<tr align=center>
<?php
$type1 = Array("전 력 전", "통 솔 전", "일 기 토", "설 전");
$type2 = Array("종합", "통솔", "무력", "지력");
$type3 = Array("tt", "tl", "tp", "ti");
$type4 = Array("total", "leader", "power", "intel");
$type1 = array("전 력 전", "통 솔 전", "일 기 토", "설 전");
$type2 = array("종합", "통솔", "무력", "지력");
$type3 = array("tt", "tl", "tp", "ti");
$type4 = array("total", "leader", "power", "intel");
for($i=0; $i < 4; $i++) {
for ($i=0; $i < 4; $i++) {
$grp = $i;
echo "
<td>
@@ -315,8 +371,8 @@ for($i=0; $i < 4; $i++) {
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$type2[$i]}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>勝</td></tr>";
$query = "select npc,name,leader,power,intel,leader+power+intel as total,{$type3[$i]}p as prize,{$type3[$i]}w+{$type3[$i]}d+{$type3[$i]}l as game,{$type3[$i]}w as win,{$type3[$i]}d as draw,{$type3[$i]}l as lose,{$type3[$i]}g as gl from general order by gl desc, game desc, win desc, draw desc, lose, no limit 0,30";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($k=1; $k <= 30; $k++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($k=1; $k <= 30; $k++) {
$general = MYDB_fetch_array($result);
printRow($k, $general['npc'], $general['name'], $general[$type4[$i]], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gl'], $general['prize'], 0);
}
+56 -40
View File
@@ -13,27 +13,35 @@ $connect=$db->get();
increaseRefresh("내무부", 1);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
}
if($me['level'] >= 5) { $btn = "submit"; $read = ""; }
else { $btn = "hidden"; $read = "readonly"; }
if ($me['level'] >= 5) {
$btn = "submit";
$read = "";
} else {
$btn = "hidden";
$read = "readonly";
}
?>
<!DOCTYPE html>
@@ -63,20 +71,20 @@ else { $btn = "hidden"; $read = "readonly"; }
</tr>
<?php
$query = "select year,month from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select nation,name,color,power,gennum from nation order by power desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nationcount = MYDB_num_rows($result);
for($i=0; $i < $nationcount; $i++) {
for ($i=0; $i < $nationcount; $i++) {
$nation = MYDB_fetch_array($result);
// 아국표시
if($nation['nation'] == $me['nation']) {
if ($nation['nation'] == $me['nation']) {
//속령수
$query = "select city from city where nation='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$citycount = MYDB_num_rows($result2);
echo "
<tr>
@@ -94,17 +102,17 @@ for($i=0; $i < $nationcount; $i++) {
}
$query = "select state,term,fixed,reserved,showing from diplomacy where me='{$me['nation']}' and you='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$dip = MYDB_fetch_array($result2);
$query = "select reserved,showing from diplomacy where you='{$me['nation']}' and me='{$nation['nation']}'";
$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);
//속령수
$query = "select city from city where nation='{$nation['nation']}'";
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$citycount = MYDB_num_rows($result2);
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;
@@ -119,37 +127,39 @@ for($i=0; $i < $nationcount; $i++) {
$year = floor($term / 12);
$month = $term % 12;
if($month == 0) {
if ($month == 0) {
$month = 12;
$year--;
}
$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['showing'] >= $date) {
if($dip['reserved'] != "") {
if ($dip['showing'] >= $date) {
if ($dip['reserved'] != "") {
$note .= "<font color=skyblue>아국측 제의</font>: ".$dip['reserved'];
if($dip2['reserved'] != "") {
if ($dip2['reserved'] != "") {
$note .= "<br>";
}
}
}
if($dip2['showing'] >= $date) {
if($dip2['reserved'] != "") {
if ($dip2['showing'] >= $date) {
if ($dip2['reserved'] != "") {
$note .= "<font color=limegreen>상대측 제의</font>: ".$dip2['reserved'];
}
}
if($note == "") { $note = "&nbsp;"; }
if ($note == "") {
$note = "&nbsp;";
}
echo "
<tr>
@@ -158,7 +168,7 @@ for($i=0; $i < $nationcount; $i++) {
<td align=center>{$nation['gennum']}</td>
<td align=center>$citycount</td>
<td align=center>$state</td>";
if($dip['term'] != 0) {
if ($dip['term'] != 0) {
echo"
<td align=center>{$dip['term']} 개월</td>
<td align=center>{$year}年 {$month}月</td>";
@@ -176,11 +186,11 @@ echo "
";
$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutmsg,secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$query = "select gold_rate,rice_rate from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
// 금 수지
$deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']);
@@ -197,18 +207,24 @@ $budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome;
$budgetrice = $nation['rice'] + $riceincome - $riceoutcome;
$budgetgolddiff = $goldincome - $goldoutcome + $deadIncome;
$budgetricediff = $riceincome - $riceoutcome;
if($budgetgolddiff > 0) { $budgetgolddiff = "+{$budgetgolddiff}"; }
else { $budgetgolddiff = "$budgetgolddiff"; }
if($budgetricediff > 0) { $budgetricediff = "+{$budgetricediff}"; }
else { $budgetricediff = "$budgetricediff"; }
if ($budgetgolddiff > 0) {
$budgetgolddiff = "+{$budgetgolddiff}";
} else {
$budgetgolddiff = "$budgetgolddiff";
}
if ($budgetricediff > 0) {
$budgetricediff = "+{$budgetricediff}";
} else {
$budgetricediff = "$budgetricediff";
}
?>
<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>
<form name=form1 method=post action=c_dipcenter.php>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 align=center bgcolor=orange>국 가 방 침 &amp; 임관 권유 메세지</td></tr>
<tr><td colspan=2 id=bg1>국가 방침 <input type=text <?=$read;?> maxlength=500 style=color:white;background-color:black;width:830; name=msg value='<?=$nation['msg'];?>'><input type=<?=$btn;?> name=btn value=국가방침></td></tr>
<tr><td colspan=2 id=bg1>임관 권유 <input type=text <?=$read;?> maxlength=500 style=color:white;background-color:black;width:830; name=scoutmsg value='<?=$nation['scoutmsg'];?>'><input type=<?=$btn;?> name=btn value=임관권유></td></tr>
<tr><td colspan=2 id=bg1>국가 방침 <input type=text <?=$read?> maxlength=500 style=color:white;background-color:black;width:830; name=msg value='<?=$nation['msg']?>'><input type=<?=$btn?> name=btn value=국가방침></td></tr>
<tr><td colspan=2 id=bg1>임관 권유 <input type=text <?=$read?> maxlength=500 style=color:white;background-color:black;width:830; name=scoutmsg value='<?=$nation['scoutmsg']?>'><input type=<?=$btn?> name=btn value=임관권유></td></tr>
<tr><td colspan=2>900 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.</td></tr>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td></tr>
@@ -254,20 +270,20 @@ echo "
?>
<tr>
<td align=right id=bg1>세율 (5 ~ 30%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read;?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn;?> name=btn value=세율></td>
<td align=center><input type=text <?=$read?> name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['rate']?>>% <input type=<?=$btn?> name=btn value=세율></td>
<td align=right id=bg1>봉급 지급율 (20 ~ 200%)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read;?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn;?> name=btn value=지급율></td>
<td align=center><input type=text <?=$read?> name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['bill']?>>% <input type=<?=$btn?> name=btn value=지급율></td>
</tr>
<tr>
<td align=right id=bg1>기밀 권한 (1 ~ 99년)&nbsp;&nbsp;&nbsp;</td>
<td align=center><input type=text <?=$read;?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn;?> name=btn value=기밀권한></td>
<td align=center><input type=text <?=$read?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn?> name=btn value=기밀권한></td>
<td align=right id=bg1>임관&전쟁 변경 가능</td>
<td align=center>무제한</td>
</tr>
<tr>
<td colspan=4 align=center>
<?php
if($nation['scout'] == 0) {
if ($nation['scout'] == 0) {
echo "
<input type=$btn name=btn value='임관 금지'>";
} else {
@@ -275,7 +291,7 @@ if($nation['scout'] == 0) {
<input type=$btn name=btn value='임관 허가'>";
}
if($nation['war'] == 0) {
if ($nation['war'] == 0) {
echo "
<input type=$btn name=btn value='전쟁 금지'>";
} else {
+2 -2
View File
@@ -80,7 +80,7 @@ $(function(){
</table>
<br>
<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 colspan=<?=$nationcount+1;?> align=center bgcolor=blue>외 교 현 황</td></tr>
<tr><td colspan=<?=$nationcount+1?> align=center bgcolor=blue>외 교 현 황</td></tr>
<?php
echo "
<tr>
@@ -144,7 +144,7 @@ for($i=0; $i < $nationcount; $i++) {
";
}
?>
<tr><td colspan=<?=$nationcount+1;?> align=center>불가침 : <font color=limegreen>@</font>, 통합 : <font color=cyan>○</font>, 합병 : <font color=skyblue>◎</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
<tr><td colspan=<?=$nationcount+1?> align=center>불가침 : <font color=limegreen>@</font>, 통합 : <font color=cyan>○</font>, 합병 : <font color=skyblue>◎</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr>
</table>
<?php
$query = "select city,name,conflict,conflict2 from city where conflict like '%|%'";
+40 -31
View File
@@ -13,26 +13,29 @@ $connect=$db->get();
increaseRefresh("암행부", 2);
$query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select level,secretlimit from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) {
echo "수뇌부가 아니거나 사관년도가 부족합니다.";
exit();
}
if($type == 0) {
if ($type == 0) {
$type = 7;
}
$sel[$type] = "selected";
@@ -40,7 +43,9 @@ $sel[$type] = "selected";
?>
<!DOCTYPE html>
<html>
<?php if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다!"); } ?>
<?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다!");
} ?>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<title>암행부</title>
@@ -53,29 +58,29 @@ $sel[$type] = "selected";
<tr><td>암 행 부<br><?=closeButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[1];?> value=1>자금</option>
<option <?=$sel[2];?> value=2>군량</option>
<option <?=$sel[3];?> value=3>도시</option>
<option <?=$sel[4];?> value=4>병종</option>
<option <?=$sel[5];?> value=5>병사</option>
<option <?=$sel[6];?> value=6>삭제턴</option>
<option <?=$sel[7];?> value=7>턴</option>
<option <?=$sel[8];?> value=8>부대</option>
<option <?=$sel[1]?> value=1>자금</option>
<option <?=$sel[2]?> value=2>군량</option>
<option <?=$sel[3]?> value=3>도시</option>
<option <?=$sel[4]?> value=4>병종</option>
<option <?=$sel[5]?> value=5>병사</option>
<option <?=$sel[6]?> value=6>삭제턴</option>
<option <?=$sel[7]?> value=7>턴</option>
<option <?=$sel[8]?> value=8>부대</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<?php
$query = "select troop,name from troop where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$troopCount = MYDB_num_rows($result);
for($i=0; $i < $troopCount; $i++) {
for ($i=0; $i < $troopCount; $i++) {
$troop = MYDB_fetch_array($result);
$troopName[$troop['troop']] = $troop['name'];
}
switch($type) {
switch ($type) {
case 1: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by gold desc"; break;
case 2: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by rice desc"; break;
case 3: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by city"; break;
@@ -85,7 +90,7 @@ switch($type) {
case 7: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by turntime"; break;
case 8: $query = "select npc,mode,no,level,troop,city,injury,leader,power,intel,experience,name,gold,rice,crewtype,crew,train,atmos,killturn,turntime,term,turn0,turn1,turn2,turn3,turn4 from general where nation='{$me['nation']}' order by troop desc"; break;
}
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
echo"
@@ -106,25 +111,25 @@ echo"
<td width=58 align=center id=bg1>삭턴</td>
<td width=58 align=center id=bg1>턴</td>
</tr>";
for($j=0; $j < $gencount; $j++) {
for ($j=0; $j < $gencount; $j++) {
$general = MYDB_fetch_array($genresult);
$city = CityConst::byID($general['city'])->name;
$troop = $troopName[$general['troop']] == "" ? "-" : $troopName[$general['troop']];
if($general['level'] == 12) {
if ($general['level'] == 12) {
$lbonus = $nation['level'] * 2;
} elseif($general['level'] >= 5) {
} elseif ($general['level'] >= 5) {
$lbonus = $nation['level'];
} else {
$lbonus = 0;
}
if($lbonus > 0) {
if ($lbonus > 0) {
$lbonus = "<font color=cyan>+{$lbonus}</font>";
} else {
$lbonus = "";
}
if($general['injury'] > 0) {
if ($general['injury'] > 0) {
$leader = floor($general['leader'] * (100 - $general['injury'])/100);
$power = floor($general['power'] * (100 - $general['injury'])/100);
$intel = floor($general['intel'] * (100 - $general['injury'])/100);
@@ -137,11 +142,15 @@ for($j=0; $j < $gencount; $j++) {
$intel = "{$general['intel']}";
}
if($general['npc'] >= 2) { $name = "<font color=cyan>{$general['name']}</font>"; }
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; }
else { $name = "{$general['name']}"; }
if ($general['npc'] >= 2) {
$name = "<font color=cyan>{$general['name']}</font>";
} elseif ($general['npc'] == 1) {
$name = "<font color=skyblue>{$general['name']}</font>";
} else {
$name = "{$general['name']}";
}
switch($general['mode']) {
switch ($general['mode']) {
case 0: $mode = "×"; break;
case 1: $mode = "○"; break;
case 2: $mode = "◎"; break;
@@ -160,7 +169,7 @@ for($j=0; $j < $gencount; $j++) {
<td align=center>{$general['crew']}</td>
<td align=center>{$general['train']}</td>
<td align=center>{$general['atmos']}</td>";
if($general['npc'] >= 2) {
if ($general['npc'] >= 2) {
echo "
<td>
<font size=3>NPC 장수";
@@ -170,7 +179,7 @@ for($j=0; $j < $gencount; $j++) {
<font size=1>";
$turn = getTurn($general, 1, 0);
for($i=0; $i < 5; $i++) {
for ($i=0; $i < 5; $i++) {
$turn[$i] = StringUtil::subStringForWidth($turn[$i], 0, 20);
$k = $i+1;
echo "
@@ -181,7 +190,7 @@ for($j=0; $j < $gencount; $j++) {
</font>
</td>
<td align=center>{$general['killturn']}</td>
<td align=center>".substr($general['turntime'],14,5)."</td>
<td align=center>".substr($general['turntime'], 14, 5)."</td>
</tr>";
}
echo "
+49 -35
View File
@@ -13,15 +13,15 @@ $connect=$db->get();
increaseRefresh("세력도시", 1);
$query = "select no,nation,level from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
if($me['level'] == 0) {
if ($me['level'] == 0) {
echo "재야입니다.";
exit();
}
if($type == 0) {
if ($type == 0) {
$type = 10;
}
$sel[$type] = "selected";
@@ -42,30 +42,30 @@ $sel[$type] = "selected";
<tr><td>세 력 도 시<br><?=backButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[1];?> value=1>기본</option>
<option <?=$sel[2];?> value=2>인구</option>
<option <?=$sel[3];?> value=3>인구율</option>
<option <?=$sel[4];?> value=4>민심</option>
<option <?=$sel[5];?> value=5>농업</option>
<option <?=$sel[6];?> value=6>상업</option>
<option <?=$sel[7];?> value=7>치안</option>
<option <?=$sel[8];?> value=8>수비</option>
<option <?=$sel[9];?> value=9>성벽</option>
<option <?=$sel[10];?> value=10>시세</option>
<option <?=$sel[11];?> value=11>지역</option>
<option <?=$sel[12];?> value=12>규모</option>
<option <?=$sel[1]?> value=1>기본</option>
<option <?=$sel[2]?> value=2>인구</option>
<option <?=$sel[3]?> value=3>인구율</option>
<option <?=$sel[4]?> value=4>민심</option>
<option <?=$sel[5]?> value=5>농업</option>
<option <?=$sel[6]?> value=6>상업</option>
<option <?=$sel[7]?> value=7>치안</option>
<option <?=$sel[8]?> value=8>수비</option>
<option <?=$sel[9]?> value=9>성벽</option>
<option <?=$sel[10]?> value=10>시세</option>
<option <?=$sel[11]?> value=11>지역</option>
<option <?=$sel[12]?> value=12>규모</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
</table>
<?php
$query = "select nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$nation = getNationStaticInfo($me['nation']); //국가정보
switch($type) {
switch ($type) {
case 1: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}'"; break;
case 2: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by pop desc"; break;
case 3: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by poprate desc"; break;
@@ -79,33 +79,35 @@ switch($type) {
case 11: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by region,level desc"; break;
case 12: $query = "select *,pop/pop2 as poprate from city where nation='{$me['nation']}' order by level desc, region"; break;
}
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$citycount = MYDB_num_rows($cityresult);
for($j=0; $j < $citycount; $j++) {
for ($j=0; $j < $citycount; $j++) {
$city = MYDB_fetch_array($cityresult);
if($city['city'] == $nation['capital']) { $city['name'] = "<font color=cyan>[{$city['name']}]</font>"; }
if ($city['city'] == $nation['capital']) {
$city['name'] = "<font color=cyan>[{$city['name']}]</font>";
}
$query = "select name from general where no='{$city['gen1']}'"; // 태수
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gen1 = MYDB_fetch_array($genresult);
$query = "select name from general where no='{$city['gen2']}'"; // 군사
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gen2 = MYDB_fetch_array($genresult);
$query = "select name from general where no='{$city['gen3']}'"; // 시중
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gen3 = MYDB_fetch_array($genresult);
if($type == 10 && $city['region'] != $region) {
if ($type == 10 && $city['region'] != $region) {
echo "<br>";
$region = $city['region'];
} elseif($type == 11 && $city['level'] != $level) {
} elseif ($type == 11 && $city['level'] != $level) {
echo "<br>";
$level = $city['level'];
}
if($city['trade'] == 0) {
if ($city['trade'] == 0) {
$city['trade'] = "- ";
}
@@ -136,24 +138,36 @@ for($j=0; $j < $citycount; $j++) {
<td align=center id=bg1>인구</td>
<td align=center>".round($city['pop']/$city['pop2']*100, 2)." %</td>
<td align=center id=bg1>태수</td>
<td align=center>";echo $gen1['name']==''?"-":"{$gen1['name']}";echo "</td>
<td align=center>";
echo $gen1['name']==''?"-":"{$gen1['name']}";
echo "</td>
<td align=center id=bg1>군사</td>
<td align=center>";echo $gen2['name']==''?"-":"{$gen2['name']}";echo "</td>
<td align=center>";
echo $gen2['name']==''?"-":"{$gen2['name']}";
echo "</td>
<td align=center id=bg1>시중</td>
<td align=center>";echo $gen3['name']==''?"-":"{$gen3['name']}";echo "</td>
<td align=center>";
echo $gen3['name']==''?"-":"{$gen3['name']}";
echo "</td>
</tr>
<tr>
<td align=center id=bg1>장수</td>
<td colspan=11>";
$query = "select npc,name from general where city='{$city['city']}' and nation='{$me['nation']}'"; // 장수 목록
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$gencount = MYDB_num_rows($genresult);
if($gencount == 0) echo "-";
for($i=0; $i < $gencount; $i++) {
if ($gencount == 0) {
echo "-";
}
for ($i=0; $i < $gencount; $i++) {
$general = MYDB_fetch_array($genresult);
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}, </font>"; }
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}, </font>"; }
else { echo "{$general['name']}, "; }
if ($general['npc'] >= 2) {
echo "<font color=cyan>{$general['name']}, </font>";
} elseif ($general['npc'] == 1) {
echo "<font color=skyblue>{$general['name']}, </font>";
} else {
echo "{$general['name']}, ";
}
}
echo "
</td>
+15 -15
View File
@@ -43,21 +43,21 @@ $sel[$type] = "selected";
<tr><td>세 력 장 수<br><?=backButton()?></td></tr>
<tr><td><form name=form1 method=post>정렬순서 :
<select name=type size=1>
<option <?=$sel[1];?> value=1>관직</option>
<option <?=$sel[2];?> value=2>계급</option>
<option <?=$sel[3];?> value=3>명성</option>
<option <?=$sel[4];?> value=4>통솔</option>
<option <?=$sel[5];?> value=5>무력</option>
<option <?=$sel[6];?> value=6>지력</option>
<option <?=$sel[7];?> value=7>자금</option>
<option <?=$sel[8];?> value=8>군량</option>
<option <?=$sel[9];?> value=9>병사</option>
<option <?=$sel[10];?> value=10>벌점</option>
<option <?=$sel[11];?> value=11>성격</option>
<option <?=$sel[12];?> value=12>내특</option>
<option <?=$sel[13];?> value=13>전특</option>
<option <?=$sel[14];?> value=14>사관</option>
<option <?=$sel[15];?> value=15>NPC</option>
<option <?=$sel[1]?> value=1>관직</option>
<option <?=$sel[2]?> value=2>계급</option>
<option <?=$sel[3]?> value=3>명성</option>
<option <?=$sel[4]?> value=4>통솔</option>
<option <?=$sel[5]?> value=5>무력</option>
<option <?=$sel[6]?> value=6>지력</option>
<option <?=$sel[7]?> value=7>자금</option>
<option <?=$sel[8]?> value=8>군량</option>
<option <?=$sel[9]?> value=9>병사</option>
<option <?=$sel[10]?> value=10>벌점</option>
<option <?=$sel[11]?> value=11>성격</option>
<option <?=$sel[12]?> value=12>내특</option>
<option <?=$sel[13]?> value=13>전특</option>
<option <?=$sel[14]?> value=14>사관</option>
<option <?=$sel[15]?> value=15>NPC</option>
</select>
<input type=submit value='정렬하기'></form>
</td></tr>
+3 -3
View File
@@ -86,11 +86,11 @@ function go(type) {
<input type=radio name=mode value=1 <?=$me['mode']==1?"checked":""; ?>>○(훈사60)
<input type=radio name=mode value=0 <?=$me['mode']==0?"checked":""; ?>>×
】<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type=<?=$submit;?> name=btn style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:160;height:30;font-size:13px; value=설정저장><br>
&nbsp;&nbsp;&nbsp;&nbsp;∞<font color=orange>설정저장은 이달중 <?=$me['myset'];?>회 남았습니다.</font><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type=<?=$submit?> name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160;height:30;font-size:13px; value=설정저장><br>
&nbsp;&nbsp;&nbsp;&nbsp;∞<font color=orange>설정저장은 이달중 <?=$me['myset']?>회 남았습니다.</font><br><br>
</form>
&nbsp;&nbsp;&nbsp;&nbsp;휴 가 신 청<br>
&nbsp;&nbsp;&nbsp;&nbsp;<input type=button style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:160;height:30;font-size:13px; value=휴가신청 onclick='go(0)'>
&nbsp;&nbsp;&nbsp;&nbsp;<input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160;height:30;font-size:13px; value=휴가신청 onclick='go(0)'>
</td>
</tr>
<tr>
+149 -82
View File
@@ -14,17 +14,20 @@ increaseRefresh("토너먼트", 1);
checkTurn();
$query = "select no,tournament,con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select conlimit,tournament,phase,tnmt_msg,tnmt_type,develcost,tnmt_trig from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
switch($admin['tnmt_type']) {
switch ($admin['tnmt_type']) {
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "tot"; $tp2 = "종합"; $tp3 = "total"; break;
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "ldr"; $tp2 = "통솔"; $tp3 = "leader"; break;
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "pwr"; $tp2 = "무력"; $tp3 = "power"; break;
@@ -34,7 +37,9 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "itl"; $tp2 = "
?>
<!DOCTYPE html>
<html>
<?php if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^"); } ?>
<?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
} ?>
<head>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<title>토너먼트</title>
@@ -44,9 +49,9 @@ table { font-family:'맑은 고딕'; line-height:110%; }
font { font-family:'맑은 고딕'; line-height:110%; }
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
select { font-family:'굴림'; line-height:100%; }
#bg0 { background-image:url(<?=$images;?>/back_walnut.jpg); }
#bg1 { background-image:url(<?=$images;?>/back_green.jpg); }
#bg2 { background-image:url(<?=$images;?>/back_blue.jpg); }
#bg0 { background-image:url(<?=$images?>/back_walnut.jpg); }
#bg1 { background-image:url(<?=$images?>/back_green.jpg); }
#bg2 { background-image:url(<?=$images?>/back_blue.jpg); }
</style>
</head>
@@ -57,14 +62,14 @@ select { font-family:'굴림'; line-height:100%; }
</table>
<table align=center border=1 cellspacing=0 cellpadding=0 bordercolordark=gray bordercolorlight=black style=font-size:13px;word-break:break-all; id=bg0>
<?php
if($session->userGrade >= 5) {
if ($session->userGrade >= 5) {
echo "
<form method=post action=c_tournament.php>
<tr><td colspan=8><input type=textarea size=150 style=color:white;background-color:black; name=msg><input type=submit name=btn value='메시지'></td></tr>
<tr><td colspan=8>
<input type=button value='갱신' onclick='location.reload()'>";
switch($admin['tnmt_trig']) {
switch ($admin['tnmt_trig']) {
case 0: $sel[0] = "selected"; break;
case 1: $sel[1] = "selected"; break;
case 2: $sel[2] = "selected"; break;
@@ -75,7 +80,7 @@ if($session->userGrade >= 5) {
case 7: $sel[7] = "selected"; break;
}
if($admin['tournament'] == 0) {
if ($admin['tournament'] == 0) {
echo "
<select name=auto size=1 style=color:white;background-color:black;>
<option style=color:white; value=0>수동진행</option>
@@ -106,25 +111,30 @@ if($session->userGrade >= 5) {
</select>
<input type=submit name=btn value='자동개최설정'>
<input type=submit name=btn value='포상'>
<input type=submit name=btn value='회수'>"; }
else {
<input type=submit name=btn value='회수'>";
} else {
echo "<input type=submit name=btn value='중단' onclick='return confirm(\"진짜 중단하시겠습니까?\")'>";
}
switch($admin['tournament']) {
switch ($admin['tournament']) {
case 1:
echo "<select name=gen size=1 style=color:white;background-color:black;>";
$query = "select no,name,npc,tnmt,leader,power,intel,leader+power+intel as total from general where tournament=0 and gold>='{$admin['develcost']}' order by {$tp3} desc";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$genCount = MYDB_num_rows($result);
for($i=0; $i < $genCount; $i++) {
for ($i=0; $i < $genCount; $i++) {
$general = MYDB_fetch_array($result);
if($general['npc'] >= 2) { $npc = "cyan"; }
elseif($general['npc'] == 1) { $npc = "skyblue"; }
elseif($general['tnmt'] > 0) { $npc = "blue"; }
else { $npc = "white"; }
if ($general['npc'] >= 2) {
$npc = "cyan";
} elseif ($general['npc'] == 1) {
$npc = "skyblue";
} elseif ($general['tnmt'] > 0) {
$npc = "blue";
} else {
$npc = "white";
}
echo "<option style=color:{$npc}; value={$general['no']}>[{$general[$tp3]}]{$general['name']}</option>";
}
echo "
@@ -155,7 +165,7 @@ if($session->userGrade >= 5) {
echo "
</td></tr>
</form>";
} elseif($me['no'] > 0 && $me['tournament'] == 0 && $admin['tournament'] == 1) {
} elseif ($me['no'] > 0 && $me['tournament'] == 0 && $admin['tournament'] == 1) {
echo "<form method=post action=c_tournament.php><tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'><input type=submit name=btn value='참가' onclick='return confirm(\"참가비 금{$admin['develcost']}이 필요합니다. 참가하시겠습니까?\")'></td></tr></form>";
} else {
echo "<tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'></td></tr>";
@@ -165,8 +175,8 @@ $str1 = getTournament($admin['tournament']);
$str2 = getTournamentTime();
$str3 = getTournamentTerm();
?>
<tr><td colspan=8>운영자 메세지 : <font color=orange size=5><?=$admin['tnmt_msg'];?></font></td></tr>
<tr><td colspan=8 align=center><font color=white size=6><?=$tnmt_type;?> (<?=$str1.", ".$str2.", ".$str3;?>)</font></td></tr>
<tr><td colspan=8>운영자 메세지 : <font color=orange size=5><?=$admin['tnmt_msg']?></font></td></tr>
<tr><td colspan=8 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.", ".$str2.", ".$str3?>)</font></td></tr>
<tr><td colspan=8 align=center id=bg2><font color=magenta size=5>16강 승자전</font></td></tr>
<tr><td height=10 colspan=8 align=center></td></tr>
<?php
@@ -178,12 +188,17 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=60 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 1; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 1; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
echo "<td colspan=16>{$general['name']}</td>";
}
@@ -192,18 +207,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=50 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 1; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 2; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 1; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 2; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 1; $i++) {
for ($i=0; $i < 1; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"."</font>";
@@ -213,7 +239,7 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 2; $i++) {
for ($i=0; $i < 2; $i++) {
echo "<td colspan=8>{$gen[$i]}</td>";
}
@@ -222,18 +248,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=40 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 2; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 4; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 2; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 4; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 2; $i++) {
for ($i=0; $i < 2; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━┓"."</font>";
@@ -243,7 +280,7 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 4; $i++) {
for ($i=0; $i < 4; $i++) {
echo "<td colspan=4>{$gen[$i]}</td>";
}
@@ -252,18 +289,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=30 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 4; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 8; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 4; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 8; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 4; $i++) {
for ($i=0; $i < 4; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━┓"."</font>";
@@ -273,7 +321,7 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 8; $i++) {
for ($i=0; $i < 8; $i++) {
echo "<td colspan=2>{$gen[$i]}</td>";
}
@@ -282,18 +330,29 @@ echo "
<tr align=center>";
$query = "select npc,name,win from tournament where grp>=20 order by grp, grp_no";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($i=0; $i < 8; $i++) { $cent[$i] = "<font color=white>"; }
for($i=0; $i < 16; $i++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($i=0; $i < 8; $i++) {
$cent[$i] = "<font color=white>";
}
for ($i=0; $i < 16; $i++) {
$general = MYDB_fetch_array($result);
if($general['name'] == "") { $general['name'] = "-"; }
if($general['npc'] >= 2) { $general['name'] = "<font color=cyan>".$general['name']."</font>"; }
elseif($general['npc'] == 1) { $general['name'] = "<font color=skyblue>".$general['name']."</font>"; }
if($general['win'] > 0) { $line[$i] = "<font color=red>"; $cent[floor($i/2)] = "<font color=red>"; }
else { $line[$i] = "<font color=white>"; }
if ($general['name'] == "") {
$general['name'] = "-";
}
if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>";
} elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>";
}
if ($general['win'] > 0) {
$line[$i] = "<font color=red>";
$cent[floor($i/2)] = "<font color=red>";
} else {
$line[$i] = "<font color=white>";
}
$gen[$i] = $general['name'];
}
for($i=0; $i < 8; $i++) {
for ($i=0; $i < 8; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>";
$line[$i*2] = $line[$i*2]."┏━━━━"."</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━┓"."</font>";
@@ -303,7 +362,7 @@ echo "
</tr>
<tr align=center>";
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "<td width=125>{$gen[$i]}</td>";
}
@@ -311,17 +370,19 @@ echo"
</tr>";
$query = "select tournament,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$betting = MYDB_fetch_array($result);
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
$bet[$i] = @round($betting['bet'] / $betting["bet{$i}"], 2);
if($bet[$i] == 0) { $bet[$i] = "∞"; }
if ($bet[$i] == 0) {
$bet[$i] = "∞";
}
}
echo "
<tr align=center>";
for($i=0; $i < 16; $i++) {
for ($i=0; $i < 16; $i++) {
echo "<td><font color=skyblue>{$bet[$i]}</font></td>";
}
@@ -333,15 +394,17 @@ echo "
</td>
</tr>";
if($admin['tournament'] >= 7 || $admin['tournament'] == 0) { printFighting($admin['tournament'], $admin['phase']); }
if ($admin['tournament'] >= 7 || $admin['tournament'] == 0) {
printFighting($admin['tournament'], $admin['phase']);
}
echo "
<tr><td height=10 colspan=8 align=center></td></tr>
<tr><td colspan=8 align=center id=bg2><font color=orange size=5>조별 본선 순위</font></td></tr>
<tr>";
$num = Array("一", "二", "三", "四", "五", "六", "七", "八");
$num = array("一", "二", "三", "四", "五", "六", "七", "八");
for($i=0; $i < 8; $i++) {
for ($i=0; $i < 8; $i++) {
$grp = $i + 10;
echo "
<td>
@@ -350,8 +413,8 @@ for($i=0; $i < 8; $i++) {
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
$query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($k=1; $k <= 4; $k++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($k=1; $k <= 4; $k++) {
$general = MYDB_fetch_array($result);
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
}
@@ -360,12 +423,14 @@ for($i=0; $i < 8; $i++) {
</td>";
}
echo "</tr>";
if($admin['tournament'] == 4 || $admin['tournament'] == 5) { printFighting($admin['tournament'], $admin['phase']); }
if ($admin['tournament'] == 4 || $admin['tournament'] == 5) {
printFighting($admin['tournament'], $admin['phase']);
}
echo "
<tr><td colspan=8 align=center id=bg2><font color=yellow size=5>조별 예선 순위</font></td></tr>
<tr>";
for($i=0; $i < 8; $i++) {
for ($i=0; $i < 8; $i++) {
$grp = $i;
echo "
<td>
@@ -374,8 +439,8 @@ for($i=0; $i < 8; $i++) {
<tr id=bg1><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
$query = "select npc,name,ldr,pwr,itl,ldr+pwr+itl as tot,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp='$grp' order by gd desc, gl desc, seq";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
for($k=1; $k <= 8; $k++) {
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
for ($k=1; $k <= 8; $k++) {
$general = MYDB_fetch_array($result);
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
}
@@ -384,7 +449,9 @@ for($i=0; $i < 8; $i++) {
</td>";
}
if($admin['tournament'] == 2 || $admin['tournament'] == 3) { printFighting($admin['tournament'], $admin['phase']); }
if ($admin['tournament'] == 2 || $admin['tournament'] == 3) {
printFighting($admin['tournament'], $admin['phase']);
}
?>
</tr>
+69 -35
View File
@@ -12,7 +12,7 @@ increaseRefresh("메인", 1);
$db = DB::db();
$connect=$db->get();
if(!$userID){
if (!$userID) {
header('Location:..');
die();
}
@@ -26,19 +26,19 @@ $me = $db->queryFirstRow(
checkTurn();
//그새 사망이면
if($me === null) {
if ($me === null) {
$session->logoutGame();
header('Location: ../');
die();
}
if(!$session->generalID){
if (!$session->generalID) {
$session = Session::requireGameLogin();
}
$session->setReadOnly();
$userID = Session::getUserID();
if($me['newmsg'] == 1 || $me['newvote'] == 1) {
if ($me['newmsg'] == 1 || $me['newvote'] == 1) {
$db->update('general', [
'newmsg'=>0,
'newvote'=>0
@@ -46,15 +46,18 @@ if($me['newmsg'] == 1 || $me['newvote'] == 1) {
}
$query = "select develcost,online,conlimit,tournament,tnmt_type,turnterm,scenario,scenario_text,extended_general,fiction,npcmode,vote from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select plock from plock limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$plock = MYDB_fetch_array($result);
$con = checkLimit($me['con'], $admin['conlimit']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
$scenario = $admin['scenario_text'];
?>
@@ -89,18 +92,30 @@ $(function(){
<table align=center width=1000 border=1 cellspacing=0 cellpadding=0 style=font-size:13px;word-break:break-all; id=bg0>
<tr><td colspan=5><?=allButton()?></td></tr>
<tr height=50>
<td colspan=5 align=center><font size=4>삼국지 모의전투 PHP 유기체서버 (<font color=cyan><?=$scenario;?></font>)</font></td>
<td colspan=5 align=center><font size=4>삼국지 모의전투 PHP 유기체서버 (<font color=cyan><?=$scenario?></font>)</font></td>
</tr>
<?php
$valid = 0;
if($admin['extended_general'] == 0) { $extend = "표준"; }
else { $extend = "확장"; $valid = 1; }
if($admin['fiction'] == 0) { $fiction = "사실"; }
else { $fiction = "가상"; $valid = 1; }
if($admin['npcmode'] == 0) { $npcmode = "불가능"; }
else { $npcmode = "가능"; $valid = 1; }
if ($admin['extended_general'] == 0) {
$extend = "표준";
} else {
$extend = "확장";
$valid = 1;
}
if ($admin['fiction'] == 0) {
$fiction = "사실";
} else {
$fiction = "가상";
$valid = 1;
}
if ($admin['npcmode'] == 0) {
$npcmode = "불가능";
} else {
$npcmode = "가능";
$valid = 1;
}
$color = "cyan";
if($valid == 1) {
if ($valid == 1) {
echo "
<tr height=30>
<td width=398 colspan=2 align=center><font color={$color}>{$scenario}</font></td>
@@ -113,22 +128,25 @@ if($valid == 1) {
<tr height=30>
<td width=198 align=center><?php info(2); ?></td>
<td width=198 align=center>전체 접속자 수 : <?=$admin['online'];?> 명</td>
<td width=198 align=center>턴당 갱신횟수 : <?=$admin['conlimit'];?>회</td>
<td width=198 align=center>전체 접속자 수 : <?=$admin['online']?> 명</td>
<td width=198 align=center>턴당 갱신횟수 : <?=$admin['conlimit']?>회</td>
<td width=398 colspan=2 align=center><?php info(3); ?></td>
</tr>
<tr height=30>
<td align=center>
<?php
if($plock['plock'] == 0) { echo "<marquee scrollamount=2><font color=cyan>서버 가동중</font></marquee>"; }
else { echo "<font color=magenta>서버 동중</font>"; }
if ($plock['plock'] == 0) {
echo "<marquee scrollamount=2><font color=cyan>서버 동중</font></marquee>";
} else {
echo "<font color=magenta>서버 동결중</font>";
}
echo "
</td>
<td align=center>
";
switch($admin['tnmt_type']) {
switch ($admin['tnmt_type']) {
case 0: $str = "전력전"; break;
case 1: $str = "통솔전"; break;
case 2: $str = "일기토"; break;
@@ -136,8 +154,11 @@ case 3: $str = "설전"; break;
}
$str2 = getTournament($admin['tournament']);
$str3 = getTournamentTime();
if($admin['tournament'] == 0) { echo "<font color=magenta>현재 토너먼트 경기 없음</font>"; }
else { echo "<marquee scrollamount=2>↑<font color=cyan>{$str}</font> {$str2} {$str3}↑</marquee>"; }
if ($admin['tournament'] == 0) {
echo "<font color=magenta>현재 토너먼트 경기 없음</font>";
} else {
echo "<marquee scrollamount=2>↑<font color=cyan>{$str}</font> {$str2} {$str3}↑</marquee>";
}
echo "
</td>
@@ -145,10 +166,13 @@ echo "
";
$query = "select no from auction";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$auctionCount = MYDB_num_rows($result);
if($auctionCount > 0) { echo "<marquee scrollamount=2><font color=cyan>{$auctionCount}건</font> 거래 진행중</marquee>"; }
else { echo "<font color=magenta>진행중 거래 없음</font>"; }
if ($auctionCount > 0) {
echo "<marquee scrollamount=2><font color=cyan>{$auctionCount}건</font> 거래 진행중</marquee>";
} else {
echo "<font color=magenta>진행중 거래 없음</font>";
}
echo "
</td>
@@ -157,20 +181,23 @@ echo "
$vote = explode("|", $admin['vote']);
$vote[0] = Tag2Code($vote[0]);
if($vote[0] == "") { echo "<font color=magenta>진행중 설문 없음</font>"; }
else { echo "<marquee scrollamount=3><font color=cyan>설문 진행중</font> : $vote[0]</marquee>"; }
if ($vote[0] == "") {
echo "<font color=magenta>진행중 설문 없음</font>";
} else {
echo "<marquee scrollamount=3><font color=cyan>설문 진행중</font> : $vote[0]</marquee>";
}
echo "
</td>
</tr>";
?>
<tr><td colspan=5>접속중인 국가: <?=onlinenation();?></td></tr>
<tr><td colspan=5>접속중인 국가: <?=onlinenation()?></td></tr>
<tr><td colspan=5><?php adminMsg(); ?></td></tr>
<tr><td colspan=5>【 국가방침 】<?php nationMsg(); ?></td></tr>
<tr><td colspan=5>【 접속자 】<?=onlinegen();?></td></tr>
<tr><td colspan=5>【 접속자 】<?=onlinegen()?></td></tr>
<?php
if($session->userGrade >= 5) {
if ($session->userGrade >= 5) {
echo "
<tr><td colspan=5>
<input type=button value=게임관리 onclick=location.replace('_admin1.php')>
@@ -217,13 +244,13 @@ if($session->userGrade >= 5) {
<option value=10>10턴</option>
<option value=11>11턴</option>
<option value=12>12턴</option>
</select><input type=button style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:50;font-size:13px; value='반복' onclick='refreshing(this, 2,0)'><input type=button style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:80;font-size:13px; value='▼미루기' onclick='refreshing(this, 2,1)'><input type=button style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:80;font-size:13px; value='▲당기기' onclick='refreshing(this, 2,2)'>
</select><input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:50;font-size:13px; value='반복' onclick='refreshing(this, 2,0)'><input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:80;font-size:13px; value='▼미루기' onclick='refreshing(this, 2,1)'><input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:80;font-size:13px; value='▲당기기' onclick='refreshing(this, 2,2)'>
</td>
</tr>
<tr>
<td width=646 align=right>
<?php commandTable(); ?>
<input type=button style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:110;font-size:13px; value='실 행' onclick='refreshing(this, 3,form2)'><input type=button style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:110;font-size:13px; value='갱 신' onclick='refreshing(this, 0,0)'><input type=button style=background-color:<?=GameConst::$basecolor2;?>;color:white;width:160;font-size:13px; value='로그아웃' onclick=location.replace('logout_process.php')><br>
<input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:110;font-size:13px; value='실 행' onclick='refreshing(this, 3,form2)'><input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:110;font-size:13px; value='갱 신' onclick='refreshing(this, 0,0)'><input type=button style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160;font-size:13px; value='로그아웃' onclick=location.replace('logout_process.php')><br>
</td>
</tr>
</form>
@@ -296,9 +323,16 @@ echo banner();
<?php PrintElapsedTime(); ?>
</div>
<?php
if($con == 1) { MessageBox("접속제한이 얼마 남지 않았습니다!"); }
if($me['newmsg'] == 1) { MessageBox("개인 서신이 도착했습니다!"); }
if($me['newvote'] == 1) { $develcost = $admin['develcost']*5; MessageBox("설문조사에 참여하시면 금{$develcost}과 유니크템을 드립니다! (우측 상단 설문조사 메뉴)"); }
if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다!");
}
if ($me['newmsg'] == 1) {
MessageBox("개인 서신이 도착했습니다!");
}
if ($me['newvote'] == 1) {
$develcost = $admin['develcost']*5;
MessageBox("설문조사에 참여하시면 금{$develcost}과 유니크템을 드립니다! (우측 상단 설문조사 메뉴)");
}
?>
</body>
</html>
+13 -13
View File
@@ -7,7 +7,7 @@ include "func.php";
$session = Session::requireLogin()->setReadOnly();
$userID = Session::getUserID();
if(!$userID) {
if (!$userID) {
MessageBox("잘못된 접근입니다!!!");
echo "<script>history.go(-1);</script>";
exit(1);
@@ -16,7 +16,7 @@ if(!$userID) {
//회원 테이블에서 정보확인
$member = RootDB::db()->queryFirstRow("select no,name,picture,imgsvr,grade from MEMBER where no= %i", $userID);
if(!$member) {
if (!$member) {
MessageBox("잘못된 접근입니다!!!");
echo "<script>history.go(-1);</script>";
exit(1);
@@ -32,7 +32,7 @@ $connect=$db->get();
<title>장수생성</title>
<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=utf-8'>
<link rel='stylesheet' href="css/common.css">
<script type="text/javascript" src=<?="../e_lib/jquery-3.2.1.min.js";?>></script>
<script type="text/javascript" src="../e_lib/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
jQuery(function($){
@@ -186,14 +186,14 @@ window.abilityPowint = abilityPowint;
</table>
<?php
$query = "select show_img_level,maxgeneral from game limit 1";
$result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select no from general where npc<2";
$result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),"");
$result = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect), "");
$gencount = MYDB_num_rows($result);
if($gencount >= $admin['maxgeneral']) {
if ($gencount >= $admin['maxgeneral']) {
echo "<script>alert('더 이상 등록할 수 없습니다.');</script>";
echo "<script>history.go(-1);</script>";
exit();
@@ -204,12 +204,12 @@ if($gencount >= $admin['maxgeneral']) {
<tr><td align=center colspan=2 id=bg1>임관 권유 메세지</td></tr>
<?php
$query = "select name,scoutmsg,color from nation";
$nationresult = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect),"");
$nationresult = MYDB_query($query, $connect) or Error("join ".MYDB_error($connect), "");
$nationcount = MYDB_num_rows($nationresult);
for($i=0; $i < $nationcount; $i++) {
for ($i=0; $i < $nationcount; $i++) {
$nation = MYDB_fetch_array($nationresult);
if($nation['scoutmsg'] == "") {
if ($nation['scoutmsg'] == "") {
echo "
<tr><td align=center width=98 style=color:".newColor($nation['color']).";background-color:{$nation['color']}>{$nation['name']}</td><td width=898 style=color:{newColor({$nation['color']})};background-color:{$nation['color']}>-</td></tr>";
} else {
@@ -232,7 +232,7 @@ for($i=0; $i < $nationcount; $i++) {
</td>
</tr>
<?php
if($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "") {
if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture'] != "") {
$imageTemp = GetImageURL($member['imgsvr']);
echo "
<tr>
@@ -275,15 +275,15 @@ if($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
</tr>
<tr>
<td width=498 align=right id=bg1>통솔</td>
<td colspan=2><input type="text" name="leader" id="leader" value="<?=$abil['leader'];?>"></td>
<td colspan=2><input type="text" name="leader" id="leader" value="<?=$abil['leader']?>"></td>
</tr>
<tr>
<td width=498 align=right id=bg1>무력</td>
<td colspan=2><input type="text" name="power" id="power" value="<?=$abil['power'];?>"></td>
<td colspan=2><input type="text" name="power" id="power" value="<?=$abil['power']?>"></td>
</tr>
<tr>
<td width=498 align=right id=bg1>지력</td>
<td colspan=2><input type="text" name="intel" id="intel" value="<?=$abil['intel'];?>"></td>
<td colspan=2><input type="text" name="intel" id="intel" value="<?=$abil['intel']?>"></td>
</tr>
<tr>
<td width=498 align=right id=bg1>능력치 조정</td>
+3 -3
View File
@@ -88,7 +88,7 @@ if($admin['show_img_level'] >= 3) {
?>
<tr>
<td width=498 align=right rowspan=2 height=64 id=bg1>장수</td>
<td width=498><img src=<?=$image;?>/1001.jpg border=0 name=picture width=64 height=64></td>
<td width=498><img src=<?=$image?>/1001.jpg border=0 name=picture width=64 height=64></td>
</tr>
<?php
}
@@ -130,10 +130,10 @@ for($i=0; $i < $count; $i++) {
</body>
<script type="text/javascript">
function changeGen() {
sel = Math.floor(Math.random() * <?=$count;?>);
sel = Math.floor(Math.random() * <?=$count?>);
document.form1.face.selectedIndex = sel;
num = document.form1.face.value;
document.form1.picture.src="<?=$image;?>" + "/"+ num +".jpg";
document.form1.picture.src="<?=$image?>" + "/"+ num +".jpg";
}
function selectGen() {