CheckLogin을 다시 구현.

- ajax 함수에서는 사용해선 안됨.
- 이외에선 index에서만 제대로 장수삭제처리를 하므로 문제 없을 것.
This commit is contained in:
2018-04-03 03:05:26 +09:00
parent cb56620728
commit e0cbf34d43
58 changed files with 64 additions and 68 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$admin = getAdmin($connect);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(Session::getUserGrade() < 5) {
+1 -1
View File
@@ -46,7 +46,7 @@ $tch2 = array_fill(0,11, '');
$dec = 0;
$rice = 0;
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("시뮬", 2);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("명장일람", 2);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("장수일람", 2);
+1 -1
View File
@@ -5,7 +5,7 @@ include "lib.php";
include "func.php";
$yearmonth = $_POST['yearmonth'];
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("연감", 5);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("세력일람", 2);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("세력도", 2);
checkTurn($connect);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("거래장", 2);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("감찰부", 2);
//전투 추진을 위해 갱신
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("베팅장", 1);
checkTurn($connect);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("기밀실", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("사령부", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("현재도시", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("내무부", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("중원정보", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("암행부", 2);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("인사부", 1);
//훼섭 추방을 위해 갱신
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("세력도시", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("세력장수", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("세력정보", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("내정보", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("회의실", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("국법", 1);
?>
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("토너먼트", 1);
checkTurn($connect);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("부대편성", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("입찰", 1);
+1 -1
View File
@@ -8,7 +8,7 @@ include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("베팅", 1);
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
// $title, $msg, $num
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(getBlockLevel() != 1 && getBlockLevel() != 3) {
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
// $btn, $msg, $scoutmsg, $rate, $bill, $secretlimit
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select no,nation,level from general where owner='{$_SESSION['userID']}'";
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
// $turn, $command, $cost, $name, $nationname, $note, $double, $third, $fourth
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if($command < 0) { $command = 0; }
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
// $btn, $level, $genlist, $outlist
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select startyear,year,month from game limit 1";
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
// $title, $msg, $num
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
if(getBlockLevel() != 1 && getBlockLevel() != 3) {
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
// $msg
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select no,nation from general where owner='{$_SESSION['userID']}'";
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
// $btn, $msg
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select tournament,phase,tnmt_type,develcost from game limit 1";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select killturn from game limit 1";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select develcost,vote,votecomment from game limit 1";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
//$when = ($when + 1) * 2;
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select year,month from game limit 1";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select year,month from game limit 1";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select year,month from game limit 1";
+1 -1
View File
@@ -10,7 +10,7 @@ include "lib.php";
include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select startyear,year,month,killturn from game limit 1";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select year,month from game limit 1";
+7 -11
View File
@@ -2,18 +2,14 @@
namespace sammo;
function CheckLogin($type=0) {
//TODO: 직접해라. setReadOnly() 호출이 필요하다.
if(Session::Instance()->loginGame()->generalID){
return;
function CheckLoginWithGeneralID() {
$session = Session::requireLogin()->loginGame()->setReadOnly();
$generalID = $session->generalID;
if($generalID){
return $generalID;
}
if($type == 0) {
header('Location: ../');
}
else {
header('Location: index.php');
}
exit();
header('Locatoin:..');
die();
}
+1 -1
View File
@@ -17,7 +17,7 @@ if(!$year || !$month) {
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select map from history where year='$year' and month='$month'";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("턴입력", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$count = sizeof($turn);
+1 -1
View File
@@ -6,7 +6,7 @@ include "func.php";
//로그인 검사
CheckLogin(1);
CheckLoginWithGeneralID();
$connect = dbConn();
increaseRefresh("턴반복", 1);
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select no from general where owner='{$_SESSION['userID']}'";
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include "lib.php";
include "func.php";
//로그인 검사
CheckLogin();
CheckLoginWithGeneralID();
$connect = dbConn();
$query = "select no from general where owner='{$_SESSION['userID']}'";