세션 테이블을 뒤집어 엎는 중.
session 디렉토리 제거. 서버의 자체 session으로 관리함. 필요하다면 자동로그인을 추가함. login_process.php를 이용하지 않고 자체적으로 세션을 관리하도록 처리 중.
This commit is contained in:
+19
-13
@@ -1,27 +1,33 @@
|
||||
<?php
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
//로그인 검사
|
||||
CheckLogin();
|
||||
|
||||
|
||||
$connect = dbConn();
|
||||
increaseRefresh($connect, "메인", 2);
|
||||
checkTurn($connect);
|
||||
|
||||
if(!isset($_SESSION['p_id'])){
|
||||
echo "<script>location.replace('start.php');</script>";
|
||||
exit(0);
|
||||
$db = getDB();
|
||||
|
||||
//로그인 검사
|
||||
if(!isSigned()){
|
||||
header('Location:../');
|
||||
die();
|
||||
}
|
||||
|
||||
$query = "select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id='{$_SESSION['p_id']}'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
$userID = getUserID();
|
||||
if(!$userID){
|
||||
header('Location:../');
|
||||
die();
|
||||
}
|
||||
|
||||
$me = $db->queryFirstRow('select no,skin,userlevel,con,turntime,newmsg,newvote,map from general where user_id = %s', $userID);
|
||||
|
||||
//그새 사망이면
|
||||
if($me['no'] == 0) {
|
||||
//echo "a";
|
||||
header('Location: start.php');
|
||||
//echo "<script>location.replace('start.php');</script>";
|
||||
exit(0);
|
||||
if($me === null) {
|
||||
resetSessionGeneralValues();
|
||||
header('Location: ../');
|
||||
die();
|
||||
}
|
||||
|
||||
if($me['newmsg'] == 1 && $me['newvote'] == 1) {
|
||||
|
||||
Reference in New Issue
Block a user