Files
core/twe/j_map.php
T
Hide_D e536e2d4ca 내부 전역 변수값 처리를 위해 함수 정리
conf.php에 getServPrefix 추가. 이후 같은 db에서 다른 서버를 운용할때 사용 가능할 것으로 예상.

$_SESSION 값을 직접 받아서 처리하지 않도록 하기위한 용도로 getUserID(), getGeneralID(), getGeneralName() 을 설정

$_SESSION['p_id']를 p_no로 착각하여 구현한 부분 수정

int|null 변환을 위한 toInt 함수 추가

func_string.php에서 null이 입력될 경우 일부 처리

각 서버에 계정이 생성되었는지 확인하는 isSigned()함수 추가
2018-02-03 03:36:34 +09:00

44 lines
856 B
PHP

<?php
include 'lib.php';
include 'func.php';
use utilphp\util as util;
//읽기 전용이다. 빠르게 세션 끝내자
session_write_close();
$defaultPost = [
'year' => null,
'month' => null,
'aux' => null,
'neutralView' => false,
'showMe' => true
];
$post = array_merge($defaultPost, parseJsonPost());
if($post['year']){
if($post['month'] < 1 || $post['month'] > 12){
returnJson([
'result'=>false,
'reason'=>'잘못된 개월 값'
]);
}
$post['year'] = toInt($post['year']);
$post['month'] = toInt($post['month']);
}
else{
$post['year'] = null;
$post['month'] = null;
}
$result = getWorldMap($post);
if($post['year'] && $post['month'] && $result['result']){
//연감 자료는 캐싱 가능
returnJson($result, false);
}
else{
returnJson($result);
}