최초 커밋
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
// upload_common.php
|
||||
// 파일 업로드 전용 공통 초기화
|
||||
|
||||
// (1) Descope 세션 불러오기
|
||||
require_once __DIR__ . '/../skin/member/basic/descope_session.php';
|
||||
|
||||
// (2) 현재 로그인 사용자 정보 안전하게 꺼내기
|
||||
$currentUserId = $_SESSION['user']['loginIds'][0] ?? '';
|
||||
$currentUserName = $_SESSION['user']['name'] ?? '알 수 없음';
|
||||
$currentUserEmail= $_SESSION['user']['email'] ?? '';
|
||||
|
||||
// (3) 관리자 여부 플래그
|
||||
$ADMIN_EMAILS = [
|
||||
'kjy0426@hanmaceng.co.kr',
|
||||
'b24014@hanmaceng.co.kr',
|
||||
'b23065@hanmaceng.co.kr',
|
||||
'b23008@baroncs.co.kr',
|
||||
'cjy627@hanmaceng.co.kr',
|
||||
'b23072@hanmaceng.co.kr',
|
||||
];
|
||||
$isAdmin = in_array($currentUserId, $ADMIN_EMAILS, true);
|
||||
|
||||
// (4) JSON 응답 시 헤더 자동 세팅 (필요 시)
|
||||
if (!headers_sent()) {
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
}
|
||||
Reference in New Issue
Block a user