$_POST, $_GET 남은 부분 제거. 연감 지도 받아오는 부분 재 작성
This commit is contained in:
+3
-1
@@ -4,7 +4,8 @@ namespace sammo;
|
|||||||
include "lib.php";
|
include "lib.php";
|
||||||
include "func.php";
|
include "func.php";
|
||||||
$btn = Util::getReq('btn');
|
$btn = Util::getReq('btn');
|
||||||
$yearmonth = $_POST['yearmonth'];
|
$yearmonth = Util::getReq('yearmonth');
|
||||||
|
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
$userID = Session::getUserID();
|
$userID = Session::getUserID();
|
||||||
@@ -38,6 +39,7 @@ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "
|
|||||||
$history = MYDB_fetch_array($result);
|
$history = MYDB_fetch_array($result);
|
||||||
$e = ($history['year']*12) + $history['month'];
|
$e = ($history['year']*12) + $history['month'];
|
||||||
|
|
||||||
|
//FIXME: $yearmonth가 올바르지 않을 경우에 처리가 필요.
|
||||||
if (!$yearmonth) {
|
if (!$yearmonth) {
|
||||||
$year = $admin['year'];
|
$year = $admin['year'];
|
||||||
$month = $admin['month'] - 1;
|
$month = $admin['month'] - 1;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if($session->userGrade < 5){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$scenarioIdx = Util::toInt(Util::array_get($_GET['scenarioIdx']));
|
$scenarioIdx = Util::getReq('scenarioIdx', 'int');
|
||||||
|
|
||||||
if ($scenarioIdx !== null) {
|
if ($scenarioIdx !== null) {
|
||||||
//TODO: preview 지도 출력
|
//TODO: preview 지도 출력
|
||||||
|
|||||||
+21
-16
@@ -1,37 +1,42 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace sammo;
|
namespace sammo;
|
||||||
|
|
||||||
$year = $_GET['year'];
|
include "lib.php";
|
||||||
$month = $_GET['month'];
|
include "func.php";
|
||||||
|
|
||||||
|
$year = Util::getReq('year', 'int');
|
||||||
|
$month = Util::getReq('month', 'int');
|
||||||
|
|
||||||
$url = '/a_history.php';
|
$url = '/a_history.php';
|
||||||
|
|
||||||
if(!strpos($_SERVER['HTTP_REFERER'], $url)) {
|
if(!strpos($_SERVER['HTTP_REFERER'], $url)) {
|
||||||
exit(1);
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'Invalid Referer'
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$year || !$month) {
|
if(!$year || !$month) {
|
||||||
exit(1);
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'year, month가 지정되지 않았습니다'
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
include "lib.php";
|
|
||||||
include "func.php";
|
|
||||||
//로그인 검사
|
//로그인 검사
|
||||||
$session = Session::requireGameLogin()->setReadOnly();
|
$session = Session::requireGameLogin()->setReadOnly();
|
||||||
|
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
$connect=$db->get();
|
$connect=$db->get();
|
||||||
|
|
||||||
$query = "select map from history where year='$year' and month='$month'";
|
$map = $db->queryFirstField('SELECT map FROM history WHERE year=%i AND month=%i', $year, $month);
|
||||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
|
||||||
$history = MYDB_fetch_array($result);
|
|
||||||
|
|
||||||
if(!$history['map']) {
|
if(!$map){
|
||||||
exit(1);
|
Json::die([
|
||||||
|
'result'=>false,
|
||||||
|
'reason'=>'해당하는 연월의 지도가 없습니다'
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$map = $history['map'];
|
Json::die(Json::decode($map));
|
||||||
$map = str_replace('<_quot_>', "'", $map);
|
|
||||||
$map = str_replace('<_dquot_>', '"', $map);
|
|
||||||
|
|
||||||
echo $map;
|
|
||||||
@@ -8,7 +8,7 @@ $userID = Session::getUserID();
|
|||||||
|
|
||||||
// 외부 파라미터
|
// 외부 파라미터
|
||||||
// $_POST['pw'] : PW
|
// $_POST['pw'] : PW
|
||||||
$pw = $_POST['pw'];
|
$pw = Util::getReq('pw');
|
||||||
|
|
||||||
if(!$pw){
|
if(!$pw){
|
||||||
Json::die([
|
Json::die([
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ if($session->userGrade < 6){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 외부 파라미터
|
// 외부 파라미터
|
||||||
// $_POST['action'] : 처리종류
|
// action : 처리종류
|
||||||
// $_POST['user_id'] : 유저 이름
|
// user_id : 유저 이름
|
||||||
// $_POST['param'] : 추가 파라미터
|
// param : 추가 파라미터
|
||||||
|
|
||||||
$action = Util::getReq('action');
|
$action = Util::getReq('action');
|
||||||
$userID = Util::getReq('user_id');
|
$userID = Util::getReq('user_id');
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ namespace sammo;
|
|||||||
require(__dir__.'/../vendor/autoload.php');
|
require(__dir__.'/../vendor/autoload.php');
|
||||||
|
|
||||||
WebUtil::setHeaderNoCache();
|
WebUtil::setHeaderNoCache();
|
||||||
$category = Util::array_get($_GET['category'], 0);
|
$category = Util::getReq('category', 0);
|
||||||
//FIXME: 겨우 category 구분을 위해 php를 써야하는가? JavaScript로 바꾸자
|
//FIXME: 겨우 category 구분을 위해 php를 써야하는가? JavaScript로 바꾸자
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use \kakao\Kakao_REST_API_Helper as Kakao_REST_API_Helper;
|
|||||||
|
|
||||||
WebUtil::setHeaderNoCache();
|
WebUtil::setHeaderNoCache();
|
||||||
|
|
||||||
$auth_code = Util::array_get($_GET['code']);
|
$auth_code = Util::getReq('code');
|
||||||
if(!$auth_code){
|
if(!$auth_code){
|
||||||
|
|
||||||
header('Location:oauth_fail.html');
|
header('Location:oauth_fail.html');
|
||||||
|
|||||||
Reference in New Issue
Block a user