Session 클래스 수정.
- Session클래스 내에서 global setter, getter 재정의 - Session클래스에서 static 함수로 getUserID, getUserGrade 재정의 - 내부 서버에서 getUserID, getUserGrade를 쓰던 것 Session 클래스로 통일 - SESSION.php가 requireLogin 기능을 수행하던것을 Session의 static 함수로 통합
This commit is contained in:
+38
-38
@@ -172,7 +172,7 @@ function ender($type=0) {
|
||||
}
|
||||
|
||||
function command_99($connect, $turn) {
|
||||
$query = "select nation,level from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -236,7 +236,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 owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation,level,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -669,7 +669,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 owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation,personal,special2,level,city,crew,horse,injury,leader,crewtype,gold from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("command_12 ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1098,7 +1098,7 @@ function calc(cost, formnum) {
|
||||
|
||||
function command_15($connect, $turn, $command) {
|
||||
starter("재편성");
|
||||
$query = "select no,nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
$me = $general['no'];
|
||||
@@ -1139,7 +1139,7 @@ function command_15($connect, $turn, $command) {
|
||||
|
||||
function command_16($connect, $turn, $command) {
|
||||
starter("출병");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1178,7 +1178,7 @@ function command_16($connect, $turn, $command) {
|
||||
|
||||
function command_21($connect, $turn, $command) {
|
||||
starter("이동");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1219,7 +1219,7 @@ function command_22($connect, $turn, $command) {
|
||||
die('비활성화됨');//TODO:등용장 대 디자인
|
||||
starter("등용");
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1278,7 +1278,7 @@ function command_22($connect, $turn, $command) {
|
||||
|
||||
function command_23($connect, $turn, $command) {
|
||||
starter("포상", 1);
|
||||
$query = "select no,nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1348,7 +1348,7 @@ function command_23($connect, $turn, $command) {
|
||||
|
||||
function command_24($connect, $turn, $command) {
|
||||
starter("몰수", 1);
|
||||
$query = "select no,nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1426,7 +1426,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 owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nations from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1496,7 +1496,7 @@ function command_25($connect, $turn, $command) {
|
||||
function command_27($connect, $turn, $command) {
|
||||
starter("발령", 1);
|
||||
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("command_27 ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1551,7 +1551,7 @@ function command_27($connect, $turn, $command) {
|
||||
|
||||
function command_30($connect, $turn, $command) {
|
||||
starter("강행");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1592,7 +1592,7 @@ ender();
|
||||
|
||||
function command_31($connect, $turn, $command) {
|
||||
starter("첩보");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1636,7 +1636,7 @@ function command_31($connect, $turn, $command) {
|
||||
|
||||
function command_32($connect, $turn, $command) {
|
||||
starter("화계");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1675,7 +1675,7 @@ function command_32($connect, $turn, $command) {
|
||||
|
||||
function command_33($connect, $turn, $command) {
|
||||
starter("탈취");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1714,7 +1714,7 @@ function command_33($connect, $turn, $command) {
|
||||
|
||||
function command_34($connect, $turn, $command) {
|
||||
starter("파괴");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1753,7 +1753,7 @@ function command_34($connect, $turn, $command) {
|
||||
|
||||
function command_35($connect, $turn, $command) {
|
||||
starter("선동");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1792,7 +1792,7 @@ function command_35($connect, $turn, $command) {
|
||||
|
||||
function command_36($connect, $turn, $command) {
|
||||
starter("기습");
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -1831,7 +1831,7 @@ function command_36($connect, $turn, $command) {
|
||||
|
||||
function command_43($connect, $turn, $command) {
|
||||
starter("증여");
|
||||
$query = "select no,nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2042,7 +2042,7 @@ function command_46($connect, $turn, $command) {
|
||||
function command_48($connect, $turn, $command) {
|
||||
starter("장비 매매");
|
||||
|
||||
$query = "select no,city,gold from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,city,gold from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("command_48 ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
$city = getCity($connect, $me['city'], "secu");
|
||||
@@ -2152,7 +2152,7 @@ function command_49($connect, $turn, $command) {
|
||||
function command_51($connect, $turn, $command) {
|
||||
starter("항복 권고", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2203,7 +2203,7 @@ function command_51($connect, $turn, $command) {
|
||||
function command_52($connect, $turn, $command) {
|
||||
starter("원조", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2277,7 +2277,7 @@ function command_52($connect, $turn, $command) {
|
||||
function command_53($connect, $turn, $command) {
|
||||
starter("통합제의", 1);
|
||||
|
||||
$query = "select no,nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("command_53 ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2341,7 +2341,7 @@ function command_53($connect, $turn, $command) {
|
||||
|
||||
function command_54($connect, $turn, $command) {
|
||||
starter("선양");
|
||||
$query = "select no,nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2385,7 +2385,7 @@ function command_54($connect, $turn, $command) {
|
||||
function command_61($connect, $turn, $command) {
|
||||
starter("불가침", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2465,7 +2465,7 @@ function command_61($connect, $turn, $command) {
|
||||
function command_62($connect, $turn, $command) {
|
||||
starter("선전포고", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2528,7 +2528,7 @@ function command_62($connect, $turn, $command) {
|
||||
function command_63($connect, $turn, $command) {
|
||||
starter("종전", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2583,7 +2583,7 @@ function command_63($connect, $turn, $command) {
|
||||
function command_64($connect, $turn, $command) {
|
||||
starter("파기", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2637,7 +2637,7 @@ function command_64($connect, $turn, $command) {
|
||||
|
||||
function command_65($connect, $turn, $command) {
|
||||
starter("초토화", 1);
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2673,7 +2673,7 @@ echo "<br>
|
||||
|
||||
function command_66($connect, $turn, $command) {
|
||||
starter("천도", 1);
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2710,7 +2710,7 @@ echo "<br>
|
||||
|
||||
function command_67($connect, $turn, $command) {
|
||||
starter("증축", 1);
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2747,7 +2747,7 @@ echo "<br>
|
||||
|
||||
function command_68($connect, $turn, $command) {
|
||||
starter("감축", 1);
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2784,7 +2784,7 @@ echo "<br>
|
||||
|
||||
function command_72($connect, $turn, $command) {
|
||||
starter("백성동원", 1);
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2821,7 +2821,7 @@ echo "<br>
|
||||
|
||||
function command_73($connect, $turn, $command) {
|
||||
starter("수몰", 1);
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2858,7 +2858,7 @@ echo "<br>
|
||||
|
||||
function command_74($connect, $turn, $command) {
|
||||
starter("허보", 1);
|
||||
$query = "select city from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select city from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$general = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2896,7 +2896,7 @@ echo "<br>
|
||||
function command_75($connect, $turn, $command) {
|
||||
starter("피장파장", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -2952,7 +2952,7 @@ function command_75($connect, $turn, $command) {
|
||||
function command_77($connect, $turn, $command) {
|
||||
starter("이호경식", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
@@ -3008,7 +3008,7 @@ function command_77($connect, $turn, $command) {
|
||||
function command_78($connect, $turn, $command) {
|
||||
starter("급습", 1);
|
||||
|
||||
$query = "select nation from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select nation from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user