Session 클래스 수정.
- Session클래스 내에서 global setter, getter 재정의 - Session클래스에서 static 함수로 getUserID, getUserGrade 재정의 - 내부 서버에서 getUserID, getUserGrade를 쓰던 것 Session 클래스로 통일 - SESSION.php가 requireLogin 기능을 수행하던것을 Session의 static 함수로 통합
This commit is contained in:
+3
-3
@@ -11,13 +11,13 @@ $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,vote,name,nation,horse,weap,book,item,npc from general where owner='{$_SESSION['noMember']}'";
|
||||
$query = "select no,vote,name,nation,horse,weap,book,item,npc from general where owner='{$_SESSION['userID']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($btn == "투표" && $me['vote'] == 0 && $sel > 0) {
|
||||
$develcost = $admin['develcost'] * 5;
|
||||
$query = "update general set gold=gold+{$develcost},vote='{$sel}' where owner='{$_SESSION['noMember']}'";
|
||||
$query = "update general set gold=gold+{$develcost},vote='{$sel}' where owner='{$_SESSION['userID']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$log = array();
|
||||
@@ -45,7 +45,7 @@ else if($btn == "댓글" && $comment != "") {
|
||||
|
||||
}
|
||||
|
||||
if(getUserGrade() < 5){
|
||||
if(Session::getUserGrade() < 5){
|
||||
echo "<!--<script>location.replace('a_vote.php');</script>"; //TODO:debug all and replace -->
|
||||
echo 'a_vote.php ';
|
||||
die();
|
||||
|
||||
Reference in New Issue
Block a user