From 5ed33b1cdae561b98df0d7fbf75c6fe5cc61ab07 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 4 Feb 2018 04:40:35 +0900 Subject: [PATCH] =?UTF-8?q?general=20table=EC=9D=98=20no=5Fmember=EB=A5=BC?= =?UTF-8?q?=20=EC=9D=98=EB=AF=B8=EC=97=90=20=EB=8D=94=20=EB=A7=9E=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20owner=EB=A1=9C=20=EB=B3=80=EA=B2=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit general table의 user_id, password column 삭제. 코드도 이를 참조하지 않고 owner를 이용하도록 변경 --- i_login/Post.php | 3 +- twe/_119.php | 2 +- twe/_119_b.php | 2 +- twe/_admin1.php | 2 +- twe/_admin1_submit.php | 2 +- twe/_admin2.php | 2 +- twe/_admin2_submit.php | 10 +- twe/_admin3.php | 2 +- twe/_admin3_submit.php | 2 +- twe/_admin4.php | 53 +------ twe/_admin4_submit.php | 8 +- twe/_admin5.php | 2 +- twe/_admin5_submit.php | 6 +- twe/_admin6.php | 2 +- twe/_admin7.php | 2 +- twe/_admin8.php | 2 +- twe/_simul.php | 2 +- twe/a_bestGeneral.php | 2 +- twe/a_genList.php | 2 +- twe/a_history.php | 2 +- twe/a_kingdomList.php | 2 +- twe/a_status.php | 2 +- twe/a_vote.php | 2 +- twe/b_auction.php | 2 +- twe/b_battleCenter.php | 2 +- twe/b_betting.php | 4 +- twe/b_chiefboard.php | 2 +- twe/b_chiefcenter.php | 2 +- twe/b_currentCity.php | 2 +- twe/b_dipcenter.php | 2 +- twe/b_diplomacy.php | 2 +- twe/b_genList.php | 2 +- twe/b_myBossInfo.php | 2 +- twe/b_myCityInfo.php | 4 +- twe/b_myGenInfo.php | 2 +- twe/b_myKingdomInfo.php | 4 +- twe/b_myPage.php | 6 +- twe/b_nationboard.php | 2 +- twe/b_nationrule.php | 2 +- twe/b_tournament.php | 2 +- twe/b_troop.php | 2 +- twe/c_auction.php | 2 +- twe/c_betting.php | 4 +- twe/c_chiefboard.php | 2 +- twe/c_dipcenter.php | 2 +- twe/c_double.php | 12 +- twe/c_msgsubmit.php | 2 +- twe/c_myBossInfo.php | 2 +- twe/c_nationboard.php | 2 +- twe/c_nationrule.php | 2 +- twe/c_tournament.php | 2 +- twe/c_troop.php | 2 +- twe/c_vacation.php | 2 +- twe/c_vote.php | 4 +- twe/commandlist.php | 2 +- twe/d_ally.php | 2 +- twe/d_cancel.php | 2 +- twe/d_cease.php | 2 +- twe/d_merge.php | 2 +- twe/d_scout.php | 2 +- twe/d_surrender.php | 2 +- twe/event_1.php | 2 +- twe/event_2.php | 8 +- twe/event_3.php | 8 +- twe/event_4.php | 11 +- twe/func.php | 32 ++-- twe/func_map.php | 2 +- twe/func_message.php | 14 +- twe/func_npc.php | 6 +- twe/func_process.php | 12 +- twe/func_template.php | 2 +- twe/index.php | 8 +- twe/install2_ok.php | 4 +- twe/j_msgsubmit.php | 4 +- twe/join_post.php | 8 +- twe/login_process.php | 4 +- twe/msglist.php | 2 +- twe/npc_login_process.php | 4 +- twe/preprocessing.php | 2 +- twe/processing.php | 76 +++++----- twe/scenario_22.php | 9 +- twe/scenario_24.php | 12 +- twe/schema.php | 302 +++++++++++++++++++++++++------------- twe/select_npc.php | 9 +- twe/select_npc_post.php | 18 +-- twe/selection.php | 23 +-- twe/turn.php | 10 +- twe/turn_pop_core.php | 2 +- twe/turn_push_core.php | 2 +- 89 files changed, 421 insertions(+), 391 deletions(-) diff --git a/i_login/Post.php b/i_login/Post.php index 4ef81855..d1aa0050 100644 --- a/i_login/Post.php +++ b/i_login/Post.php @@ -13,7 +13,6 @@ $id = $_POST['id']; $pw = $_POST['pw']; $conmsg = $_POST['conmsg']; -$_SESSION['conmsg'] = $conmsg;//XXX: conmsg를 처리할 더 적절한 장소는? $id = _String::NoSpecialCharacter($id); $pw = substr($pw, 0, 32); @@ -34,6 +33,8 @@ if($DB->Count($rs) == 1) { $SESSION->Login($member['NO'], $id); $DB->Update('MEMBER', "CONMSG='{$conmsg}', IP='{$_SERVER['REMOTE_ADDR']}'", "NO='{$member['NO']}'"); + $_SESSION['conmsg'] = $conmsg;//XXX: conmsg를 처리할 더 적절한 장소는? + $response['result'] = 'SUCCESS'; } else { $response['result'] = 'FAIL'; diff --git a/twe/_119.php b/twe/_119.php index 7f65756c..c0a6ee4a 100644 --- a/twe/_119.php +++ b/twe/_119.php @@ -4,7 +4,7 @@ include "func.php"; $connect=dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_119_b.php b/twe/_119_b.php index 54984e18..0f0cadc6 100644 --- a/twe/_119_b.php +++ b/twe/_119_b.php @@ -4,7 +4,7 @@ include "func.php"; $connect=dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin1.php b/twe/_admin1.php index 35f24a8a..1b9804a1 100644 --- a/twe/_admin1.php +++ b/twe/_admin1.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin1_submit.php b/twe/_admin1_submit.php index 0ccde637..8da670af 100644 --- a/twe/_admin1_submit.php +++ b/twe/_admin1_submit.php @@ -7,7 +7,7 @@ $connect = dbConn(); $admin = getAdmin($connect); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin2.php b/twe/_admin2.php index 0e3581f7..bf68e467 100644 --- a/twe/_admin2.php +++ b/twe/_admin2.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin2_submit.php b/twe/_admin2_submit.php index 4e290363..247d2022 100644 --- a/twe/_admin2_submit.php +++ b/twe/_admin2_submit.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -35,21 +35,21 @@ switch($btn) { $db = getDB(); $db->query('update general set block=1,killturn=24 where no IN %li',$genlist); //FIXME: subquery로 하는게 더 빠를 듯. - $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); - getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); + $uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist); + getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where no IN %ls', $date, $uid); break; case "2단계 블럭": $date = date('Y-m-d H:i:s'); $db = getDB(); $db->query('update general set gold=0,rice=0,block=2,killturn=24 where no IN %li',$genlist); - $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + $uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist); getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "3단계 블럭": $date = date('Y-m-d H:i:s'); $db = getDB(); $db->query('update general set gold=0,rice=0,block=3,killturn=24 where no IN %li',$genlist); - $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + $uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist); getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "무한삭턴": diff --git a/twe/_admin3.php b/twe/_admin3.php index a1378c06..d570ad1c 100644 --- a/twe/_admin3.php +++ b/twe/_admin3.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin3_submit.php b/twe/_admin3_submit.php index d86e1183..9b33a585 100644 --- a/twe/_admin3_submit.php +++ b/twe/_admin3_submit.php @@ -7,7 +7,7 @@ $connect = dbConn(); $admin = getAdmin($connect); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin4.php b/twe/_admin4.php index b733f3aa..675ab7b4 100644 --- a/twe/_admin4.php +++ b/twe/_admin4.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -109,7 +109,7 @@ $conMsg = ""; for($i=0; $i < $ipCount; $i++) { $ip = MYDB_fetch_array($result); - $query = "select name,ip,lastconnect,user_id,block,conmsg from general where ip like '{$ip['ip2']}%' and npc<2 order by ip"; + $query = "select name,ip,lastconnect,owner,block,conmsg from general where ip like '{$ip['ip2']}%' and npc<2 order by ip"; $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $genCount = MYDB_num_rows($genResult); for($k=0; $k < $genCount; $k++) { @@ -118,7 +118,7 @@ for($i=0; $i < $ipCount; $i++) { else $genName .= $gen['name']."
"; $genDate .= $gen['lastconnect']."
"; $genIP .= $gen['ip']."
"; - $genID .= $gen['user_id']."
"; + $genID .= $gen['owner']."
"; $conMsg .= $gen['conmsg']."
"; } $genName .= "
"; @@ -136,54 +136,9 @@ echo " ?> - - - - - - - - - 1"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$ipCount = MYDB_num_rows($result); -$genName = ""; -$genDate = ""; -$genIP = ""; -$genID = ""; -$conMsg = ""; -for($i=0; $i < $ipCount; $i++) { - $ip = MYDB_fetch_array($result); - - $query = "select name,password,lastconnect,user_id,block,conmsg from general where password='{$ip['password']}' and npc<2"; - $genResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $genCount = MYDB_num_rows($genResult); - for($k=0; $k < $genCount; $k++) { - $gen = MYDB_fetch_array($genResult); - if($gen['block'] > 0) $genName .= "{$gen['name']}
"; - else $genName .= $gen['name']."
"; - $genDate .= $gen['lastconnect']."
"; - $genIP .= substr($gen['password'],0,10)." ...
"; - $genID .= $gen['user_id']."
"; - $conMsg .= $gen['conmsg']."
"; - } - $genName .= "
"; - $genDate .= "
"; - $genIP .= "
"; - $genID .= "
"; - $conMsg .= "
"; -} -echo " - - - - - "; +//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기 ?> - -
장수명최근로그인PasswordID-
$genName$genDate$genIP$genID$conMsg
diff --git a/twe/_admin4_submit.php b/twe/_admin4_submit.php index e3dc9bca..2c0d350e 100644 --- a/twe/_admin4_submit.php +++ b/twe/_admin4_submit.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -25,21 +25,21 @@ switch($btn) { $db = getDB(); $db->query('update general set block=1,killturn=24 where no IN %li',$genlist); //FIXME: subquery로 하는게 더 빠를 듯. - $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + $uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist); getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "2단계 블럭": $date = date('Y-m-d H:i:s'); $db = getDB(); $db->query('update general set block=2,killturn=24 where no IN %li',$genlist); - $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + $uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist); getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "3단계 블럭": $date = date('Y-m-d H:i:s'); $db = getDB(); $db->query('update general set block=3,killturn=24 where no IN %li',$genlist); - $uid = $db->queryFirstColumn('select user_id from general where no IN %li', $genlist); + $uid = $db->queryFirstColumn('select owner from general where no IN %li', $genlist); getRootDB()->query('update MEMBER set block_num=block_num+1,block_date=%s where id IN %ls', $date, $uid); break; case "무한삭턴": diff --git a/twe/_admin5.php b/twe/_admin5.php index aa4b3918..ebd80f44 100644 --- a/twe/_admin5.php +++ b/twe/_admin5.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin5_submit.php b/twe/_admin5_submit.php index e58498f8..b58c018e 100644 --- a/twe/_admin5_submit.php +++ b/twe/_admin5_submit.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -17,10 +17,10 @@ if($me['userlevel'] < 5) { switch($btn) { case "국가변경": if($nation == 0) { - $query = "update general set nation=0,level=0 where no_member='{$_SESSION['noMember']}'"; + $query = "update general set nation=0,level=0 where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set nation='{$nation}',level=1 where no_member='{$_SESSION['noMember']}'"; + $query = "update general set nation='{$nation}',level=1 where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin6.php b/twe/_admin6.php index 4d128b52..38cfb70a 100644 --- a/twe/_admin6.php +++ b/twe/_admin6.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin7.php b/twe/_admin7.php index 44d6da00..e8509abb 100644 --- a/twe/_admin7.php +++ b/twe/_admin7.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin8.php b/twe/_admin8.php index 7fd0de08..228e7cdc 100644 --- a/twe/_admin8.php +++ b/twe/_admin8.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel,skin from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_simul.php b/twe/_simul.php index 51c4e875..35da641e 100644 --- a/twe/_simul.php +++ b/twe/_simul.php @@ -48,7 +48,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "시뮬", 2); -$query = "select no,tournament,userlevel,con,turntime from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,tournament,userlevel,con,turntime from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_bestGeneral.php b/twe/a_bestGeneral.php index 134cbb70..33b0f49d 100644 --- a/twe/a_bestGeneral.php +++ b/twe/a_bestGeneral.php @@ -10,7 +10,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 con,userlevel,turntime from general where no_member='{$_SESSION['noMember']}'"; +$query = "select con,userlevel,turntime from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_genList.php b/twe/a_genList.php index db55c7c4..04b66705 100644 --- a/twe/a_genList.php +++ b/twe/a_genList.php @@ -10,7 +10,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 con,userlevel,turntime from general where no_member='{$_SESSION['noMember']}'"; +$query = "select con,userlevel,turntime from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_history.php b/twe/a_history.php index 771b6f01..5354b041 100644 --- a/twe/a_history.php +++ b/twe/a_history.php @@ -11,7 +11,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,userlevel,turntime from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,map,con,userlevel,turntime from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_kingdomList.php b/twe/a_kingdomList.php index b63aa665..d0ee5c53 100644 --- a/twe/a_kingdomList.php +++ b/twe/a_kingdomList.php @@ -10,7 +10,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 con,userlevel,turntime from general where no_member='{$_SESSION['noMember']}'"; +$query = "select con,userlevel,turntime from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_status.php b/twe/a_status.php index 829ea792..71ef307e 100644 --- a/twe/a_status.php +++ b/twe/a_status.php @@ -11,7 +11,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,userlevel,turntime from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,map,con,userlevel,turntime from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/a_vote.php b/twe/a_vote.php index 902df997..9d4067ed 100644 --- a/twe/a_vote.php +++ b/twe/a_vote.php @@ -4,7 +4,7 @@ include "func.php"; $connect = dbConn(); increaseRefresh($connect, "설문조사", 1); -$query = "select no,userlevel,vote from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,userlevel,vote from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_auction.php b/twe/b_auction.php index 6da06126..18ddc050 100644 --- a/twe/b_auction.php +++ b/twe/b_auction.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "거래장", 2); -$query = "select no,special,skin,userlevel,con,turntime from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,special,skin,userlevel,con,turntime from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_battleCenter.php b/twe/b_battleCenter.php index ad58487d..239bfc38 100644 --- a/twe/b_battleCenter.php +++ b/twe/b_battleCenter.php @@ -16,7 +16,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,userlevel,con,turntime,belong from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_betting.php b/twe/b_betting.php index 71ff71c5..1f72f60a 100644 --- a/twe/b_betting.php +++ b/twe/b_betting.php @@ -7,7 +7,7 @@ $connect = dbConn(); increaseRefresh($connect, "베팅장", 1); checkTurn($connect); -$query = "select no,tournament,userlevel,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,tournament,userlevel,con,turntime,bet0+bet1+bet2+bet3+bet4+bet5+bet6+bet7+bet8+bet9+bet10+bet11+bet12+bet13+bet14+bet15 as bet from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -191,7 +191,7 @@ for($i=0; $i < 16; $i++) { echo ""; } -$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where no_member='{$_SESSION['noMember']}'"; +$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); for($i=0; $i < 16; $i++) { diff --git a/twe/b_chiefboard.php b/twe/b_chiefboard.php index db170a05..d593376c 100644 --- a/twe/b_chiefboard.php +++ b/twe/b_chiefboard.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "기밀실", 1); -$query = "select skin,no,nation,level from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_chiefcenter.php b/twe/b_chiefcenter.php index c326470c..4ed92696 100644 --- a/twe/b_chiefcenter.php +++ b/twe/b_chiefcenter.php @@ -10,7 +10,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,userlevel,con,turntime,belong from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where owner='{$_SESSION['noMember']}'"; $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 dfee40fa..654d8c88 100644 --- a/twe/b_currentCity.php +++ b/twe/b_currentCity.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "현재도시", 1); -$query = "select skin,no,nation,userlevel,level,city from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation,userlevel,level,city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_dipcenter.php b/twe/b_dipcenter.php index 58fead26..8330e4a0 100644 --- a/twe/b_dipcenter.php +++ b/twe/b_dipcenter.php @@ -10,7 +10,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,userlevel,con,turntime,belong from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_diplomacy.php b/twe/b_diplomacy.php index 5cae0337..67928aaf 100644 --- a/twe/b_diplomacy.php +++ b/twe/b_diplomacy.php @@ -10,7 +10,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,userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,nation,skin,map,userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_genList.php b/twe/b_genList.php index 6d1a9cb2..2b60c096 100644 --- a/twe/b_genList.php +++ b/twe/b_genList.php @@ -10,7 +10,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,userlevel,con,turntime,belong from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_myBossInfo.php b/twe/b_myBossInfo.php index 95e92c36..d3ffac23 100644 --- a/twe/b_myBossInfo.php +++ b/twe/b_myBossInfo.php @@ -8,7 +8,7 @@ increaseRefresh($connect, "인사부", 1); //훼섭 추방을 위해 갱신 checkTurn($connect); -$query = "select skin,no,nation,level from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_myCityInfo.php b/twe/b_myCityInfo.php index 6add903a..1502ef20 100644 --- a/twe/b_myCityInfo.php +++ b/twe/b_myCityInfo.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "세력도시", 1); -$query = "select no,nation,level,skin from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,nation,level,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -56,7 +56,7 @@ if($me['skin'] < 1) {
{$gen[$i]}

0) { $submit = 'hidden'; } - $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where no_member='{$_SESSION['noMember']}'"; + $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -$query = "select no,skin,map,mode,tnmt,myset from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,skin,map,mode,tnmt,myset from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_nationboard.php b/twe/b_nationboard.php index 7ebb1cc3..d6d677d1 100644 --- a/twe/b_nationboard.php +++ b/twe/b_nationboard.php @@ -6,7 +6,7 @@ CheckLogin(); $connect = dbConn(); increaseRefresh($connect, "회의실", 1); -$query = "select skin,no,nation from general where no_member='{$_SESSION['noMember']}'"; +$query = "select skin,no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/b_nationrule.php b/twe/b_nationrule.php index 9d81c77d..482f9fcb 100644 --- a/twe/b_nationrule.php +++ b/twe/b_nationrule.php @@ -20,7 +20,7 @@ increaseRefresh($connect, "국법", 1); = 10 && $gold <= 1000) { if($gold + 500 <= $me['gold'] && $gold + $mebet <= 1000 && $gold + $me['bet'] <= 1000) { - $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where no_member='{$_SESSION['noMember']}'"; + $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $query = "update game set bet{$i}=bet{$i}+'$gold' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); diff --git a/twe/c_chiefboard.php b/twe/c_chiefboard.php index de4c5d64..14885ac5 100644 --- a/twe/c_chiefboard.php +++ b/twe/c_chiefboard.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); if(getBlockLevel() != 1 && getBlockLevel() != 3) { - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_dipcenter.php b/twe/c_dipcenter.php index 53571443..dcac0786 100644 --- a/twe/c_dipcenter.php +++ b/twe/c_dipcenter.php @@ -7,7 +7,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation,level from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_double.php b/twe/c_double.php index 5fa64c76..28fd8973 100644 --- a/twe/c_double.php +++ b/twe/c_double.php @@ -30,7 +30,7 @@ if($command == 46) { if($name == "") { $name = "무명"; } $name = _String::SubStrForWidth($name, 0, 12); - $query = "update general set makenation='{$name}' where no_member='{$_SESSION['noMember']}'"; + $query = "update general set makenation='{$name}' where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = sizeof($turn); @@ -38,13 +38,13 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$comStr}'"; } - $query = "update general set {$str} where no_member='{$_SESSION['noMember']}'"; + $query = "update general set {$str} where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; echo 'index.php';//TODO:debug all and replace //통합제의 } elseif($command == 53) { - $query = "select nation,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -71,7 +71,7 @@ if($command == 46) { echo 'b_chiefcenter.php';//TODO:debug all and replace //불가침 } elseif($command == 61) { - $query = "select nation,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -100,7 +100,7 @@ if($command == 46) { //백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습 //국기변경 } elseif($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) { - $query = "select no,nation,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -123,7 +123,7 @@ if($command == 46) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$comStr}'"; } - $query = "update general set {$str} where no_member='{$_SESSION['noMember']}'"; + $query = "update general set {$str} where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; echo 'index.php';//TODO:debug all and replace diff --git a/twe/c_msgsubmit.php b/twe/c_msgsubmit.php index 62e741fe..9c66a494 100644 --- a/twe/c_msgsubmit.php +++ b/twe/c_msgsubmit.php @@ -17,7 +17,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 no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_myBossInfo.php b/twe/c_myBossInfo.php index bad49a57..c58b97e3 100644 --- a/twe/c_myBossInfo.php +++ b/twe/c_myBossInfo.php @@ -11,7 +11,7 @@ $query = "select startyear,year,month 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,level from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $meLevel = $me['level']; diff --git a/twe/c_nationboard.php b/twe/c_nationboard.php index 93e48ef3..0c710163 100644 --- a/twe/c_nationboard.php +++ b/twe/c_nationboard.php @@ -8,7 +8,7 @@ CheckLogin(); $connect = dbConn(); if(getBlockLevel() != 1 && getBlockLevel() != 3) { - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_nationrule.php b/twe/c_nationrule.php index 3e38fea0..8233fc96 100644 --- a/twe/c_nationrule.php +++ b/twe/c_nationrule.php @@ -7,7 +7,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_tournament.php b/twe/c_tournament.php index 2eb35033..ab37b620 100644 --- a/twe/c_tournament.php +++ b/twe/c_tournament.php @@ -11,7 +11,7 @@ $query = "select tournament,phase,tnmt_type,develcost from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,userlevel,tournament from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,userlevel,tournament from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_troop.php b/twe/c_troop.php index 89c8c35c..57dd1e01 100644 --- a/twe/c_troop.php +++ b/twe/c_troop.php @@ -7,7 +7,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no,nation,troop from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,nation,troop from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/c_vacation.php b/twe/c_vacation.php index 6c78ff4a..60171848 100644 --- a/twe/c_vacation.php +++ b/twe/c_vacation.php @@ -11,7 +11,7 @@ $admin = MYDB_fetch_array($result); $admin['killturn'] *= 3; -$query = "update general set killturn='{$admin['killturn']}' where no_member='{$_SESSION['noMember']}'"; +$query = "update general set killturn='{$admin['killturn']}' where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; diff --git a/twe/c_vote.php b/twe/c_vote.php index 33910f38..7a2565d7 100644 --- a/twe/c_vote.php +++ b/twe/c_vote.php @@ -9,7 +9,7 @@ $query = "select develcost,vote,votecomment from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -48,7 +48,7 @@ if($btn == "수정" && $me['userlevel'] >= 5) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($btn == "투표" && $me['vote'] == 0 && $sel > 0) { $develcost = $admin['develcost'] * 5; - $query = "update general set gold=gold+{$develcost},vote='{$sel}' where no_member='{$_SESSION['noMember']}'"; + $query = "update general set gold=gold+{$develcost},vote='{$sel}' where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $log = array(); diff --git a/twe/commandlist.php b/twe/commandlist.php index e94db2de..f8f01b8b 100644 --- a/twe/commandlist.php +++ b/twe/commandlist.php @@ -65,7 +65,7 @@ function myCommandList($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,turntime,term,turn0,turn1,turn2,turn3,turn4,turn5,turn6,turn7,turn8,turn9,turn10,turn11,turn12,turn13,turn14,turn15,turn16,turn17,turn18,turn19,turn20,turn21,turn22,turn23 from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $turn = getTurn($connect, $me, 2); diff --git a/twe/d_ally.php b/twe/d_ally.php index c5735f60..7d67ef7c 100644 --- a/twe/d_ally.php +++ b/twe/d_ally.php @@ -11,7 +11,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/d_cancel.php b/twe/d_cancel.php index 7eb0d0e9..d98a6f41 100644 --- a/twe/d_cancel.php +++ b/twe/d_cancel.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/d_cease.php b/twe/d_cease.php index 4d9dd0f4..796b4376 100644 --- a/twe/d_cease.php +++ b/twe/d_cease.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/d_merge.php b/twe/d_merge.php index 28935352..4b2e6cfc 100644 --- a/twe/d_merge.php +++ b/twe/d_merge.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/d_scout.php b/twe/d_scout.php index 750ae7bf..63e5b04a 100644 --- a/twe/d_scout.php +++ b/twe/d_scout.php @@ -15,7 +15,7 @@ $query = "select startyear,year,month,killturn from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,nations,level,troop,history,npc,gold,rice from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,nations,level,troop,history,npc,gold,rice from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/d_surrender.php b/twe/d_surrender.php index ce9dc968..8f524d9a 100644 --- a/twe/d_surrender.php +++ b/twe/d_surrender.php @@ -9,7 +9,7 @@ $query = "select year,month from game where no='1'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); -$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/event_1.php b/twe/event_1.php index 17c7ac10..c696e66d 100644 --- a/twe/event_1.php +++ b/twe/event_1.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/event_2.php b/twe/event_2.php index bf3ca56b..00ce90b3 100644 --- a/twe/event_2.php +++ b/twe/event_2.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -207,7 +207,6 @@ echo ""; function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { $name = "ⓞ".$name; - $genid = "npc{$gencount}"; $turntime = getRandTurn2($turnterm); $personal = CharCall($personal); $special = SpecCall($special); @@ -230,18 +229,17 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ $dex20 = 0; $dex30 = 0; $dex40 = 0; - $pw = md5("18071807"); //장수 @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + npcid,npc,npc_org,npcmatch,name,picture,nation,city, leader,power,intel,experience,dedication, level,gold,rice,crew,crewtype,train,atmos,tnmt, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit, dex0, dex10, dex20, dex30, dex40 ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$gencount','$npc','$npc','$npcmatch','$name','$picture','$nation','$city', '$leader','$power','$intel','$experience','$dedication', '$level','99999','99999','$crew','$crewtype','100','100','0', '0','0','0','$turntime','$killturn','$age','1', diff --git a/twe/event_3.php b/twe/event_3.php index efa21c73..bc3b9a1f 100644 --- a/twe/event_3.php +++ b/twe/event_3.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; +$query = "select userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -68,7 +68,6 @@ echo ""; function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { $name = "ⓝ".$name; - $genid = "npc{$gencount}"; $turntime = getRandTurn($turnterm); $personal = CharCall($personal); $special = SpecCall($special); @@ -91,18 +90,17 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ $dex20 = rand() % 18000; $dex30 = rand() % 18000; $dex40 = rand() % 18000; - $pw = md5("18071807"); //장수 @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + npcid,npc,npc_org,npcmatch,name,picture,nation,city, leader,power,intel,experience,dedication, level,gold,rice,crew,crewtype,train,atmos,tnmt, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit, dex0, dex10, dex20, dex30, dex40 ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$gencount','$npc','$npc','$npcmatch','$name','$picture','$nation','$city', '$leader','$power','$intel','$experience','$dedication', '$level','1000','1000','$crew','$crewtype','100','100','0', '0','0','0','$turntime','$killturn','$age','1', diff --git a/twe/event_4.php b/twe/event_4.php index 784d33ac..7c03d64d 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -1,6 +1,9 @@ queryFirstField('select no from general where no_member = %i', $userID); + $generalID = $db->queryFirstField('select no from general where owner = %i', $userID); if(!$generalID && $forceExit){ header('Location:..'); die(); @@ -76,7 +76,7 @@ function getGeneralID($forceExit=false){ //로그인으로 처리 //XXX: 'get' 함수인데 update가 들어가있다. //TODO: 조금더 적절한 형태의 로그인 카운트를 생각해볼 것 - $query=$db->query("update general set logcnt=logcnt+1 ,ip = %s_ip,lastconnect=%s_lastConnect,conmsg=%s_conmsg where user_id= %s_userID",[ + $query=$db->query("update general set logcnt=logcnt+1 ,ip = %s_ip,lastconnect=%s_lastConnect,conmsg=%s_conmsg where owner= %s_userID",[ 'ip' => getenv("REMOTE_ADDR"), 'lastConnect' => date('Y-m-d H:i:s'), 'conmsg' => util::array_get($_SESSION['conmsg'], ''), @@ -685,7 +685,7 @@ function getCoreTurn($connect, $nation, $level) { function cityInfo($connect) { global $_basecolor, $_basecolor2, $images; - $query = "select no,city,skin from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,city,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -802,7 +802,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 no_member='{$_SESSION['noMember']}'"; + $query = "select skin,no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -988,7 +988,7 @@ function commandTable($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1226,7 +1226,7 @@ function CoreCommandTable($connect) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,city,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation,city,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1316,7 +1316,7 @@ function CoreCommandTable($connect) { } function myInfo($connect) { - $query = "select no,skin from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1330,7 +1330,7 @@ function generalInfo($connect, $no, $skin) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select skin from general where no_member='{$_SESSION['noMember']}'"; + $query = "select skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1520,7 +1520,7 @@ function generalInfo($connect, $no, $skin) { } function myInfo2($connect) { - $query = "select no,skin from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1946,7 +1946,7 @@ function onlineNation($connect) { } function nationMsg($connect) { - $query = "select no,nation,skin from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation,skin from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2315,7 +2315,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); if(!util::array_get($_SESSION['noMember'], null)) { - $query = sprintf("update general set lastrefresh='%s',con=con+'%d',connect=connect+'%d',refcnt=refcnt+'%d',refresh=refresh+'%d' where no_member='%d'", + $query = sprintf("update general set lastrefresh='%s',con=con+'%d',connect=connect+'%d',refcnt=refcnt+'%d',refresh=refresh+'%d' where owner='%d'", $date,$cnt,$cnt,$cnt,$cnt,$_SESSION['noMember']); MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -3185,11 +3185,9 @@ function updateTurntime($connect, $no) { if($general['killturn'] <= 0) { // npc유저 삭턴시 npc로 전환 if($general['npc'] == 1 && $general['deadyear'] > $admin['year']) { - $npcid = "gen" . $general['npcid']; - $pw = md5("18071807"); $general['killturn'] = ($general['deadyear'] - $admin['year']) * 12; $general['npc'] = $general['npc_org']; - $query = "update general set user_id='$npcid',password='$pw',npc='{$general['npc']}',killturn='{$general['killturn']}',mode=2 where no='$no'"; + $query = "update general set owner=-1,npc='{$general['npc']}',killturn='{$general['killturn']}',mode=2 where no='$no'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $alllog[0] = "●{$admin['month']}월:{$general['name2']}(이)가 {$general['name']}의 육체에서 유체이탈합니다!"; @@ -4353,7 +4351,7 @@ function getAdmin($connect) { } function getMe($connect) { - $query = "select * from general where no_member='{$_SESSION['noMember']}'"; + $query = "select * from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("접속자가 많아 접속을 중단합니다. 잠시후 갱신해주세요.
getMe : ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -4753,7 +4751,7 @@ function command_Single($connect, $turn, $command) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$command}'"; } - $query = "update general set {$str} where no_member='{$_SESSION['noMember']}'"; + $query = "update general set {$str} where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; echo 'commandlist.php';//TODO:debug all and replace @@ -4763,7 +4761,7 @@ function command_Single($connect, $turn, $command) { function command_Chief($connect, $turn, $command) { $command = EncodeCommand(0, 0, 0, $command); - $query = "select nation,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/func_map.php b/twe/func_map.php index 2aa49146..dd1c858e 100644 --- a/twe/func_map.php +++ b/twe/func_map.php @@ -61,7 +61,7 @@ function getWorldMap($req){ if($generalID && ($req->showMe || $req->neutralView)){ $city = $db->queryFirstRow( - 'select `city`, `nation` from `general` where `user_id`=%i', + 'select `city`, `nation` from `general` where `no`=%i', $generalID); $myCity = toInt($city['city']); diff --git a/twe/func_message.php b/twe/func_message.php index e33c2573..8832b34a 100644 --- a/twe/func_message.php +++ b/twe/func_message.php @@ -207,12 +207,12 @@ function getMailboxList(){ } function genList($connect) { - $query = "select no,nation,level,msgindex,userlevel from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation,level,msgindex,userlevel from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); $you = []; - $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where no_member='{$_SESSION['noMember']}'"; + $query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $reply = MYDB_fetch_array($result); if($reply['type'] % 100 == 9) { @@ -274,7 +274,7 @@ function genList($connect) { echo " "; - $query = "select no,name,npc from general where nation=0 and no_member!='{$_SESSION['noMember']}' and npc<2 order by npc,binary(name)"; + $query = "select no,name,npc from general where nation=0 and owner!='{$_SESSION['noMember']}' and npc<2 order by npc,binary(name)"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($result); for($i=0; $i < $gencount; $i++) { @@ -296,7 +296,7 @@ function genList($connect) { echo " "; - $query = "select no,name,npc,level from general where nation='{$nation['nation']}' and no_member!='{$_SESSION['noMember']}' and npc<2 order by npc,binary(name)"; + $query = "select no,name,npc,level from general where nation='{$nation['nation']}' and owner!='{$_SESSION['noMember']}' and npc<2 order by npc,binary(name)"; $genresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $gencount = MYDB_num_rows($genresult); for($j=0; $j < $gencount; $j++) { @@ -350,7 +350,7 @@ function MsgFile($skin, $bg, $nation=0, $level=0) { // type : xx,xx(불가침기간,타입) // who : xxxx,xxxx(발신인, 수신인) function DecodeMsg($connect, $msg, $type, $who, $date, $bg, $num=0) { - $query = "select skin,no,nation,name,picture,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select skin,no,nation,name,picture,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -416,7 +416,7 @@ function MsgMe($connect, $bg) { msg0_type,msg1_type,msg2_type,msg3_type,msg4_type,msg5_type,msg6_type,msg7_type,msg8_type,msg9_type, msg0_who,msg1_who,msg2_who,msg3_who,msg4_who,msg5_who,msg6_who,msg7_who,msg8_who,msg9_who, msg0_when,msg1_when,msg2_when,msg3_when,msg4_when,msg5_when,msg6_when,msg7_when,msg8_when,msg9_when - from general where no_member='{$_SESSION['noMember']}'"; + from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -438,7 +438,7 @@ function moveMsg($connect, $table, $msgtype, $msgnum, $msg, $type, $who, $when, } function MsgDip($connect, $bg) { - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/func_npc.php b/twe/func_npc.php index 965d40d7..7d28b47f 100644 --- a/twe/func_npc.php +++ b/twe/func_npc.php @@ -55,7 +55,6 @@ function RegGeneral($connect,$init,$life,$fiction,$turnterm,$startyear,$year,$ge $connect ) or Error(__LINE__.MYDB_error($connect),""); } elseif($year == $bornyear+14 && $year < $deadyear) { - $genid = "gen{$gencount}"; $query = "select no from general where npcid='$gencount'"; $result = MYDB_query($query, $connect) or Error("func_npc ".MYDB_error($connect),""); @@ -77,17 +76,16 @@ function RegGeneral($connect,$init,$life,$fiction,$turnterm,$startyear,$year,$ge $killturn = ($deadyear - $year) * 12 + (rand() % 12); $experience = $age * 100; $dedication = $age * 100; - $pw = md5("18071807"); //장수 @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city,leader,power,intel, + npcid,npc,npc_org,npcmatch,name,picture,nation,city,leader,power,intel, experience,dedication,level,gold,rice,crew,crewtype,train,atmos, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit,bornyear,deadyear ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','0', + '$gencount','$npc','$npc','$npcmatch','$name','$picture','0', '$city','$leader','$power','$intel','$experience','$dedication', '0','1000','1000','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1', diff --git a/twe/func_process.php b/twe/func_process.php index f37c740b..915bccf2 100644 --- a/twe/func_process.php +++ b/twe/func_process.php @@ -2069,8 +2069,6 @@ function process_29($connect, &$general) { $npcid = $admin['npccount']; $npccount = 10000 + $npcid; $npcmatch = rand() % 150 + 1; - $genid = "gen{$npccount}"; - $pw = md5("18071807"); $picture = 'default.jpg'; $turntime = getRandTurn($admin['turnterm']); $personal = rand() % 10; @@ -2086,14 +2084,14 @@ function process_29($connect, &$general) { @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation, + npcid,npc,npc_org,npcmatch,name,picture,nation, city,leader,power,intel,experience,dedication, level,gold,rice,crew,crewtype,train,atmos,tnmt, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit,bornyear,deadyear, dex0, dex10, dex20, dex30, dex40 ) values ( - '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$scoutNation', + '$npccount','$npc','$npc','$npcmatch','$name','$picture','$scoutNation', '{$general['city']}','$leader','$power','$intel','{$avgGen['exp']}','{$avgGen['ded']}', '$scoutLevel','100','100','0','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1','$personal','0','$specage','0','$specage2','', @@ -5890,8 +5888,6 @@ function process_76($connect, &$general) { $npccount = 10000 + $npcid; $npcmatch = rand() % 150 + 1; - $genid = "gen{$npccount}"; - $pw = md5("18071807"); $name = "ⓖ의병장{$npcid}"; $picture = 'default.jpg'; $turntime = getRandTurn($admin['turnterm']); @@ -5902,14 +5898,14 @@ function process_76($connect, &$general) { @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation, + npcid,npc,npc_org,npcmatch,name,picture,nation, city,leader,power,intel,experience,dedication, level,gold,rice,crew,crewtype,train,atmos,tnmt, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit,bornyear,deadyear, dex0, dex10, dex20, dex30, dex40 ) values ( - '$npccount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','{$nation['nation']}', + '$npccount','$npc','$npc','$npcmatch','$name','$picture','{$nation['nation']}', '{$general['city']}','$leader','$power','$intel','{$avgGen['exp']}','{$avgGen['ded']}', '1','100','100','0','0','0','0','0', '0','0','0','$turntime','$killturn','{$avgGen['age']}','1','$personal','0','0','0','0','', diff --git a/twe/func_template.php b/twe/func_template.php index 95d5e41f..57d31a08 100644 --- a/twe/func_template.php +++ b/twe/func_template.php @@ -94,7 +94,7 @@ function commandButton() { } $db = getDB(); - $me = $db->queryFirstRow("select skin,no,nation,level,belong from general where user_id=%i", $generalID); + $me = $db->queryFirstRow("select skin,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 ac30d9a6..81cfdab1 100644 --- a/twe/index.php +++ b/twe/index.php @@ -21,7 +21,7 @@ if(!$userID){ die(); } -$me = $db->queryFirstRow('select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id = %s', $userID); +$me = $db->queryFirstRow('select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where owner = %i', $userID); //그새 사망이면 if($me === null) { @@ -31,13 +31,13 @@ if($me === null) { } if($me['newmsg'] == 1 && $me['newvote'] == 1) { - $query = "update general set newmsg=0,newvote=0 where no_member='{$_SESSION['noMember']}'"; + $query = "update general set newmsg=0,newvote=0 where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['newmsg'] == 1) { - $query = "update general set newmsg=0 where no_member='{$_SESSION['noMember']}'"; + $query = "update general set newmsg=0 where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['newvote'] == 1) { - $query = "update general set newvote=0 where no_member='{$_SESSION['noMember']}'"; + $query = "update general set newvote=0 where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/install2_ok.php b/twe/install2_ok.php index 38ee8f50..818a6551 100644 --- a/twe/install2_ok.php +++ b/twe/install2_ok.php @@ -53,7 +53,7 @@ if($img < 1) { $picture = 'default.jpg'; }; @MYDB_query(" insert into general ( - no_member, connect, name, picture, nation, city, troop, makelimit, + owner, connect, name, picture, nation, city, troop, makelimit, leader, power, intel, experience, dedication, gold, rice, crew, train, atmos, weap, book, level, turntime, killturn, lastconnect, userlevel ) values ( @@ -70,7 +70,7 @@ if($img < 1) { $picture = 'default.jpg'; }; //부운영자는 비밀번호를 지정하지 않아 로그인할수 없도록 처리한다. @MYDB_query(" insert into general ( - no_member, connect, name, picture, nation, city, troop, makelimit, + owner, connect, name, picture, nation, city, troop, makelimit, leader, power, intel, experience, dedication, gold, rice, crew, train, atmos, weap, book, level, turntime, killturn, lastconnect, userlevel ) values ( diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index b9aeb05b..b28ac316 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -48,7 +48,7 @@ if(getBlockLevel() == 1 || getBlockLevel() == 3) { $conlimit = $db->queryFirstField('select conlimit from game where no=1'); -$me = $db->queryFirstRow('select `no`,`name`,`nation`,`level`,`msgindex`,`userlevel`,`con`,`picture`,`imgsvr` from `general` where `no_member` = %i', getUserID()); +$me = $db->queryFirstRow('select `no`,`name`,`nation`,`level`,`msgindex`,`userlevel`,`con`,`picture`,`imgsvr` from `general` where `owner` = %i', getUserID()); if(!$me){ resetSessionGeneralValues(); @@ -147,7 +147,7 @@ if($destMailbox == 9999) { } - $destUser = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s',$destMailbox); + $destUser = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `no` = %s',$destMailbox); if($destUser == NULL || empty($destUser)){ returnJson([ diff --git a/twe/join_post.php b/twe/join_post.php index ad237167..1dcf6b66 100644 --- a/twe/join_post.php +++ b/twe/join_post.php @@ -43,7 +43,7 @@ $db = getDB(); $admin = $db->queryFirstRow("select year,month,scenario,maxgeneral,turnterm,genius,img from game where no='1'"); $gencount = $db->queryFirstField("select count(no) from general where npc<2"); -$id_num = $db->queryFirstField("select count(no) from general where no_member= %i", $userID); +$id_num = $db->queryFirstField("select count(no) from general where owner= %i", $userID); $name_num = $db->queryFirstField("select count(no) from general where name= %s", $name); if($id_num) { @@ -189,7 +189,7 @@ if($id_num) { ########## 회원정보 테이블에 입력값을 등록한다. ########## $db->insert('general', [ - 'no_member' => $userID, + 'owner' => $userID, 'name' => $name, 'picture' => $face, 'imgsvr' => $imgsvr, @@ -222,13 +222,13 @@ if($id_num) { 'special2' => $special2 ]); - $me = $db->queryFirstRow("select no,name,history from general where no_member= %i", $userID); + $me = $db->queryFirstRow("select no,name,history from general where owner= %i", $userID); if($me['name'] == "") { $r = rand() % 999 + 1; $me['name'] = '장수-'.$r; - $db->query("update general set name=%s where no_member=%i", $me['name'], $userID); + $db->query("update general set name=%s where owner=%i", $me['name'], $userID); } $cityname = getCity($connect, $city, "name"); if($genius == 1) { diff --git a/twe/login_process.php b/twe/login_process.php index e73b513b..9e20cb51 100644 --- a/twe/login_process.php +++ b/twe/login_process.php @@ -11,7 +11,7 @@ $db = getDB(); $userID = getUserID(); //회원 테이블에서 정보확인 -$me= $db->queryFirstRow('select no,name,nation,block,killturn from general where no_member= %s', $userID); +$me= $db->queryFirstRow('select no,name,nation,block,killturn from general where owner= %s', $userID); $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -42,7 +42,7 @@ $_SESSION['p_time'] = time(); $date = date('Y-m-d H:i:s'); // -$query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where no_member='{$_SESSION['noMember']}'"; +$query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $date = date('Y_m_d H:i:s'); diff --git a/twe/msglist.php b/twe/msglist.php index 44896c98..8a1b43ab 100644 --- a/twe/msglist.php +++ b/twe/msglist.php @@ -18,7 +18,7 @@ $connect = dbconn(); window.top.location.replace('./');"; diff --git a/twe/preprocessing.php b/twe/preprocessing.php index 584b51b7..39d49dd3 100644 --- a/twe/preprocessing.php +++ b/twe/preprocessing.php @@ -10,7 +10,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 no,name,nation,userlevel,con from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,userlevel,con from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/processing.php b/twe/processing.php index 42a9a4e2..5978a30d 100644 --- a/twe/processing.php +++ b/twe/processing.php @@ -170,7 +170,7 @@ function ender($type=0) { } function command_99($connect, $turn) { - $query = "select nation,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -234,7 +234,7 @@ function command_11($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -667,7 +667,7 @@ function command_12($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("command_12 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1096,7 +1096,7 @@ function calc(cost, formnum) { function command_15($connect, $turn, $command) { starter("재편성"); - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); $me = $general['no']; @@ -1137,7 +1137,7 @@ function command_15($connect, $turn, $command) { function command_16($connect, $turn, $command) { starter("출병"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1176,7 +1176,7 @@ function command_16($connect, $turn, $command) { function command_21($connect, $turn, $command) { starter("이동"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1217,7 +1217,7 @@ function command_22($connect, $turn, $command) { die('비활성화됨');//TODO:등용장 대 디자인 starter("등용"); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1282,7 +1282,7 @@ function command_22($connect, $turn, $command) { function command_23($connect, $turn, $command) { starter("포상", 1); - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1352,7 +1352,7 @@ function command_23($connect, $turn, $command) { function command_24($connect, $turn, $command) { starter("몰수", 1); - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1430,7 +1430,7 @@ function command_25($connect, $turn, $command) { $result = MYDB_query($query, $connect) or Error("command_46 ".MYDB_error($connect),""); $admin = MYDB_fetch_array($result); - $query = "select no,nations from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nations from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1500,7 +1500,7 @@ function command_25($connect, $turn, $command) { function command_27($connect, $turn, $command) { starter("발령", 1); - $query = "select no,nation,level from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation,level from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1555,7 +1555,7 @@ function command_27($connect, $turn, $command) { function command_30($connect, $turn, $command) { starter("강행"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1596,7 +1596,7 @@ ender(); function command_31($connect, $turn, $command) { starter("첩보"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1640,7 +1640,7 @@ function command_31($connect, $turn, $command) { function command_32($connect, $turn, $command) { starter("화계"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1679,7 +1679,7 @@ function command_32($connect, $turn, $command) { function command_33($connect, $turn, $command) { starter("탈취"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1718,7 +1718,7 @@ function command_33($connect, $turn, $command) { function command_34($connect, $turn, $command) { starter("파괴"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1757,7 +1757,7 @@ function command_34($connect, $turn, $command) { function command_35($connect, $turn, $command) { starter("선동"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1796,7 +1796,7 @@ function command_35($connect, $turn, $command) { function command_36($connect, $turn, $command) { starter("기습"); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -1835,7 +1835,7 @@ function command_36($connect, $turn, $command) { function command_43($connect, $turn, $command) { starter("증여"); - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2048,7 +2048,7 @@ function command_46($connect, $turn, $command) { function command_48($connect, $turn, $command) { starter("장비 매매"); - $query = "select no,city,gold from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,city,gold from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("command_48 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); $city = getCity($connect, $me['city'], "secu"); @@ -2158,7 +2158,7 @@ function command_49($connect, $turn, $command) { function command_51($connect, $turn, $command) { starter("항복 권고", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2209,7 +2209,7 @@ function command_51($connect, $turn, $command) { function command_52($connect, $turn, $command) { starter("원조", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2290,7 +2290,7 @@ function command_52($connect, $turn, $command) { function command_53($connect, $turn, $command) { starter("통합제의", 1); - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("command_53 ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2354,7 +2354,7 @@ function command_53($connect, $turn, $command) { function command_54($connect, $turn, $command) { starter("선양"); - $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select no,nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2398,7 +2398,7 @@ function command_54($connect, $turn, $command) { function command_61($connect, $turn, $command) { starter("불가침", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2479,7 +2479,7 @@ function command_61($connect, $turn, $command) { function command_62($connect, $turn, $command) { starter("선전포고", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2544,7 +2544,7 @@ function command_62($connect, $turn, $command) { function command_63($connect, $turn, $command) { starter("종전", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2600,7 +2600,7 @@ function command_63($connect, $turn, $command) { function command_64($connect, $turn, $command) { starter("파기", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2655,7 +2655,7 @@ function command_64($connect, $turn, $command) { function command_65($connect, $turn, $command) { starter("초토화", 1); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2691,7 +2691,7 @@ echo "
function command_66($connect, $turn, $command) { starter("천도", 1); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2728,7 +2728,7 @@ echo "
function command_67($connect, $turn, $command) { starter("증축", 1); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2765,7 +2765,7 @@ echo "
function command_68($connect, $turn, $command) { starter("감축", 1); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2802,7 +2802,7 @@ echo "
function command_72($connect, $turn, $command) { starter("백성동원", 1); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2839,7 +2839,7 @@ echo "
function command_73($connect, $turn, $command) { starter("수몰", 1); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2876,7 +2876,7 @@ echo "
function command_74($connect, $turn, $command) { starter("허보", 1); - $query = "select city from general where no_member='{$_SESSION['noMember']}'"; + $query = "select city from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $general = MYDB_fetch_array($result); @@ -2914,7 +2914,7 @@ echo "
function command_75($connect, $turn, $command) { starter("피장파장", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2971,7 +2971,7 @@ function command_75($connect, $turn, $command) { function command_77($connect, $turn, $command) { starter("이호경식", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -3028,7 +3028,7 @@ function command_77($connect, $turn, $command) { function command_78($connect, $turn, $command) { starter("급습", 1); - $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; + $query = "select nation from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/scenario_22.php b/twe/scenario_22.php index 3e6fb3c3..3858bf60 100644 --- a/twe/scenario_22.php +++ b/twe/scenario_22.php @@ -118,7 +118,6 @@ echo 'install3_ok.php';//TODO:debug all and replace function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { $name = "ⓝ".$name; - $genid = "gen{$gencount}"; $turntime = getRandTurn($turnterm); $personal = CharCall($personal); $special = SpecCall($special); @@ -134,17 +133,16 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p $npc = 2; $npcmatch = rand()%150 + 1; $picture = 'default.jpg'; - $pw = md5("18071807"); //장수 @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + npcid,npc,npc_org,npcmatch,name,picture,nation,city, leader,power,intel,experience,dedication, level,gold,rice,crew,crewtype,train,atmos, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','0', + '$gencount','$npc','$npc','$npcmatch','$name','$picture','0', '$city','$leader','$power','$intel','$experience','$dedication', '0','1000','1000','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1', @@ -153,6 +151,7 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p )", $connect ) or Error(__LINE__.MYDB_error($connect),""); + //FIXME: insert 쿼리 이후 insertedID를 받아서 처리하는게 낫다. //방랑군 if(rand()%20 == 0) { @MYDB_query(" @@ -169,7 +168,7 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nation = MYDB_fetch_array($result); // 군주로 // 현 국가 소속으로 - $query = "update general set belong=1,level=12,nation='{$nation['nation']}' where user_id='$genid'"; + $query = "update general set belong=1,level=12,nation='{$nation['nation']}' where npcid='$gencount'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //외교 추가 $query = "select nation from nation where nation!='{$nation['nation']}'"; diff --git a/twe/scenario_24.php b/twe/scenario_24.php index d0f9e671..fa24b9d8 100644 --- a/twe/scenario_24.php +++ b/twe/scenario_24.php @@ -250,7 +250,6 @@ echo 'install3_ok.php';//TODO:debug all and replace function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$personal,$special,$msg="") { $name = "ⓝ".$name; - $genid = "gen{$gencount}"; $turntime = getRandTurn($turnterm); $personal = CharCall($personal); $special = SpecCall($special); @@ -266,17 +265,16 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p $npc = 2; $npcmatch = rand()%150 + 1; $picture = 'default.jpg'; - $pw = md5("18071807"); //장수 @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,level,city, + npcid,npc,npc_org,npcmatch,name,picture,nation,level,city, leader,power,intel,experience,dedication, gold,rice,crew,crewtype,train,atmos, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','1','1','$city', + '$gencount','$npc','$npc','$npcmatch','$name','$picture','1','1','$city', '$leader','$power','$intel','$experience','$dedication', '2000','2000','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1', @@ -289,7 +287,6 @@ function RegGeneral2($connect,$turnterm,$gencount,$name,$leader,$power,$intel,$p function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$power,$intel,$personal,$special,$msg="") { $name = "ⓝ".$name; - $genid = "npc{$gencount}"; $turntime = getRandTurn($turnterm); $personal = CharCall($personal); $special = SpecCall($special); @@ -305,17 +302,16 @@ function RegGeneral3($connect,$turnterm,$gencount,$nation,$level,$name,$leader,$ $npc = 2; $npcmatch = 999; $picture = 'default.jpg'; - $pw = md5("18071807"); //장수 @MYDB_query(" insert into general ( - npcid,npc,npc_org,npcmatch,user_id,password,name,picture,nation,city, + npcid,npc,npc_org,npcmatch,name,picture,nation,city, leader,power,intel,experience,dedication, level,gold,rice,crew,crewtype,train,atmos, weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg, makelimit ) values ( - '$gencount','$npc','$npc','$npcmatch','$genid','$pw','$name','$picture','$nation','$city', + '$gencount','$npc','$npc','$npcmatch','$name','$picture','$nation','$city', '$leader','$power','$intel','$experience','$dedication', '$level','2000','2000','0','0','0','0', '0','0','0','$turntime','$killturn','$age','1', diff --git a/twe/schema.php b/twe/schema.php index 8f233983..21c5e270 100644 --- a/twe/schema.php +++ b/twe/schema.php @@ -6,106 +6,208 @@ $general_schema = " - create table general ( - no int not null auto_increment, - user_id char(32) not null, - password char(32) not null, - conmsg char(255) default '', - npcmsg char(255) default '', - npcid int(5) default 0, - npc int(1) default 0, - npc_org int(1) default 0, - npcmatch int(3) default 0, - bornyear int(3) default 180, - deadyear int(3) default 300, - newmsg int(1) default 0, - con int(6) default 0, connect int(6) default 0, refresh int(6) default 0, - logcnt int(6) default 1, refcnt int(6) default 1, - picture char(32) not null, imgsvr int(1) default 0, - name char(32) not null, - name2 char(32) NULL DEFAULT NULL, - nation int(6) default 0, - nations char(64) default ',0,', - city int(6) default 0, - troop int(6) default 0, - leader int(3) default 0, leader2 int(3) default 0, - power int(3) default 0, power2 int(3) default 0, - intel int(3) default 0, intel2 int(3) default 0, - injury int(2) default 0, - experience int(6) default 0, dedication int(6) default 0, - dex0 int(8) default 0, dex10 int(8) default 0, - dex20 int(8) default 0, dex30 int(8) default 0, - dex40 int(8) default 0, - level int(2) default 0, - gold int(6) default 0, rice int(6) default 0, - crew int(5) default 0, crewtype int(2) default 0, - train int(3) default 0, atmos int(3) default 0, - weap int(2) default 0, book int(2) default 0, - horse int(2) default 0, item int(2) default 0, - turntime datetime, recwar datetime, - makenation char(255), makelimit int(2) default 24, - killturn int(3), - lastconnect datetime, lastrefresh datetime, - ip char(255) default '', - block int(1) default 0, - dedlevel int(2) default 0, explevel int(2) default 0, - firenum int(3) default 0, warnum int(3) default 0, - killnum int(3) default 0, deathnum int(3) default 0, - killcrew int(7) default 0, deathcrew int(7) default 0, - age int(3) default 20, startage int(3) default 20, - history text default '', - belong int(2) default 1, - betray int(2) default 0, - personal int(2) default 0, - special int(2) default 0, specage int(2) default 0, - special2 int(2) default 0, specage2 int(2) default 0, - skin int(3) default 1, - mode int(1) default 2, tnmt int(1) default 1, map int(1) default 0, - myset int(1) default 3, - userlevel int(1) default 1, - tournament int(1) default 0, - vote int(1) default 0, - newvote int(1) default 0, - - ttw int(4) default 0, ttd int(4) default 0, ttl int(4) default 0, ttg int(4) default 0, ttp int(4) default 0, - tlw int(4) default 0, tld int(4) default 0, tll int(4) default 0, tlg int(4) default 0, tlp int(4) default 0, - tpw int(4) default 0, tpd int(4) default 0, tpl int(4) default 0, tpg int(4) default 0, tpp int(4) default 0, - tiw int(4) default 0, tid int(4) default 0, til int(4) default 0, tig int(4) default 0, tip int(4) default 0, - - bet0 int(8) default 0, bet1 int(8) default 0, bet2 int(8) default 0, bet3 int(8) default 0, - bet4 int(8) default 0, bet5 int(8) default 0, bet6 int(8) default 0, bet7 int(8) default 0, - bet8 int(8) default 0, bet9 int(8) default 0, bet10 int(8) default 0, bet11 int(8) default 0, - bet12 int(8) default 0, bet13 int(8) default 0, bet14 int(8) default 0, bet15 int(8) default 0, - betwin int(8) default 0, betgold int(8) default 0, betwingold int(8) default 0, - - term int(4) default 0, - turn0 char(14) default '00000000000000', turn1 char(14) default '00000000000000', turn2 char(14) default '00000000000000', - turn3 char(14) default '00000000000000', turn4 char(14) default '00000000000000', turn5 char(14) default '00000000000000', - turn6 char(14) default '00000000000000', turn7 char(14) default '00000000000000', turn8 char(14) default '00000000000000', - turn9 char(14) default '00000000000000', turn10 char(14) default '00000000000000', turn11 char(14) default '00000000000000', - turn12 char(14) default '00000000000000', turn13 char(14) default '00000000000000', turn14 char(14) default '00000000000000', - turn15 char(14) default '00000000000000', turn16 char(14) default '00000000000000', turn17 char(14) default '00000000000000', - turn18 char(14) default '00000000000000', turn19 char(14) default '00000000000000', turn20 char(14) default '00000000000000', - turn21 char(14) default '00000000000000', turn22 char(14) default '00000000000000', turn23 char(14) default '00000000000000', - recturn char(14) default '', resturn char(14) default '', - msg0 char(150) default '', msg0_type int(4) default 0, msg0_who int(9) default 0, msg0_when datetime, - msg1 char(150) default '', msg1_type int(4) default 0, msg1_who int(9) default 0, msg1_when datetime, - msg2 char(150) default '', msg2_type int(4) default 0, msg2_who int(9) default 0, msg2_when datetime, - msg3 char(150) default '', msg3_type int(4) default 0, msg3_who int(9) default 0, msg3_when datetime, - msg4 char(150) default '', msg4_type int(4) default 0, msg4_who int(9) default 0, msg4_when datetime, - msg5 char(150) default '', msg5_type int(4) default 0, msg5_who int(9) default 0, msg5_when datetime, - msg6 char(150) default '', msg6_type int(4) default 0, msg6_who int(9) default 0, msg6_when datetime, - msg7 char(150) default '', msg7_type int(4) default 0, msg7_who int(9) default 0, msg7_when datetime, - msg8 char(150) default '', msg8_type int(4) default 0, msg8_who int(9) default 0, msg8_when datetime, - msg9 char(150) default '', msg9_type int(4) default 0, msg9_who int(9) default 0, msg9_when datetime, - msgindex int(2) default 9, - - PRIMARY KEY (no), - KEY (user_id), - KEY (nation), - KEY (city), - KEY (turntime) - ) ENGINE=INNODB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=UTF8 +CREATE TABLE `general` ( + `no` INT(11) NOT NULL AUTO_INCREMENT, + `owner` INT(11) NOT NULL DEFAULT '-1', + `conmsg` CHAR(255) NOT NULL DEFAULT '', + `npcmsg` CHAR(255) NULL DEFAULT '', + `npcid` INT(5) NULL DEFAULT '0', + `npc` INT(1) NULL DEFAULT '0', + `npc_org` INT(1) NULL DEFAULT '0', + `npcmatch` INT(3) NULL DEFAULT '0', + `bornyear` INT(3) NULL DEFAULT '180', + `deadyear` INT(3) NULL DEFAULT '300', + `newmsg` INT(1) NULL DEFAULT '0', + `con` INT(6) NULL DEFAULT '0', + `connect` INT(6) NULL DEFAULT '0', + `refresh` INT(6) NULL DEFAULT '0', + `logcnt` INT(6) NULL DEFAULT '1', + `refcnt` INT(6) NULL DEFAULT '1', + `picture` CHAR(32) NOT NULL, + `imgsvr` INT(1) NULL DEFAULT '0', + `name` CHAR(32) NOT NULL, + `name2` CHAR(32) NULL DEFAULT NULL, + `nation` INT(6) NULL DEFAULT '0', + `nations` CHAR(64) NULL DEFAULT ',0,', + `city` INT(6) NULL DEFAULT '0', + `troop` INT(6) NULL DEFAULT '0', + `leader` INT(3) NULL DEFAULT '0', + `leader2` INT(3) NULL DEFAULT '0', + `power` INT(3) NULL DEFAULT '0', + `power2` INT(3) NULL DEFAULT '0', + `intel` INT(3) NULL DEFAULT '0', + `intel2` INT(3) NULL DEFAULT '0', + `injury` INT(2) NULL DEFAULT '0', + `experience` INT(6) NULL DEFAULT '0', + `dedication` INT(6) NULL DEFAULT '0', + `dex0` INT(8) NULL DEFAULT '0', + `dex10` INT(8) NULL DEFAULT '0', + `dex20` INT(8) NULL DEFAULT '0', + `dex30` INT(8) NULL DEFAULT '0', + `dex40` INT(8) NULL DEFAULT '0', + `level` INT(2) NULL DEFAULT '0', + `gold` INT(6) NULL DEFAULT '0', + `rice` INT(6) NULL DEFAULT '0', + `crew` INT(5) NULL DEFAULT '0', + `crewtype` INT(2) NULL DEFAULT '0', + `train` INT(3) NULL DEFAULT '0', + `atmos` INT(3) NULL DEFAULT '0', + `weap` INT(2) NULL DEFAULT '0', + `book` INT(2) NULL DEFAULT '0', + `horse` INT(2) NULL DEFAULT '0', + `item` INT(2) NULL DEFAULT '0', + `turntime` DATETIME NULL DEFAULT NULL, + `recwar` DATETIME NULL DEFAULT NULL, + `makenation` CHAR(255) NULL DEFAULT NULL, + `makelimit` INT(2) NULL DEFAULT '24', + `killturn` INT(3) NULL DEFAULT NULL, + `lastconnect` DATETIME NULL DEFAULT NULL, + `lastrefresh` DATETIME NULL DEFAULT NULL, + `ip` CHAR(255) NULL DEFAULT '', + `block` INT(1) NULL DEFAULT '0', + `dedlevel` INT(2) NULL DEFAULT '0', + `explevel` INT(2) NULL DEFAULT '0', + `firenum` INT(3) NULL DEFAULT '0', + `warnum` INT(3) NULL DEFAULT '0', + `killnum` INT(3) NULL DEFAULT '0', + `deathnum` INT(3) NULL DEFAULT '0', + `killcrew` INT(7) NULL DEFAULT '0', + `deathcrew` INT(7) NULL DEFAULT '0', + `age` INT(3) NULL DEFAULT '20', + `startage` INT(3) NULL DEFAULT '20', + `history` TEXT NULL DEFAULT '', + `belong` INT(2) NULL DEFAULT '1', + `betray` INT(2) NULL DEFAULT '0', + `personal` INT(2) NULL DEFAULT '0', + `special` INT(2) NULL DEFAULT '0', + `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', + `myset` INT(1) NULL DEFAULT '3', + `userlevel` INT(1) NULL DEFAULT '1', + `tournament` INT(1) NULL DEFAULT '0', + `vote` INT(1) NULL DEFAULT '0', + `newvote` INT(1) NULL DEFAULT '0', + `ttw` INT(4) NULL DEFAULT '0', + `ttd` INT(4) NULL DEFAULT '0', + `ttl` INT(4) NULL DEFAULT '0', + `ttg` INT(4) NULL DEFAULT '0', + `ttp` INT(4) NULL DEFAULT '0', + `tlw` INT(4) NULL DEFAULT '0', + `tld` INT(4) NULL DEFAULT '0', + `tll` INT(4) NULL DEFAULT '0', + `tlg` INT(4) NULL DEFAULT '0', + `tlp` INT(4) NULL DEFAULT '0', + `tpw` INT(4) NULL DEFAULT '0', + `tpd` INT(4) NULL DEFAULT '0', + `tpl` INT(4) NULL DEFAULT '0', + `tpg` INT(4) NULL DEFAULT '0', + `tpp` INT(4) NULL DEFAULT '0', + `tiw` INT(4) NULL DEFAULT '0', + `tid` INT(4) NULL DEFAULT '0', + `til` INT(4) NULL DEFAULT '0', + `tig` INT(4) NULL DEFAULT '0', + `tip` INT(4) NULL DEFAULT '0', + `bet0` INT(8) NULL DEFAULT '0', + `bet1` INT(8) NULL DEFAULT '0', + `bet2` INT(8) NULL DEFAULT '0', + `bet3` INT(8) NULL DEFAULT '0', + `bet4` INT(8) NULL DEFAULT '0', + `bet5` INT(8) NULL DEFAULT '0', + `bet6` INT(8) NULL DEFAULT '0', + `bet7` INT(8) NULL DEFAULT '0', + `bet8` INT(8) NULL DEFAULT '0', + `bet9` INT(8) NULL DEFAULT '0', + `bet10` INT(8) NULL DEFAULT '0', + `bet11` INT(8) NULL DEFAULT '0', + `bet12` INT(8) NULL DEFAULT '0', + `bet13` INT(8) NULL DEFAULT '0', + `bet14` INT(8) NULL DEFAULT '0', + `bet15` INT(8) NULL DEFAULT '0', + `betwin` INT(8) NULL DEFAULT '0', + `betgold` INT(8) NULL DEFAULT '0', + `betwingold` INT(8) NULL DEFAULT '0', + `term` INT(4) NULL DEFAULT '0', + `turn0` CHAR(14) NULL DEFAULT '00000000000000', + `turn1` CHAR(14) NULL DEFAULT '00000000000000', + `turn2` CHAR(14) NULL DEFAULT '00000000000000', + `turn3` CHAR(14) NULL DEFAULT '00000000000000', + `turn4` CHAR(14) NULL DEFAULT '00000000000000', + `turn5` CHAR(14) NULL DEFAULT '00000000000000', + `turn6` CHAR(14) NULL DEFAULT '00000000000000', + `turn7` CHAR(14) NULL DEFAULT '00000000000000', + `turn8` CHAR(14) NULL DEFAULT '00000000000000', + `turn9` CHAR(14) NULL DEFAULT '00000000000000', + `turn10` CHAR(14) NULL DEFAULT '00000000000000', + `turn11` CHAR(14) NULL DEFAULT '00000000000000', + `turn12` CHAR(14) NULL DEFAULT '00000000000000', + `turn13` CHAR(14) NULL DEFAULT '00000000000000', + `turn14` CHAR(14) NULL DEFAULT '00000000000000', + `turn15` CHAR(14) NULL DEFAULT '00000000000000', + `turn16` CHAR(14) NULL DEFAULT '00000000000000', + `turn17` CHAR(14) NULL DEFAULT '00000000000000', + `turn18` CHAR(14) NULL DEFAULT '00000000000000', + `turn19` CHAR(14) NULL DEFAULT '00000000000000', + `turn20` CHAR(14) NULL DEFAULT '00000000000000', + `turn21` CHAR(14) NULL DEFAULT '00000000000000', + `turn22` CHAR(14) NULL DEFAULT '00000000000000', + `turn23` CHAR(14) NULL DEFAULT '00000000000000', + `recturn` CHAR(14) NULL DEFAULT '', + `resturn` CHAR(14) NULL DEFAULT '', + `msg0` CHAR(150) NULL DEFAULT '', + `msg0_type` INT(4) NULL DEFAULT '0', + `msg0_who` INT(9) NULL DEFAULT '0', + `msg0_when` DATETIME NULL DEFAULT NULL, + `msg1` CHAR(150) NULL DEFAULT '', + `msg1_type` INT(4) NULL DEFAULT '0', + `msg1_who` INT(9) NULL DEFAULT '0', + `msg1_when` DATETIME NULL DEFAULT NULL, + `msg2` CHAR(150) NULL DEFAULT '', + `msg2_type` INT(4) NULL DEFAULT '0', + `msg2_who` INT(9) NULL DEFAULT '0', + `msg2_when` DATETIME NULL DEFAULT NULL, + `msg3` CHAR(150) NULL DEFAULT '', + `msg3_type` INT(4) NULL DEFAULT '0', + `msg3_who` INT(9) NULL DEFAULT '0', + `msg3_when` DATETIME NULL DEFAULT NULL, + `msg4` CHAR(150) NULL DEFAULT '', + `msg4_type` INT(4) NULL DEFAULT '0', + `msg4_who` INT(9) NULL DEFAULT '0', + `msg4_when` DATETIME NULL DEFAULT NULL, + `msg5` CHAR(150) NULL DEFAULT '', + `msg5_type` INT(4) NULL DEFAULT '0', + `msg5_who` INT(9) NULL DEFAULT '0', + `msg5_when` DATETIME NULL DEFAULT NULL, + `msg6` CHAR(150) NULL DEFAULT '', + `msg6_type` INT(4) NULL DEFAULT '0', + `msg6_who` INT(9) NULL DEFAULT '0', + `msg6_when` DATETIME NULL DEFAULT NULL, + `msg7` CHAR(150) NULL DEFAULT '', + `msg7_type` INT(4) NULL DEFAULT '0', + `msg7_who` INT(9) NULL DEFAULT '0', + `msg7_when` DATETIME NULL DEFAULT NULL, + `msg8` CHAR(150) NULL DEFAULT '', + `msg8_type` INT(4) NULL DEFAULT '0', + `msg8_who` INT(9) NULL DEFAULT '0', + `msg8_when` DATETIME NULL DEFAULT NULL, + `msg9` CHAR(150) NULL DEFAULT '', + `msg9_type` INT(4) NULL DEFAULT '0', + `msg9_who` INT(9) NULL DEFAULT '0', + `msg9_when` DATETIME NULL DEFAULT NULL, + `msgindex` INT(2) NULL DEFAULT '9', + PRIMARY KEY (`no`), + INDEX `nation` (`nation`), + INDEX `city` (`city`), + INDEX `turntime` (`turntime`, `no`), + INDEX `owner` (`owner`) +) +COLLATE='utf8_general_ci' +ENGINE=InnoDB +ROW_FORMAT=DYNAMIC "; diff --git a/twe/select_npc.php b/twe/select_npc.php index 82dfb3e4..e49f01cc 100644 --- a/twe/select_npc.php +++ b/twe/select_npc.php @@ -3,9 +3,9 @@ include "lib.php"; include "func.php"; $connect = dbConn("sammo"); - +$userID = getUserID(); //회원 테이블에서 정보확인 -$query = "select no,name,picture,grade from MEMBER where id='$id' and pw='$pwTemp'"; +$query = "select no,name,picture,grade from MEMBER where no='$userID'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $member = MYDB_fetch_array($result); @@ -94,8 +94,7 @@ if($admin['img'] >= 3) { - - -a - - + header('Location:select_npc.php'); +} \ No newline at end of file diff --git a/twe/turn.php b/twe/turn.php index 8e4eaffc..0f1e8f04 100644 --- a/twe/turn.php +++ b/twe/turn.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 no,name,nation,msgindex,userlevel,con from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no,name,nation,msgindex,userlevel,con from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -35,7 +35,7 @@ case 0: if($k >= 24) break; $query .= ","; } - $query .= " where no_member='{$_SESSION['noMember']}'"; + $query .= " where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } */ @@ -49,7 +49,7 @@ case 0: if($k >= 24) break; } } - $query .= " where no_member='{$_SESSION['noMember']}'"; + $query .= " where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 1: @@ -67,7 +67,7 @@ case 1: if($k < 0) break; $query .= ","; } - $query .= " where no_member='{$_SESSION['noMember']}'"; + $query .= " where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; case 2: @@ -85,7 +85,7 @@ case 2: if($i >= 24) break; $query .= ","; } - $query .= " where no_member='{$_SESSION['noMember']}'"; + $query .= " where owner='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); break; } diff --git a/twe/turn_pop_core.php b/twe/turn_pop_core.php index 6b24b993..39d95376 100644 --- a/twe/turn_pop_core.php +++ b/twe/turn_pop_core.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/turn_push_core.php b/twe/turn_push_core.php index dca98d0d..e4efe2ef 100644 --- a/twe/turn_push_core.php +++ b/twe/turn_push_core.php @@ -5,7 +5,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select no from general where no_member='{$_SESSION['noMember']}'"; +$query = "select no from general where owner='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result);