p_id를 noMember 기반으로 변경

This commit is contained in:
2018-02-03 04:49:54 +09:00
parent ecac4b6edb
commit e957a91b19
79 changed files with 171 additions and 174 deletions
+1
View File
@@ -79,6 +79,7 @@ function Entrance_Logout() {
});
}
//TODO: 재설계
function Entrance_Enter(serverDir) {
Popup_Wait(function() {
PostJSON(
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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 "<td width=70>{$gen[$i]}</td>";
}
$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++) {
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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) {
</td></tr>
</table>
<?php
$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(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -6,7 +6,7 @@ CheckLogin();
$connect = dbConn();
increaseRefresh($connect, "세력정보", 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(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
@@ -30,7 +30,7 @@ if($me['level'] == 0) {
</table>
<br>
<?php
$query = "select nation,skin from general where user_id='{$_SESSION['p_id']}'";
$query = "select 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);
+3 -3
View File
@@ -6,7 +6,7 @@ CheckLogin();
$connect = dbConn();
increaseRefresh($connect, "내정보", 1);
$query = "select myset from general where user_id='{$_SESSION['p_id']}'";
$query = "select myset from general where no_member='{$_SESSION['noMember']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
@@ -23,11 +23,11 @@ if($btn == "설정저장" && $me['myset'] > 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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -20,7 +20,7 @@ increaseRefresh($connect, "국법", 1);
<tr><td>
<?php
$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);
+1 -1
View File
@@ -7,7 +7,7 @@ $connect = dbConn();
increaseRefresh($connect, "토너먼트", 1);
checkTurn($connect);
$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);
+1 -1
View File
@@ -6,7 +6,7 @@ CheckLogin();
$connect = dbConn();
increaseRefresh($connect, "부대편성", 1);
$query = "select skin,no,nation,troop from general where user_id='{$_SESSION['p_id']}'";
$query = "select skin,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);
+1 -1
View File
@@ -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,name,gold,rice,special,userlevel from general where user_id='{$_SESSION['p_id']}'";
$query = "select no,name,gold,rice,special,userlevel from general where no_member='{$_SESSION['noMember']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
+2 -2
View File
@@ -20,7 +20,7 @@ if($admin['tournament'] != 6) {
exit();
}
$query = "select gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,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 gold,bet0,bet1,bet2,bet3,bet4,bet5,bet6,bet7,bet8,bet9,bet10,bet11,bet12,bet13,bet14,bet15,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);
@@ -30,7 +30,7 @@ for($i=0; $i < 16; $i++) {
$mebet = $me["bet{$i}"];
if($gold >= 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),"");
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+6 -6
View File
@@ -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 "<script>location.replace('main.php');</script>";
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 "<script>location.replace('main.php');</script>";
echo 'main.php';//TODO:debug all and replace
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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'];
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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 "<script>location.replace('b_myPage.php');</script>";
+2 -2
View File
@@ -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();
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+29 -32
View File
@@ -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("접속자가 많아 접속을 중단합니다. 잠시후 갱신해주세요.<br>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 "<script>location.replace('commandlist.php');</script>";
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);
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
function CheckLogin($type=0) {
if(!isset($_SESSION['p_id'])) {
if(!isset($_SESSION['noMember'])) {
if($type == 0) {
header('Location: ../');
}
+7 -7
View File
@@ -207,12 +207,12 @@ function getMailboxList(){
}
function genList($connect) {
$query = "select no,nation,level,msgindex,userlevel from general where user_id='{$_SESSION['p_id']}'";
$query = "select no,nation,level,msgindex,userlevel from general where no_member='{$_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 user_id='{$_SESSION['p_id']}'";
$query = "select msg{$me['msgindex']}_who as reply,msg{$me['msgindex']}_type as type from general where no_member='{$_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 "
<optgroup label='개인메세지'>
<optgroup label='재야'>";
$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 "
<optgroup label='【{$nation['name']}】' style=color:".newColor($nation['color']).";background-color:{$nation['color']};>";
$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);
+1 -2
View File
@@ -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();
+2 -2
View File
@@ -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();
+1 -1
View File
@@ -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');
+3 -3
View File
@@ -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),"");
}
+1 -1
View File
@@ -18,7 +18,7 @@ $connect = dbconn();
<?php
$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);
+1 -1
View File
@@ -43,7 +43,7 @@ if(!$me2) {
$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),"");
//echo "<script>window.top.location.replace('./');</script>";
+1 -1
View File
@@ -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);
+38 -38
View File
@@ -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 "<br>
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 "<br>
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 "<br>
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 "<br>
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 "<br>
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 "<br>
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 "<br>
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);
+5 -5
View File
@@ -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;
}
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);