diff --git a/i_entrance/Action.js b/i_entrance/Action.js index 9d61a3e0..5f35af1d 100644 --- a/i_entrance/Action.js +++ b/i_entrance/Action.js @@ -79,6 +79,7 @@ function Entrance_Logout() { }); } +//TODO: 재설계 function Entrance_Enter(serverDir) { Popup_Wait(function() { PostJSON( diff --git a/twe/_119.php b/twe/_119.php index d2337362..7f65756c 100644 --- a/twe/_119.php +++ b/twe/_119.php @@ -4,7 +4,7 @@ include "func.php"; $connect=dbConn(); -$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 dbf7ab7f..54984e18 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 168f0af7..35f24a8a 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 c88de998..0ccde637 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 8d28c93d..0e3581f7 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 321aadfa..4e290363 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin3.php b/twe/_admin3.php index c67e6534..a1378c06 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 0ba212e1..d86e1183 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 02896997..b733f3aa 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin4_submit.php b/twe/_admin4_submit.php index 3444960e..e3dc9bca 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/_admin5.php b/twe/_admin5.php index f9f01d24..aa4b3918 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel,skin from general where no_member='{$_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 cfbda22e..e58498f8 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "update general set nation=0,level=0 where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } else { - $query = "update general set nation='{$nation}',level=1 where user_id='{$_SESSION['p_id']}'"; + $query = "update general set nation='{$nation}',level=1 where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } break; diff --git a/twe/_admin6.php b/twe/_admin6.php index c9c1e422..4d128b52 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 03d2716e..44d6da00 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel,skin from general where no_member='{$_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 9d692357..7fd0de08 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel,skin from general where no_member='{$_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 5ccfc6f0..51c4e875 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,tournament,userlevel,con,turntime from general where no_member='{$_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 e596e398..134cbb70 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 user_id='{$_SESSION['p_id']}'"; +$query = "select con,userlevel,turntime from general where no_member='{$_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 f6bab798..db55c7c4 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 user_id='{$_SESSION['p_id']}'"; +$query = "select con,userlevel,turntime from general where no_member='{$_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 8c223030..771b6f01 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,map,con,userlevel,turntime from general where no_member='{$_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 2ed3154c..b63aa665 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 user_id='{$_SESSION['p_id']}'"; +$query = "select con,userlevel,turntime from general where no_member='{$_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 89916a00..829ea792 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,map,con,userlevel,turntime from general where no_member='{$_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 561e1c68..902df997 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,userlevel,vote from general where no_member='{$_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 f1099ccf..6da06126 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,special,skin,userlevel,con,turntime from general where no_member='{$_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 8ce62bcb..ad58487d 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where no_member='{$_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 d3d4a950..71ff71c5 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 user_id='{$_SESSION['p_id']}'"; +$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']}'"; $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 "{$gen[$i]}"; } -$query = "select bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15 from general where user_id='{$_SESSION['p_id']}'"; +$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']}'"; $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 4e4ecca1..db170a05 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation,level from general where no_member='{$_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 dc0d75e1..c326470c 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where no_member='{$_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 88c99b33..dfee40fa 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation,userlevel,level,city from general where no_member='{$_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 24568ea9..58fead26 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where no_member='{$_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 7e6da7ac..5cae0337 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,nation,skin,map,userlevel from general where no_member='{$_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 9cf55aa2..6d1a9cb2 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation,level,userlevel,con,turntime,belong from general where no_member='{$_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 722c159e..95e92c36 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation,level from general where no_member='{$_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 363789c4..6add903a 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,nation,level,skin from general where no_member='{$_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) {
0) { $submit = 'hidden'; } - $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where user_id='{$_SESSION['p_id']}'"; + $query = "update general set myset=myset-1,map='$map',mode='$mode',skin='$skin',tnmt='$tnmt' where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } -$query = "select no,skin,map,mode,tnmt,myset from general where user_id='{$_SESSION['p_id']}'"; +$query = "select no,skin,map,mode,tnmt,myset from general where no_member='{$_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 def64064..7ebb1cc3 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 user_id='{$_SESSION['p_id']}'"; +$query = "select skin,no,nation from general where no_member='{$_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 4c60efcd..9d81c77d 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 user_id='{$_SESSION['p_id']}'"; + $query = "update general set gold=gold-'$gold',bet{$i}=bet{$i}+'$gold',betgold=betgold+'$gold' where no_member='{$_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 a6d5980a..de4c5d64 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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 695f52bb..53571443 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,nation,level from general where no_member='{$_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 a6924d51..3c5441e2 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 user_id='{$_SESSION['p_id']}'"; + $query = "update general set makenation='{$name}' where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "update general set {$str} where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; echo 'main.php';//TODO:debug all and replace //통합제의 } elseif($command == 53) { - $query = "select nation,level from general where user_id='{$_SESSION['p_id']}'"; + $query = "select nation,level from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation,level from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation,level from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "update general set {$str} where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; echo 'main.php';//TODO:debug all and replace diff --git a/twe/c_msgsubmit.php b/twe/c_msgsubmit.php index babe20eb..40b1bad3 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,level,msgindex,userlevel,con,picture,imgsvr from general where no_member='{$_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 c46376be..bad49a57 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,nation,level from general where no_member='{$_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 cdc05b56..93e48ef3 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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 b8e6ae21..3e38fea0 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,nation from general where no_member='{$_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 e33bc471..2eb35033 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,userlevel,tournament from general where no_member='{$_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 99e9db08..89c8c35c 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,nation,troop from general where no_member='{$_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 3479b2a0..6c78ff4a 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 user_id='{$_SESSION['p_id']}'"; +$query = "update general set killturn='{$admin['killturn']}' where no_member='{$_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 d43f6caf..33910f38 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "update general set gold=gold+{$develcost},vote='{$sel}' where no_member='{$_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 af6494e0..e94db2de 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 user_id='{$_SESSION['p_id']}'"; + $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']}'"; $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 7077afea..c5735f60 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_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 92b3a124..7eb0d0e9 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_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 c03939b3..4d9dd0f4 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_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 62c9ac26..28935352 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_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 7febe4ba..750ae7bf 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,nations,level,troop,history,npc,gold,rice from general where no_member='{$_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 dd7729e0..ce9dc968 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,level,history,picture,imgsvr from general where no_member='{$_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 a150053d..30cee6fd 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_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 784e8e09..bf3ca56b 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/event_3.php b/twe/event_3.php index 39d702f6..efa21c73 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 user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/event_4.php b/twe/event_4.php index 93cd6a50..784d33ac 100644 --- a/twe/event_4.php +++ b/twe/event_4.php @@ -9,7 +9,7 @@ include "func.php"; CheckLogin(); $connect = dbConn(); -$query = "select userlevel from general where user_id='{$_SESSION['p_id']}'"; +$query = "select userlevel from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/func.php b/twe/func.php index 83deba6b..bd763629 100644 --- a/twe/func.php +++ b/twe/func.php @@ -27,10 +27,10 @@ function randF(){ /** * 로그인한 유저의 전역 id를 받아옴 * - * @return string|null + * @return int|null */ function getUserID($forceExit=false){ - $userID = util::array_get($_SESSION['p_id'], null); + $userID = util::array_get($_SESSION['noMember'], null); if(!$userID && $forceExit){ header('Location:..'); die(); @@ -47,7 +47,7 @@ function getUserID($forceExit=false){ */ function getGeneralID($forceExit=false){ $userID = getUserID(); - if(!$userID){ //유저명 없으면 어차피 의미 없음. + if(!$userID){ //유저id 없으면 어차피 의미 없음. return null; } @@ -60,7 +60,7 @@ function getGeneralID($forceExit=false){ $db = getDB(); //흠? - $generalID = $db->queryFirstField('select no from general where user_id = %s', $userID); + $generalID = $db->queryFirstField('select no from general where no_member = %i', $userID); if(!$generalID && $forceExit){ header('Location:..'); die(); @@ -679,7 +679,7 @@ function getCoreTurn($connect, $nation, $level) { function cityInfo($connect) { global $_basecolor, $_basecolor2, $images; - $query = "select no,city,skin from general where user_id='{$_SESSION['p_id']}'"; + $query = "select no,city,skin from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -796,7 +796,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 user_id='{$_SESSION['p_id']}'"; + $query = "select skin,no,nation from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -982,7 +982,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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,npc,troop,city,nation,level,crew,makelimit,special from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1220,7 +1220,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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation,city,level from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1310,7 +1310,7 @@ function CoreCommandTable($connect) { } function myInfo($connect) { - $query = "select no,skin from general where user_id='{$_SESSION['p_id']}'"; + $query = "select no,skin from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1324,7 +1324,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 user_id='{$_SESSION['p_id']}'"; + $query = "select skin from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1514,7 +1514,7 @@ function generalInfo($connect, $no, $skin) { } function myInfo2($connect) { - $query = "select no,skin from general where user_id='{$_SESSION['p_id']}'"; + $query = "select no,skin from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -1940,7 +1940,7 @@ function onlineNation($connect) { } function nationMsg($connect) { - $query = "select no,nation,skin from general where user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation,skin from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -2246,23 +2246,20 @@ function CutDay($date) { } -function increateRefreshEx($type, $cnt=1){ +function increaseRefreshEx($type, $cnt=1){ $db = getDB(); - $db->query("update `game` set `refresh` = `refresh` + %d_p_id where `no` = %d_cnt", array( - 'p_id'=>$p_id, - 'cnt'=>$cnt - )); + $db->query("update `game` set `refresh` = `refresh` + %i where `no` = 1", $cnt); $date = date('Y-m-d H:i:s'); $generalID = getGeneralID(); - if($p_id !== NULL){ + if($generalID !== NULL){ $db->query("update `general` set `lastrefresh`= %s_date, `con` = `con`+%d_cnt, `connect`= `connect`+ %d_cnt, '\ '`refcnt` = `refcnt` + %d_cnt, `refresh` = `refresh` + %d_cnt where `no` =%i_generalID",array( 'date'=>$date, 'cnt'=>$cnt, - 'p_id'=>$generalID + 'generalID'=>$generalID )); } @@ -2311,9 +2308,9 @@ function increaseRefresh($connect, $type="", $cnt=1) { $query = "update game set refresh=refresh+'$cnt' where no='1'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - if($_SESSION['p_id'] != "") { - $query = sprintf("update general set lastrefresh='%s',con=con+'%d',connect=connect+'%d',refcnt=refcnt+'%d',refresh=refresh+'%d' where user_id='%s'", - $date,$cnt,$cnt,$cnt,$cnt,$_SESSION['p_id']); + if($_SESSION['noMember'] != "") { + $query = sprintf("update general set lastrefresh='%s',con=con+'%d',connect=connect+'%d',refcnt=refcnt+'%d',refresh=refresh+'%d' where no_member='%d'", + $date,$cnt,$cnt,$cnt,$cnt,$_SESSION['noMember']); MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } @@ -2322,7 +2319,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { $date2 = substr($date, 0, 10); $online = getOnlineNum(); $fp = fopen("logs/_{$date2}_refresh.txt", "a"); - $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION['p_id'],13," ")._String::Fill2($_SESSION['p_name'],13," ")._String::Fill2($_SESSION['p_ip'],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; + $msg = _String::Fill2($date,20," ")._String::Fill2($_SESSION['noMember'],13," ")._String::Fill2($_SESSION['p_name'],13," ")._String::Fill2($_SESSION['p_ip'],16," ")._String::Fill2($type, 10, " ")." 동접자: {$online}"; fwrite($fp, $msg."\n"); fclose($fp); @@ -2351,7 +2348,7 @@ function increaseRefresh($connect, $type="", $cnt=1) { if($str != "") { file_put_contents("logs/_{$date2}_ipcheck.txt", sprintf("ID:%s//name:%s//REMOTE_ADDR:%s%s\n", - $_SESSION['p_id'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str), FILE_APPEND); + $_SESSION['noMember'],$_SESSION['p_name'],$_SERVER['REMOTE_ADDR'],$str), FILE_APPEND); } } @@ -2573,7 +2570,7 @@ function checkTurn($connect) { return; } - $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; + $locklog[0] = "- checkTurn() : ".date('Y-m-d H:i:s')." : ".$_SESSION['noMember']; pushLockLog($connect, $locklog); // 파일락 해제 @@ -2581,7 +2578,7 @@ function checkTurn($connect) { // 세마포어 해제 //if(!@sem_release($sema)) { echo "치명적 에러! 유기체에게 문의하세요!"; exit(1); } - $locklog[0] = "- checkTurn() 입 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; + $locklog[0] = "- checkTurn() 입 : ".date('Y-m-d H:i:s')." : ".$_SESSION['noMember']; pushLockLog($connect, $locklog); //if(STEP_LOG) delStepLog(); @@ -2647,7 +2644,7 @@ function checkTurn($connect) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', preUpdateMonthly'); $result = preUpdateMonthly($connect); if($result == false) { - $locklog[0] = "-- checkTurn() 오류출 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; + $locklog[0] = "-- checkTurn() 오류출 : ".date('Y-m-d H:i:s')." : ".$_SESSION['noMember']; pushLockLog($connect, $locklog); // 잡금 해제 @@ -2660,7 +2657,7 @@ function checkTurn($connect) { $dt = turnDate($connect, $nextTurn); $admin['year'] = $dt[0]; $admin['month'] = $dt[1]; - $locklog[0] = "-- checkTurn() ".$admin['month']."월 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; + $locklog[0] = "-- checkTurn() ".$admin['month']."월 : ".date('Y-m-d H:i:s')." : ".$_SESSION['noMember']; pushLockLog($connect, $locklog); // 분기계산. 장수들 턴보다 먼저 있다면 먼저처리 if($admin['month'] == 1) { @@ -2776,7 +2773,7 @@ function checkTurn($connect) { //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', unlock'); unlock(); - $locklog[0] = "- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$_SESSION['p_id']; + $locklog[0] = "- checkTurn() 출 : ".date('Y-m-d H:i:s')." : ".$_SESSION['noMember']; pushLockLog($connect, $locklog); //if(STEP_LOG) pushStepLog(date('Y-m-d H:i:s').', finish'); @@ -4350,7 +4347,7 @@ function getAdmin($connect) { } function getMe($connect) { - $query = "select * from general where user_id='{$_SESSION['p_id']}'"; + $query = "select * from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("접속자가 많아 접속을 중단합니다. 잠시후 갱신해주세요.
getMe : ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); @@ -4750,7 +4747,7 @@ function command_Single($connect, $turn, $command) { for($i=0; $i < $count; $i++) { $str .= ",turn{$turn[$i]}='{$command}'"; } - $query = "update general set {$str} where user_id='{$_SESSION['p_id']}'"; + $query = "update general set {$str} where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); //echo ""; echo 'commandlist.php';//TODO:debug all and replace @@ -4760,7 +4757,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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation,level from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/func_legacy.php b/twe/func_legacy.php index 0dc499eb..8fb7eb5d 100644 --- a/twe/func_legacy.php +++ b/twe/func_legacy.php @@ -1,7 +1,7 @@ "; - $query = "select no,name,npc from general where nation=0 and user_id!='{$_SESSION['p_id']}' and npc<2 order by npc,binary(name)"; + $query = "select no,name,npc from general where nation=0 and no_member!='{$_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 user_id!='{$_SESSION['p_id']}' and npc<2 order by npc,binary(name)"; + $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)"; $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 user_id='{$_SESSION['p_id']}'"; + $query = "select skin,no,nation,name,picture,level from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 03e43b19..b9aeb05b 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -48,8 +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 `user_id` = %s_p_id', - array('p_id'=>$_SESSION['p_id'])); +$me = $db->queryFirstRow('select `no`,`name`,`nation`,`level`,`msgindex`,`userlevel`,`con`,`picture`,`imgsvr` from `general` where `no_member` = %i', getUserID()); if(!$me){ resetSessionGeneralValues(); diff --git a/twe/lib.php b/twe/lib.php index 29e556db..98b27f45 100644 --- a/twe/lib.php +++ b/twe/lib.php @@ -90,9 +90,9 @@ if(!util::array_get($_SESSION['p_ip'], null)) { //id, 이름, 국가는 로그인에서 //초과된 세션은 로그아웃(1시간) +//TODO: 로그아웃 원리를 다시 확인 if($_SESSION['p_time']+3600 < time()) { - unset($_SESSION['p_id']); - unset($_SESSION[getServPrefix().'p_name']); + resetSessionGeneralValues(); $_SESSION['p_time'] = time(); } else { $_SESSION['p_time'] = time(); diff --git a/twe/login_process.php b/twe/login_process.php index f9840b1b..34029b99 100644 --- a/twe/login_process.php +++ b/twe/login_process.php @@ -63,7 +63,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 user_id='{$_SESSION['p_id']}'"; +$query="update general set logcnt=logcnt+1,ip='{$_SESSION['p_ip']}',lastconnect='$date',conmsg='$conmsg' where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $date = date('Y_m_d H:i:s'); diff --git a/twe/main.php b/twe/main.php index 9095b7b6..ac30d9a6 100644 --- a/twe/main.php +++ b/twe/main.php @@ -31,13 +31,13 @@ if($me === null) { } if($me['newmsg'] == 1 && $me['newvote'] == 1) { - $query = "update general set newmsg=0,newvote=0 where user_id='{$_SESSION['p_id']}'"; + $query = "update general set newmsg=0,newvote=0 where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['newmsg'] == 1) { - $query = "update general set newmsg=0 where user_id='{$_SESSION['p_id']}'"; + $query = "update general set newmsg=0 where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } elseif($me['newvote'] == 1) { - $query = "update general set newvote=0 where user_id='{$_SESSION['p_id']}'"; + $query = "update general set newvote=0 where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } diff --git a/twe/msglist.php b/twe/msglist.php index 9545a98c..44896c98 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 f49a538b..40a17efa 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,userlevel,con from general where no_member='{$_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 999d4a9f..42a9a4e2 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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation,level from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nations from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation,level from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,city,gold from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select no,nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select city from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query = "select nation from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $me = MYDB_fetch_array($result); diff --git a/twe/turn.php b/twe/turn.php index 3703ecb8..f3b9b543 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no,name,nation,msgindex,userlevel,con from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query .= " where no_member='{$_SESSION['noMember']}'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); } */ @@ -49,7 +49,7 @@ case 0: if($k >= 24) break; } } - $query .= " where user_id='{$_SESSION['p_id']}'"; + $query .= " where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query .= " where no_member='{$_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 user_id='{$_SESSION['p_id']}'"; + $query .= " where no_member='{$_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 0ade6768..6b24b993 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no from general where no_member='{$_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 1848b853..dca98d0d 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 user_id='{$_SESSION['p_id']}'"; +$query = "select no from general where no_member='{$_SESSION['noMember']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $me = MYDB_fetch_array($result);