Session 클래스 수정.

- Session클래스 내에서 global setter, getter 재정의
- Session클래스에서 static 함수로 getUserID, getUserGrade 재정의
- 내부 서버에서 getUserID, getUserGrade를 쓰던 것 Session 클래스로 통일
- SESSION.php가 requireLogin 기능을 수행하던것을 Session의 static 함수로 통합
This commit is contained in:
2018-03-24 20:04:55 +09:00
parent 4bcdf8b208
commit a3f83d1e95
110 changed files with 367 additions and 343 deletions
+4 -4
View File
@@ -3,15 +3,15 @@ namespace sammo;
require_once('_common.php');
require_once(ROOT.'/f_config/DB.php');
require_once(ROOT.'/f_config/SESSION.php');
$session = Session::requireLogin();
$db = getRootDB();
$userGrade = $SESSION->getGrade();
$userGrade = $session->userGrade;
session_write_close();
$session->setReadOnly();
if($userGrade < 6){
header('Location:../');
header('Location:'.ROOT);
die();
}
?>