From e87fff35eec45526b746db1abfae1cc483109369 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 29 Mar 2018 22:32:23 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8A=A4=ED=82=A8=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/_admin5.php | 6 +-- twe/_admin7.php | 14 ++--- twe/_admin8.php | 4 -- twe/a_history.php | 6 +-- twe/a_status.php | 6 +-- twe/a_traffic.php | 2 +- twe/b_auction.php | 9 +--- twe/b_battleCenter.php | 14 ++--- twe/b_chiefboard.php | 6 +-- twe/b_chiefcenter.php | 2 +- twe/b_currentCity.php | 8 +-- twe/b_dipcenter.php | 6 +-- twe/b_diplomacy.php | 6 +-- twe/b_genList.php | 6 +-- twe/b_myBossInfo.php | 6 +-- twe/b_myCityInfo.php | 6 +-- twe/b_myGenInfo.php | 8 +-- twe/b_myKingdomInfo.php | 4 +- twe/b_myPage.php | 37 +++---------- twe/b_nationboard.php | 6 +-- twe/b_troop.php | 6 +-- twe/func.php | 113 ++++++++++++++++++---------------------- twe/func_legacy.php | 24 ++++----- twe/func_message.php | 21 +++----- twe/func_template.php | 2 +- twe/index.php | 20 +++---- twe/select_npc_post.php | 1 - twe/sql/schema.sql | 1 - 28 files changed, 120 insertions(+), 230 deletions(-) diff --git a/twe/_admin5.php b/twe/_admin5.php index 36d1af97..c7994353 100644 --- a/twe/_admin5.php +++ b/twe/_admin5.php @@ -7,10 +7,6 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select skin from general where owner='{$_SESSION['userID']}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); - if(Session::getUserGrade() < 5) { echo " @@ -254,7 +250,7 @@ for($i=0; $i < $nationCount; $i++) { ?> - +
diff --git a/twe/_admin7.php b/twe/_admin7.php index af7d6c3c..547e8690 100644 --- a/twe/_admin7.php +++ b/twe/_admin7.php @@ -7,10 +7,6 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select skin from general where owner='{$_SESSION['userID']}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); - if(Session::getUserGrade() < 5) { echo " @@ -98,7 +94,7 @@ for($i=0; $i < $gencount; $i++) { @@ -109,10 +105,10 @@ for($i=0; $i < $gencount; $i++) { @@ -121,10 +117,10 @@ for($i=0; $i < $gencount; $i++) {
- +  
- + - +
- + - +
diff --git a/twe/_admin8.php b/twe/_admin8.php index eadd878e..330b9933 100644 --- a/twe/_admin8.php +++ b/twe/_admin8.php @@ -7,10 +7,6 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select skin from general where owner='{$_SESSION['userID']}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); - if(Session::getUserGrade() < 5) { echo " diff --git a/twe/a_history.php b/twe/a_history.php index 2d52dc1a..fc583f06 100644 --- a/twe/a_history.php +++ b/twe/a_history.php @@ -13,7 +13,7 @@ $query = "select startyear,year,month,conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,map,con,turntime from general where owner='{$_SESSION['userID']}'"; +$query = "select map,con,turntime from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -55,10 +55,6 @@ if($month <= 0) { $month += 12; } -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/a_status.php b/twe/a_status.php index 23ee2733..e09b9a22 100644 --- a/twe/a_status.php +++ b/twe/a_status.php @@ -13,7 +13,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,map,con,turntime from general where owner='{$_SESSION['userID']}'"; +$query = "select map,con,turntime from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -53,7 +53,7 @@ $(function(){
- + @@ -61,7 +61,7 @@ $(function(){
- +
diff --git a/twe/a_traffic.php b/twe/a_traffic.php index a5a5a184..b5ac0136 100644 --- a/twe/a_traffic.php +++ b/twe/a_traffic.php @@ -16,7 +16,7 @@ $file = @fread($fp, 1000); @fclose($fp); $log = explode("\n",$file); $str = ""; -for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } +for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i])."
"; } echo $str; $curonline = getOnlineNum(); diff --git a/twe/b_auction.php b/twe/b_auction.php index b0bea602..4683192e 100644 --- a/twe/b_auction.php +++ b/twe/b_auction.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh("거래장", 2); -$query = "select no,special,skin,con,turntime from general where owner='{$_SESSION['userID']}'"; +$query = "select no,special,con,turntime from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -35,11 +35,6 @@ if(Session::getUserGrade() >= 5 || ($me['special'] != 30 && $btCount < 1) || ($m $btn = "hidden"; } -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} - if($msg == "") $msg = "-"; if($msg2 == "") $msg2 = "-"; ?> @@ -227,7 +222,7 @@ for($i=0; $i < $count; $i++) { @@ -129,10 +125,10 @@ for($i=0; $i < $gencount; $i++) {
최 근 기 록
- +
도 움 말
diff --git a/twe/b_battleCenter.php b/twe/b_battleCenter.php index b3b536f6..0c6f133d 100644 --- a/twe/b_battleCenter.php +++ b/twe/b_battleCenter.php @@ -18,7 +18,7 @@ $query = "select nation from general where no='$gen'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -50,10 +50,6 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> @@ -117,10 +113,10 @@ for($i=0; $i < $gencount; $i++) {
- + - +
- + - +
diff --git a/twe/b_chiefboard.php b/twe/b_chiefboard.php index b2207f9e..81a8e89c 100644 --- a/twe/b_chiefboard.php +++ b/twe/b_chiefboard.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh("기밀실", 1); -$query = "select skin,no,nation,level from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,10 +17,6 @@ if($me['level'] < 5) { exit(); } -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/b_chiefcenter.php b/twe/b_chiefcenter.php index e6aa7e3c..d59848cc 100644 --- a/twe/b_chiefcenter.php +++ b/twe/b_chiefcenter.php @@ -12,7 +12,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_currentCity.php b/twe/b_currentCity.php index 575cf027..3a3a70fb 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh("현재도시", 1); -$query = "select skin,no,nation,level,city from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level,city from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -16,10 +16,6 @@ $query = "select nation,level,spy from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $myNation = MYDB_fetch_array($result); -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> @@ -276,7 +272,7 @@ for($j=0; $j < $gencount; $j++) { $imageTemp = GetImageURL($general['imgsvr']); echo " - + {$general['name']} $leader $power diff --git a/twe/b_dipcenter.php b/twe/b_dipcenter.php index 375d48da..752e2a8e 100644 --- a/twe/b_dipcenter.php +++ b/twe/b_dipcenter.php @@ -12,7 +12,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -31,10 +31,6 @@ if($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlim if($me['level'] >= 5) { $btn = "submit"; $read = ""; } else { $btn = "hidden"; $read = "readonly"; } -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index 5f08240f..344085fe 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -12,7 +12,7 @@ $query = "select turnterm from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,nation,skin,map from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,map from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -43,10 +43,6 @@ for($i=0; $i < $nationcount; $i++) { $cityStr .= "속령 $citycount
"; } -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/b_genList.php b/twe/b_genList.php index 8572561a..5f26a54d 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -12,7 +12,7 @@ $query = "select conlimit from game where no=1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select skin,no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level,con,turntime,belong from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -33,10 +33,6 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/b_myBossInfo.php b/twe/b_myBossInfo.php index 5d1c432f..0caf3710 100644 --- a/twe/b_myBossInfo.php +++ b/twe/b_myBossInfo.php @@ -10,7 +10,7 @@ increaseRefresh("인사부", 1); //훼섭 추방을 위해 갱신 checkTurn($connect); -$query = "select skin,no,nation,level from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -20,10 +20,6 @@ if($meLevel == 0) { exit(); } -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/b_myCityInfo.php b/twe/b_myCityInfo.php index 7395aa43..f719e40e 100644 --- a/twe/b_myCityInfo.php +++ b/twe/b_myCityInfo.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh("세력도시", 1); -$query = "select no,nation,level,skin from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -22,10 +22,6 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/b_myGenInfo.php b/twe/b_myGenInfo.php index 9b389cba..c48bc9bc 100644 --- a/twe/b_myGenInfo.php +++ b/twe/b_myGenInfo.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh("세력장수", 1); -$query = "select skin,no,nation,level from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -23,10 +23,6 @@ if($type == 0) { } $sel[$type] = "selected"; -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> @@ -140,7 +136,7 @@ for($j=0; $j < $gencount; $j++) { $imageTemp = GetImageURL($general['imgsvr']); echo " - 0?" background={$imageTemp}/{$general['picture']}":""; echo " height=64> + $name "; echo getLevel($general['level'], $nation['level']); echo " ".getDed($general['dedication'])." diff --git a/twe/b_myKingdomInfo.php b/twe/b_myKingdomInfo.php index 2c2d22d5..09346fbe 100644 --- a/twe/b_myKingdomInfo.php +++ b/twe/b_myKingdomInfo.php @@ -33,7 +33,7 @@ if($me['level'] == 0) {
국가열전 - ".ConvertLog($nation['history'], $me['skin'])." + ".ConvertLog($nation['history'])."
"; diff --git a/twe/b_myPage.php b/twe/b_myPage.php index cfa65873..cee07c01 100644 --- a/twe/b_myPage.php +++ b/twe/b_myPage.php @@ -25,18 +25,14 @@ if($btn == "설정저장" && $me['myset'] > 0) { $submit = 'hidden'; } - $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where owner='{$_SESSION['userID']}'"; + $query = "update general set myset=myset-1,map='$map',mode='$mode',tnmt='$tnmt' where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -$query = "select no,skin,map,mode,tnmt,myset from general where owner='{$_SESSION['userID']}'"; +$query = "select no,map,mode,tnmt,myset from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> @@ -67,27 +63,6 @@ function go(type) {
-     스킨 【 -

    지도수준 【 >상세 >간단 @@ -116,10 +91,10 @@ function go(type) { - + - + @@ -128,10 +103,10 @@ function go(type) { - + - + diff --git a/twe/b_nationboard.php b/twe/b_nationboard.php index 5ec93a56..3042e79f 100644 --- a/twe/b_nationboard.php +++ b/twe/b_nationboard.php @@ -8,14 +8,10 @@ CheckLogin(); $connect = dbConn(); increaseRefresh("회의실", 1); -$query = "select skin,no,nation from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/b_troop.php b/twe/b_troop.php index 747d70e0..c1a143ae 100644 --- a/twe/b_troop.php +++ b/twe/b_troop.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh("부대편성", 1); -$query = "select skin,no,nation,troop from general where owner='{$_SESSION['userID']}'"; +$query = "select no,nation,troop from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -16,10 +16,6 @@ $query = "select * from troop where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $troopcount = MYDB_num_rows($result); -if($me['skin'] < 1) { - $tempColor = $_basecolor; $tempColor2 = $_basecolor2; $tempColor3 = $_basecolor3; $tempColor4 = $_basecolor4; - $_basecolor = "000000"; $_basecolor2 = "000000"; $_basecolor3 = "000000"; $_basecolor4 = "000000"; -} ?> diff --git a/twe/func.php b/twe/func.php index 0043e3cc..b88a09be 100644 --- a/twe/func.php +++ b/twe/func.php @@ -227,7 +227,7 @@ function getRandGenName() { function cityInfo($connect) { global $_basecolor, $_basecolor2, $images; - $query = "select no,city,skin from general where owner='{$_SESSION['userID']}'"; + $query = "select no,city from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -251,7 +251,7 @@ function cityInfo($connect) { $tradeStr = $city['trade'] . "%"; } - if($nation['color'] == "" || $me['skin'] < 1) { $nation['color'] = "000000"; } + if($nation['color'] == "" ) { $nation['color'] = "000000"; } echo " - + - + @@ -303,11 +303,11 @@ function cityInfo($connect) { - + - + - + @@ -318,11 +318,11 @@ function cityInfo($connect) { - + - + - + @@ -342,7 +342,7 @@ function myNationInfo($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select skin,no,nation from general where owner='{$_SESSION['userID']}'"; + $query = "select no,nation from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -370,13 +370,8 @@ function myNationInfo($connect) { @@ -844,24 +839,20 @@ function CoreCommandTable($connect) { } function myInfo($connect) { - $query = "select no,skin from general where owner='{$_SESSION['userID']}'"; + $query = "select no from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - generalInfo($connect, $me['no'], $me['skin']); + generalInfo($connect, $me['no']); } -function generalInfo($connect, $no, $skin) { +function generalInfo($connect, $no) { global $_basecolor, $_basecolor2, $image, $images; $query = "select img from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select skin from general where owner='{$_SESSION['userID']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); - $query = "select block,no,name,picture,imgsvr,injury,nation,city,troop,leader,leader2,power,power2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -924,7 +915,7 @@ function generalInfo($connect, $no, $skin) { $remaining = substr($general['turntime'], 14, 2) - date('i'); if($remaining < 0) { $remaining = 60 + $remaining; } - if($nation['color'] == "" || $skin < 1) { $nation['color'] = "000000"; } + if($nation['color'] == "") { $nation['color'] = "000000"; } if($general['age'] < 60) { $general['age'] = "{$general['age']} 세"; } elseif($general['age'] < 80) { $general['age'] = "{$general['age']} 세"; } @@ -960,19 +951,19 @@ function generalInfo($connect, $no, $skin) { $imageTemp = GetImageURL($general['imgsvr']); echo "
【 ".getRegion($city['region'])." | ".getCityLevel($city['level'])." 】 {$city['name']}
"; @@ -291,9 +291,9 @@ function cityInfo($connect) {
주민".bar($pop, $me['skin'])."".bar($pop)." 민심".bar($rate, $me['skin'])."".bar($rate)." 태수 {$gen1['name']}
농업".bar($agri, $me['skin'])."".bar($agri)." 상업".bar($comm, $me['skin'])."".bar($comm)." 치안".bar($secu, $me['skin'])."".bar($secu)." 군사 {$gen2['name']}
수비".bar($def, $me['skin'])."".bar($def)." 성벽".bar($wall, $me['skin'])."".bar($wall)." 시세".bar($trade, $me['skin'])."".bar($trade)." 시중 {$gen3['name']}
【재 야】"; } - else { echo "style=font-weight:bold;font-size:13px;>국가【 {$nation['name']} 】"; } - } else { - if($me['nation'] == 0) { echo "style=color:white;background-color:000000;font-weight:bold;font-size:13px;>【재 야】"; } - else { echo "style=color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>국가【 {$nation['name']} 】"; } - } + if($me['nation'] == 0) { echo "style=color:white;background-color:000000;font-weight:bold;font-size:13px;>【재 야】"; } + else { echo "style=color:".newColor($nation['color']).";background-color:{$nation['color']};font-weight:bold;font-size:13px;>국가【 {$nation['name']} 】"; } echo "
- + - + - + - + @@ -983,7 +974,7 @@ function generalInfo($connect, $no, $skin) { - + @@ -1010,7 +1001,7 @@ function generalInfo($connect, $no, $skin) { - + @@ -1032,14 +1023,14 @@ function generalInfo($connect, $no, $skin) { } function myInfo2($connect) { - $query = "select no,skin from general where owner='{$_SESSION['userID']}'"; + $query = "select no from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); - generalInfo2($connect, $me['no'], $me['skin']); + generalInfo2($connect, $me['no']); } -function generalInfo2($connect, $no, $skin) { +function generalInfo2($connect, $no) { global $_basecolor, $_basecolor2, $image, $images, $_dexLimit; $query = "select personal,experience,dedication,firenum,warnum,killnum,deathnum,killcrew,deathcrew,belong,killnum*100/warnum as winrate,killcrew/deathcrew*100 as killrate,dex0,dex10,dex20,dex30,dex40 from general where no='$no'"; @@ -1120,27 +1111,27 @@ function generalInfo2($connect, $no, $skin) { - + - + - + - + - +
0?" background={$imageTemp}/{$general['picture']}":""; echo ">   {$specUser} {$general['name']} 【 {$level} | {$call} | {$color}{$injury} 】 ".substr($general['turntime'], 11)."
통솔  {$color}{$leader}{$lbonus} ".bar(expStatus($general['leader2']), $skin, 20)."".bar(expStatus($general['leader2']), 20)." 무력  {$color}{$power} ".bar(expStatus($general['power2']), $skin, 20)."".bar(expStatus($general['power2']), 20)." 지력  {$color}{$intel} ".bar(expStatus($general['intel2']), $skin, 20)."".bar(expStatus($general['intel2']), 20)."
명마$bookname
0?" background={$weapImage}":""; echo ">   자금 {$general['gold']} 군량
Lv  {$general['explevel']} ".bar(getLevelPer($general['experience'], $general['explevel']), $skin, 20)."".bar(getLevelPer($general['experience'], $general['explevel']), 20)." 연령 {$general['age']}
보병   {$general['dex0']}".bar($dex0, $skin, 16)."".bar($dex0, 16)."
궁병   {$general['dex10']}".bar($dex10, $skin, 16)."".bar($dex10, 16)."
기병   {$general['dex20']}".bar($dex20, $skin, 16)."".bar($dex20, 16)."
귀병   {$general['dex30']}".bar($dex30, $skin, 16)."".bar($dex30, 16)."
차병   {$general['dex40']}".bar($dex40, $skin, 16)."".bar($dex40, 16)."
"; } @@ -1257,7 +1248,7 @@ function pushHistory($history) { file_put_contents(__dir__.'/logs/_history.txt', $text, FILE_APPEND); } -function getRawLog($path, $count, $line_length, $skin){ +function getRawLog($path, $count, $line_length){ //TODO: tail과 유사한 형태로 처리할 수 있는게 나을 듯. 그 이전에 파일 로그는 좀... ㅜㅜ if(!file_exists($path)){ return null; @@ -1269,7 +1260,7 @@ function getRawLog($path, $count, $line_length, $skin){ fclose($fp); } -function TrickLog($count, $skin) { +function TrickLog($count) { if(!file_exists("logs/_tricklog.txt")){ return ''; } @@ -1279,11 +1270,11 @@ function TrickLog($count, $skin) { @fclose($fp); $log = explode("\n",$file); $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i])."
"; } echo $str; } -function AllLog($count, $skin) { +function AllLog($count) { if(!file_exists("logs/_alllog.txt")){ return ''; } @@ -1294,12 +1285,12 @@ function AllLog($count, $skin) { $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { - $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."
" : "
"; } echo $str; } -function AuctionLog($count, $skin) { +function AuctionLog($count) { if(!file_exists("logs/_auctionlog.txt")){ return ''; } @@ -1309,11 +1300,11 @@ function AuctionLog($count, $skin) { @fclose($fp); $log = explode("\n",$file); $str = ""; - for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i], $skin)."
"; } + for($i=0; $i < $count; $i++) { $str .= ConvertLog($log[count($log)-2-$i])."
"; } echo $str; } -function History($count, $skin) { +function History($count) { if(!file_exists("logs/_history.txt")){ return ''; } @@ -1324,12 +1315,12 @@ function History($count, $skin) { $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { - $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."
" : "
"; } echo $str; } -function MyLog($no, $count, $skin) { +function MyLog($no, $count) { if(!file_exists("logs/gen{$no}.txt")){ return ''; } @@ -1340,12 +1331,12 @@ function MyLog($no, $count, $skin) { $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { - $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."
" : "
"; } echo $str; } -function MyBatRes($no, $count, $skin) { +function MyBatRes($no, $count) { if(!file_exists("logs/batres{$no}.txt")){ return ''; } @@ -1356,12 +1347,12 @@ function MyBatRes($no, $count, $skin) { $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { - $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."
" : "
"; } echo $str; } -function MyBatLog($no, $count, $skin) { +function MyBatLog($no, $count) { if(!file_exists("logs/batlog{$no}.txt")){ return ''; } @@ -1372,16 +1363,16 @@ function MyBatLog($no, $count, $skin) { $log = explode("\n",$file); $str = ""; for($i=0; $i < $count; $i++) { - $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i], $skin)."
" : "
"; + $str .= isset($log[count($log)-2-$i]) ? ConvertLog($log[count($log)-2-$i])."
" : "
"; } echo $str; } -function MyHistory($connect, $no, $skin) { +function MyHistory($connect, $no) { $query = "select history from general where no='$no'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $general = MYDB_fetch_array($result); - echo ConvertLog($general['history'], $skin); + echo ConvertLog($general['history']); } function addHistory($me, $history) { @@ -1396,12 +1387,12 @@ function addNationHistory($nation, $history) { $history.'
', $nation['nation']); } -function adminMsg($connect, $skin=1) { +function adminMsg($connect) { $query = "select msg from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - echo "운영자 메세지 : "; + echo "운영자 메세지 : "; echo $admin['msg'].""; } @@ -1437,7 +1428,7 @@ function onlineNation($connect) { } function nationMsg($connect) { - $query = "select no,nation,skin from general where owner='{$_SESSION['userID']}'"; + $query = "select no,nation from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1445,7 +1436,7 @@ function nationMsg($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); - echo "".$nation['msg'].""; + echo "".$nation['msg'].""; } diff --git a/twe/func_legacy.php b/twe/func_legacy.php index dbf09750..f068b72c 100644 --- a/twe/func_legacy.php +++ b/twe/func_legacy.php @@ -37,7 +37,7 @@ echo " } -function bar($per, $skin=1, $h=7) { +function bar($per, $h=7) { global $images; if($h == 7) { $bd = 0; $h = 7; $h2 = 5; } else { $bd = 1; $h = 12; $h2 = 8; } @@ -48,14 +48,10 @@ function bar($per, $skin=1, $h=7) { $str2 = ""; if($per <= 0) { $str1 = ""; } elseif($per >= 100) { $str2 = ""; } - if($skin == 0) { - $str = "-"; - } else { - $str = " - - {$str1}{$str2} -
"; - } + $str = " + + {$str1}{$str2} +
"; return $str; } @@ -132,7 +128,7 @@ function printCitysName($connect, $cityNo, $distance=1) { } -function info($connect, $type=0, $skin=1) { +function info($connect, $type=0) { $query = "select year,month,turnterm,maxgeneral from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); @@ -149,16 +145,16 @@ function info($connect, $type=0, $skin=1) { switch($type) { case 0: - echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)
등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; + echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)
등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; break; case 1: - echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)          등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; + echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)          등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; break; case 2: - echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)"; + echo "현재 : {$admin['year']}年 {$admin['month']}月 ($termtype 서버)"; break; case 3: - echo "등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; + echo "등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + NPC {$npccount} 명"; break; } } diff --git a/twe/func_message.php b/twe/func_message.php index 3c566fa3..2f3ceba6 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -279,7 +279,7 @@ function getMailboxList(){ // who : xxxx,xxxx(발신인, 수신인) function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { //FIXME: 폐기 - $query = "select skin,no,nation,name,picture,level from general where owner='{$_SESSION['userID']}'"; + $query = "select no,nation,name,picture,level from general where owner='{$_SESSION['userID']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -312,11 +312,11 @@ function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $dip = MYDB_fetch_array($result); - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $sndr['name'], $sndrnation['color'], $msg, $date, $num, $from, $term, $me['level'], $dip['reserved']); + ShowMsg($bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $sndr['name'], $sndrnation['color'], $msg, $date, $num, $from, $term, $me['level'], $dip['reserved']); } elseif($category <= 8) { $rcvrnation = getNationStaticInfo($to); - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $rcvrnation['name'], $rcvrnation['color'], $msg, $date, $num, $from, $term, $me['level']); + ShowMsg($bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], $rcvrnation['name'], $rcvrnation['color'], $msg, $date, $num, $from, $term, $me['level']); } elseif($category <= 11) { $query = "select name,picture,nation from general where no='$to'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -328,7 +328,7 @@ function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { } else { $rcvrnation = getNationStaticInfo($rcvr['nation']); } - ShowMsg($me['skin'], $bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], "{$rcvr['name']}:{$rcvrnation['name']}", $rcvrnation['color'], $msg, $date, $num, $from, $term); + ShowMsg($bgcolor, $category, $sndr['picture'], $sndr['imgsvr'], "{$sndr['name']}:{$sndrnation['name']}▶", $sndrnation['color'], "{$rcvr['name']}:{$rcvrnation['name']}", $rcvrnation['color'], $msg, $date, $num, $from, $term); } } @@ -355,7 +355,7 @@ function MsgDip($connect, $bg) { if($nation['dip4']) { echo "\n"; DecodeMsg($connect, $nation['dip4'], $nation['dip4_type'], $nation['dip4_who'], $nation['dip4_when'], $bg, 4); } } -function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { +function ShowMsg($bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, $youcolor, $msg, $date, $num=0, $who=0, $when=0, $level=0, $note="") { if($msg == "") return; $msg = Tag2Code($msg); @@ -382,14 +382,9 @@ function ShowMsg($skin, $bgcolor, $type, $picture, $imgsvr, $me, $mycolor, $you, case 10: $sign = ""; $corebutton = ""; break; case 11: $sign = ""; $site = "d_scout.php"; break; } - if($skin == 0) { - $bgcolor = "000000"; $picture = ""; - $naming = "[{$me}{$sign}{$you}]"; - } else { - $imageTemp = GetImageURL($imgsvr); - $naming = "[$me{$sign}$you]"; - $picture = ""; - } + $imageTemp = GetImageURL($imgsvr); + $naming = "[$me{$sign}$you]"; + $picture = ""; if($site != "") { $form = ""; $form2 = ""; diff --git a/twe/func_template.php b/twe/func_template.php index a72b7eaa..6afc7c9a 100644 --- a/twe/func_template.php +++ b/twe/func_template.php @@ -96,7 +96,7 @@ function commandButton() { } $db = DB::db(); - $me = $db->queryFirstRow("select skin,no,nation,level,belong from general where no=%i", $generalID); + $me = $db->queryFirstRow("select no,nation,level,belong from general where no=%i", $generalID); $nation = $db->queryFirstRow("select nation,color,secretlimit from nation where nation=%i",$me['nation']); diff --git a/twe/index.php b/twe/index.php index 8ed57f78..7073938c 100644 --- a/twe/index.php +++ b/twe/index.php @@ -23,7 +23,7 @@ if(!$userID){ die(); } -$me = $db->queryFirstRow('select no,skin,con,turntime,newmsg,newvote,map from general where owner = %i', $userID); +$me = $db->queryFirstRow('select no,con,turntime,newmsg,newvote,map from general where owner = %i', $userID); //그새 사망이면 if($me === null) { @@ -87,7 +87,7 @@ $(function(){ - + - + - + "; ?> - - + + = 5) { @@ -201,7 +201,7 @@ if(Session::getUserGrade() >= 5) { - - + + - +
삼국지 모의전투 PHP 유기체서버 (0?"cyan":"white";?>>)삼국지 모의전투 PHP 유기체서버 ()
전체 접속자 수 : 턴당 갱신횟수 :
@@ -164,8 +164,8 @@ echo "
접속중인 국가:
【 국가방침 】
【 국가방침 】
【 접속자 】
- 0?"cyan":"white";?>> Ctrl, Shift, 드래그로 복수선택 가능     반복&수정 + Ctrl, Shift, 드래그로 복수선택 가능     반복&수정 개인 기록
중원 정세
diff --git a/twe/select_npc_post.php b/twe/select_npc_post.php index b83c4d62..8cb3f2df 100644 --- a/twe/select_npc_post.php +++ b/twe/select_npc_post.php @@ -89,7 +89,6 @@ if($admin['npcmode'] != 1) { conmsg='', npc=1, killturn=6, - skin=1, mode=2, map=0, owner='$userID', diff --git a/twe/sql/schema.sql b/twe/sql/schema.sql index ee567744..329ae0c5 100644 --- a/twe/sql/schema.sql +++ b/twe/sql/schema.sql @@ -79,7 +79,6 @@ CREATE TABLE `general` ( `specage` INT(2) NULL DEFAULT '0', `special2` INT(2) NULL DEFAULT '0', `specage2` INT(2) NULL DEFAULT '0', - `skin` INT(3) NULL DEFAULT '1', `mode` INT(1) NULL DEFAULT '2', `tnmt` INT(1) NULL DEFAULT '1', `map` INT(1) NULL DEFAULT '0',