권한 없는 사용자의 메뉴 접근 방지를 위한 코드 추가
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
// 베이커리 제품목록록
|
||||
include_once "_common.php";
|
||||
if (!isset($_SESSION['user_id'])) header( 'Location: FG_MANAGER_URL' ); // 로그인 되어있지 않으면 로그인 페이지로 보냄
|
||||
|
||||
include_once 'head.sub.php';
|
||||
include_once FG_MANAGER_PATH."/head.php";
|
||||
|
||||
// 검색 변수 초기화
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
include_once "_common.php";
|
||||
if (!isset($_SESSION['user_id'])) header( 'Location: FG_MANAGER_URL' ); // 로그인 되어있지 않으면 로그인 페이지로 보냄
|
||||
|
||||
include_once 'head.sub.php';
|
||||
include_once FG_MANAGER_PATH."/head.php";
|
||||
|
||||
// 검색 변수 초기화
|
||||
|
||||
13
manager/bakery/head.sub.php
Normal file
13
manager/bakery/head.sub.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
if (!isset($_SESSION['user_id'])) exit; //페이지 직접 실행 방지
|
||||
|
||||
// 권한부여 및 체크
|
||||
$pageAuth = array(
|
||||
'abc',
|
||||
'firstgarden',
|
||||
'bakery'
|
||||
);
|
||||
if ( !in_array($_SESSION['user_id'], $pageAuth) ) {
|
||||
alert('권한이 없습니다', false);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user