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