세션 시작 방식을 Session 클래스를 이용하도록 변경
This commit is contained in:
+7
-12
@@ -4,33 +4,28 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
$session = Session::Instance()->loginGame();
|
||||
|
||||
$connect = dbConn();
|
||||
increaseRefresh("메인", 2);
|
||||
increaseRefresh("메인", 1);
|
||||
checkTurn($connect);
|
||||
|
||||
$db = DB::db();
|
||||
|
||||
//로그인 검사
|
||||
if(!isSigned()){
|
||||
header('Location:../');
|
||||
if(!$session->userID){
|
||||
header('Location:..');
|
||||
die();
|
||||
}
|
||||
|
||||
$userID = Session::getUserID();
|
||||
if(!$userID){
|
||||
header('Location:../');
|
||||
die();
|
||||
}
|
||||
|
||||
$me = $db->queryFirstRow('select no,con,turntime,newmsg,newvote,map from general where owner = %i', $userID);
|
||||
$me = $db->queryFirstRow('SELECT no,con,turntime,newmsg,newvote,map from general where owner = %i', $userID);
|
||||
|
||||
//그새 사망이면
|
||||
if($me === null) {
|
||||
resetSessionGeneralValues();
|
||||
$session->loginGame();
|
||||
header('Location: ../');
|
||||
die();
|
||||
}
|
||||
$session->setReadOnly();
|
||||
|
||||
if($me['newmsg'] == 1 && $me['newvote'] == 1) {
|
||||
$query = "update general set newmsg=0,newvote=0 where owner='{$_SESSION['userID']}'";
|
||||
|
||||
Reference in New Issue
Block a user