[php5_debug] 미점령 지역인 경우에 대한 지도 출력 로직 개선
This commit is contained in:
+15
-4
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
include "lib.php";
|
include "lib.php";
|
||||||
|
$graphic = 0;
|
||||||
|
$type=0;
|
||||||
if($graphic == 2) {
|
if($graphic == 2) {
|
||||||
echo "
|
echo "
|
||||||
<body bgcolor=black leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 oncontextmenu='return false' onselectstart='return false' ondragstart='return false'>
|
<body bgcolor=black leftmargin=0 marginwidth=0 topmargin=0 marginheight=0 oncontextmenu='return false' onselectstart='return false' ondragstart='return false'>
|
||||||
@@ -232,14 +233,24 @@ function showMap($connect, $type, $graphic) {
|
|||||||
210, 285, 275, 75, 160, 180, 255, 295, 315, 30, 325, 350, 260, 435
|
210, 285, 275, 75, 160, 180, 255, 295, 315, 30, 325, 350, 260, 435
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$nationname = array();
|
||||||
|
$nationcolor = array();
|
||||||
|
$nationCapital = array();
|
||||||
|
|
||||||
$query = "select name,level,nation,city,state,region,supply from city";
|
$query = "select name,level,nation,city,state,region,supply from city";
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||||
for($i=0; $i < $allcount; $i++) {
|
for($i=0; $i < $allcount; $i++) {
|
||||||
$city = MYDB_fetch_array($result);
|
$city = MYDB_fetch_array($result);
|
||||||
$name = $city['name'];
|
$name = $city['name'];
|
||||||
$nation = $nationname[$city['nation']];
|
if($city['nation']!=0){
|
||||||
$color = $nationcolor[$city['nation']];
|
$nation = $nationname[$city['nation']];
|
||||||
$capital = $nationCapital[$city['nation']];
|
$color = $nationcolor[$city['nation']];
|
||||||
|
$capital = $nationCapital[$city['nation']];
|
||||||
|
}else{
|
||||||
|
$nation = "";
|
||||||
|
$color = "FFFFFF";
|
||||||
|
$capital = "";
|
||||||
|
}
|
||||||
$level = $city['level'];
|
$level = $city['level'];
|
||||||
$state = $city['state'];
|
$state = $city['state'];
|
||||||
$region = $city['region'];
|
$region = $city['region'];
|
||||||
|
|||||||
Reference in New Issue
Block a user