diff --git a/twe/css/map.css b/twe/css/map.css index 10ed27c5..d2a7348f 100644 --- a/twe/css/map.css +++ b/twe/css/map.css @@ -1,4 +1,5 @@ .world_map{ + width:700px; background:black; font-size:13px; color:white; diff --git a/twe/map.php b/twe/map.php deleted file mode 100644 index c62abb74..00000000 --- a/twe/map.php +++ /dev/null @@ -1,448 +0,0 @@ - - -지 도 생 략
-(개인설정 또는 과부하로 인한 서버의 긴급모드) -
- -"; - exit(); -} -$connect=dbConn(); -// -?> - - - -지도 - - - - - - - - - - - -"; - $ad = "background={$images}/ad.gif"; - $season = "background={$images}/{$season}.gif"; - $rtitle = ""; - } else { - $ltitle = " "; - $ad = ""; - $season = ""; - $rtitle = "" ";"; - } - echo " - - - - - - - - - - - -
{$ltitle} {$admin['year']}年 {$admin['month']}月{$rtitle}
-
"; - - $query = "select nation,name,color,capital from nation"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $count = MYDB_num_rows($result); - - $nationname = array(); - $nationcolor = array(); - $nationCapital = array(); - - for($i=1; $i <= $count; $i++) { - $nation = MYDB_fetch_array($result); - $nationcolor[$nation['nation']] = $nation['color']; - $nationname[$nation['nation']] = $nation['name']; - $nationCapital[$nation['nation']] = $nation['capital']; - } - - if($type == 0) { - // 운영자의 경우 다 볼 수 있음 - if($me['userlevel'] >= 5) { - for($i=1; $i <= $allcount; $i++) { - $valid[$i] = 1; - } - } elseif($me['level'] == 0) { - // 재야는 내 도시만 - $query = "select city,name,nation from city where city='{$me['city']}'"; - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $cityvalid = MYDB_fetch_array($cityresult); - $valid[$cityvalid['city']] = 1; - } else { - // 아국 도시 - $query = "select city,name from city where nation='{$me['nation']}'"; - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - for($i=0; $i < $citycount; $i++) { - $cityvalid = MYDB_fetch_array($cityresult); - $valid[$cityvalid['city']] = 1; - } - // 아국 장수가 있는 타국 도시들 선택 - $query = "select distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation='{$me['nation']}' and B.nation!='{$me['nation']}'"; - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - for($i=0; $i < $citycount; $i++) { - $cityvalid = MYDB_fetch_array($cityresult); - $valid[$cityvalid['city']] = 1; - } - // 첩보된 도시 - $citys = explode("|", $myNation['spy']); - for($i=0; $i < count($citys); $i++) { - $valid[floor($citys[$i]/10)] = 1; - } - } - } - - $x = array( -// 업 허창 낙양 장안 성도 양양 건업 북평 남피 완 수춘 서주 강릉 장사 시상 위례 - 345, 330, 275, 145, 25, 255, 505, 465, 395, 270, 395, 440, 245, 255, 360, 620, -// 계 복양 진류 여남 하비 서량 하내 한중 상용 덕양 강주 건녕 남해 계양 오 평양 - 365, 410, 365, 330, 480, 25, 230, 135, 185, 85, 70, 80, 245, 230, 510, 590, -// 사비 계림 진양 평원 북해 초 패 천수 안정 홍농 하변 자동 영안 귀양 주시 운남 - 605, 655, 295, 440, 470, 365, 430, 70, 95, 210, 45, 75, 115, 90, 30, 30, -// 남영 교지 신야 강하 무릉 영릉 상동 여강 회계 고창 대 안평 졸본 이도 강 저 - 135, 130, 250, 315, 195, 190, 210, 380, 480, 350, 450, 530, 570, 680, 95, 25, -// 흉노 남만 산월 오환 왜 호관 호로 사곡 함곡 사수 양평 가맹 역경 계교 동황 관도 - 180, 80, 425, 610, 680, 285, 285, 240, 180, 310, 90, 45, 410, 405, 515, 340, -// 정도 합비 광릉 적도 가정 기산 면죽 이릉 장판 백랑 적벽 파양 탐라 유구 - 400, 435, 490, 130, 40, 110, 35, 215, 280, 530, 330, 430, 605, 625 - ); - - $y = array( -// 업 허창 낙양 장안 성도 양양 건업 북평 남피 완 수춘 서주 강릉 장사 시상 위례 - 130, 215, 180, 165, 290, 290, 305, 65, 95, 235, 270, 250, 335, 375, 360, 145, -// 계 복양 진류 여남 하비 서량 하내 한중 상용 덕양 강주 건녕 남해 계양 오 평양 - 35, 170, 185, 260, 235, 50, 150, 205, 225, 275, 310, 400, 480, 400, 345, 100, -// 사비 계림 진양 평원 북해 초 패 천수 안정 홍농 하변 자동 영안 귀양 주시 운남 - 205, 200, 60, 115, 155, 230, 220, 105, 145, 175, 190, 245, 295, 360, 345, 415, -// 남영 교지 신야 강하 무릉 영릉 상동 여강 회계 고창 대 안평 졸본 이도 강 저 - 405, 480, 260, 295, 355, 395, 435, 315, 395, 405, 480, 80, 65, 260, 35, 120, -// 흉노 남만 산월 오환 왜 호관 호로 사곡 함곡 사수 양평 가맹 역경 계교 동황 관도 - 95, 455, 430, 20, 320, 140, 205, 175, 175, 185, 220, 225, 65, 135, 145, 165, -// 정도 합비 광릉 적도 가정 기산 면죽 이릉 장판 백랑 적벽 파양 탐라 유구 - 210, 285, 275, 75, 160, 180, 255, 295, 315, 30, 325, 350, 260, 435 - ); - - - - $query = "select name,level,nation,city,state,region,supply from city"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - for($i=0; $i < $allcount; $i++) { - $city = MYDB_fetch_array($result); - $name = $city['name']; - if($city['nation']!=0){ - $nation = $nationname[$city['nation']]; - $color = $nationcolor[$city['nation']]; - $capital = $nationCapital[$city['nation']]; - }else{ - $nation = ""; - $color = "FFFFFF"; - $capital = ""; - } - $level = $city['level']; - $state = $city['state']; - $region = $city['region']; - - if($me['city'] == $city['city']) { $myCity = 1; } - else { $myCity = 0; } - - if($capital == $city['city']) { $cap = 1; } - else { $cap = 0; } - - city($graphic, $brouserIE, - $type, $name, $nation, $color, $level, $region, $i+1, isset($valid[$i+1])?$valid[$i+1]:0 , $x[$i], $y[$i], - $state, $myCity, $city['supply'], $cap); - } - - echo " -
-
-"; -} - -function city($graphic, $brouser, $type, $name, $nation, $color, $level, $region, $city, $valid, $x, $y, $state, $mycity, $supply, $capital) { - global $images; - - if($graphic == 0) { - switch($level) { - case 1: $width = 16; $height = 15; break; - case 2: $width = 20; $height = 14; break; - case 3: $width = 14; $height = 14; break; - case 4: $width = 20; $height = 15; break; - case 5: $width = 24; $height = 16; break; - case 6: $width = 26; $height = 18; break; - case 7: $width = 28; $height = 20; break; - case 8: $width = 32; $height = 24; break; - } - } else { - switch($level) { - case 1: $width = 12; $height = 12; break; - case 2: $width = 12; $height = 12; break; - case 3: $width = 14; $height = 14; break; - case 4: $width = 16; $height = 14; break; - case 5: $width = 18; $height = 16; break; - case 6: $width = 20; $height = 16; break; - case 7: $width = 22; $height = 18; break; - case 8: $width = 24; $height = 18; break; - } - } - $x -= floor($width / 2); - $y -= floor($height / 2); - - $backwidth = floor($width * 3.0); $backheight = floor($height * 3.0); - - $backx = $x - floor(($backwidth - $width)/2); - $backy = $y - floor(($backheight - $height)/2); - $fx = $x + $width - 6; - $fy = $y - 3; - $cx = $x + $width - 4; - $cy = $y - 2; - $ex = $x - 5; - $ey = $y; - - // 0 명령화면의 지도(본국 장수 있는 도시 링크), - // 1 전쟁,이동,계략시 지도(전도시 클릭되게), - // 2 사령부 태수임명(본국만 클릭되게) - - // 0인 경우 현재도시 링크 생성 - if($type == 0 && $valid == 1) { echo "
"; } - //메인화면 - if($graphic == 0) { - if($type == 0 && $valid == 1) { - $tag = "input type=image"; - $tail = "><{$tag} {$mid} {$tail}>"; - //재난표시 - if($state > 0) { - $mid2 = "src={$images}/event{$state}.gif style=width:15;height:15; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; - echo "
<{$tag} {$mid2} {$tail}>
"; - } - } else { - //메인화면 - if($type == 0 && $valid == 1) { - $tail = " onclick='form{$city}.submit()'>"; - //재난표시 - if($state > 0) { - if($state < 10) { $color3 = "blue"; } - elseif($state < 40) { $color3 = "orange"; } - elseif($state < 50) { $color3 = "red"; } - $mid2 = "width:10;height:10;background-color:{$color3}; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; - echo "
"; - } - } - //공백지 아니면 - if($color != "") { - if($graphic == 0) { - //배경국가색 - if($brouser == 1) { - echo "
"; - } else { - echo " -
- -
"; - } - //깃발표시 - if($supply == 1) { $mid3 = "src={$images}/f{$color}.gif style=width:12;height:12; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; } - else { $mid3 = "src={$images}/d{$color}.gif style=width:12;height:12; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; } - echo "
<{$tag} {$mid3} {$tail}>
"; - //수도표시 - if($capital == 1) { - $mid4 = "src={$images}/event51.gif style=width:10;height:10; onmousemove='showLayer(this,\"".getCityLevel($region, $level)."$name\",\"$nation\", event)' onmouseout='hideLayer()'"; - echo "
<{$tag} {$mid4} {$tail}>
"; - } - } else { - //수도표시 - if($capital == 1) { - echo "
"; - } - } - } - // 0인 경우 현재도시 링크 생성했던거 종료 - if($type == 0 && $valid == 1) { - echo "
"; - } - - // 내 도시인 경우 빨간 네모 그리기 - if($mycity == 1) { - $width += 8; - $height += 8; - $x -= 4; - $y -= 4; - - echo " -
- - -
-
"; - } -} - -function getCityLevel($region, $level) { - switch($region) { - case 1: $str = "【하북|"; break; - case 2: $str = "【중원|"; break; - case 3: $str = "【서북|"; break; - case 4: $str = "【서촉|"; break; - case 5: $str = "【남중|"; break; - case 6: $str = "【 초|"; break; - case 7: $str = "【오월|"; break; - case 8: $str = "【동이|"; break; - } - - switch($level) { - case 1: $str .= "수】"; break; - case 2: $str .= "진】"; break; - case 3: $str .= "관】"; break; - case 4: $str .= "이】"; break; - case 5: $str .= "소】"; break; - case 6: $str .= "중】"; break; - case 7: $str .= "대】"; break; - case 8: $str .= "특】"; break; - } - - return $str; -} - diff --git a/twe/processing.php b/twe/processing.php index fc495974..999d4a9f 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -131,6 +131,7 @@ $(function(){ neutralView:true, selectCallback:function(city){ $target.val(city.id); + return false; } }); });