Session 클래스 수정.

- Session클래스 내에서 global setter, getter 재정의
- Session클래스에서 static 함수로 getUserID, getUserGrade 재정의
- 내부 서버에서 getUserID, getUserGrade를 쓰던 것 Session 클래스로 통일
- SESSION.php가 requireLogin 기능을 수행하던것을 Session의 static 함수로 통합
This commit is contained in:
2018-03-24 20:04:55 +09:00
parent 4bcdf8b208
commit a3f83d1e95
110 changed files with 367 additions and 343 deletions
+6 -6
View File
@@ -32,7 +32,7 @@ if($command == 46) {
if($name == "") { $name = "무명"; }
$name = _String::SubStrForWidth($name, 0, 12);
$query = "update general set makenation='{$name}' where owner='{$_SESSION['noMember']}'";
$query = "update general set makenation='{$name}' where owner='{$_SESSION['userID']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$count = sizeof($turn);
@@ -40,13 +40,13 @@ if($command == 46) {
for($i=0; $i < $count; $i++) {
$str .= ",turn{$turn[$i]}='{$comStr}'";
}
$query = "update general set {$str} where owner='{$_SESSION['noMember']}'";
$query = "update general set {$str} where owner='{$_SESSION['userID']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//echo "<script>location.replace('index.php');</script>";
echo 'index.php';//TODO:debug all and replace
//통합제의
} elseif($command == 53) {
$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);
@@ -73,7 +73,7 @@ if($command == 46) {
echo 'b_chiefcenter.php';//TODO:debug all and replace
//불가침
} elseif($command == 61) {
$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);
@@ -102,7 +102,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 owner='{$_SESSION['noMember']}'";
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
@@ -125,7 +125,7 @@ if($command == 46) {
for($i=0; $i < $count; $i++) {
$str .= ",turn{$turn[$i]}='{$comStr}'";
}
$query = "update general set {$str} where owner='{$_SESSION['noMember']}'";
$query = "update general set {$str} where owner='{$_SESSION['userID']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
//echo "<script>location.replace('index.php');</script>";
echo 'index.php';//TODO:debug all and replace