Normalize admin routes and docker config
This commit is contained in:
@@ -5,6 +5,22 @@ if (session_status() === PHP_SESSION_NONE) {
|
||||
|
||||
$isLogin = isset($_SESSION['login']);
|
||||
$auth = $_SESSION['login']['auth_bc'] ?? '';
|
||||
$loginName = $_SESSION['login']['idp_name'] ?? ($_SESSION['login']['user_nm'] ?? '');
|
||||
$loginEmail = $_SESSION['login']['idp_email'] ?? ($_SESSION['login']['email'] ?? '');
|
||||
$displayName = $loginName ?: ($loginEmail ?: '');
|
||||
$displayEmail = $loginEmail;
|
||||
if ($displayName === 'Unknown') {
|
||||
$displayName = '';
|
||||
}
|
||||
if ($displayEmail === 'Unknown') {
|
||||
$displayEmail = '';
|
||||
}
|
||||
if ($displayName === $displayEmail) {
|
||||
$displayEmail = '';
|
||||
}
|
||||
if ($displayName === '') {
|
||||
$displayName = '사용자';
|
||||
}
|
||||
|
||||
// 권한 그룹
|
||||
$isSuperAdmin = in_array($auth, ['BS100100', 'BS100200']);
|
||||
@@ -30,6 +46,53 @@ $isCompanyAdmin = in_array($auth, ['BS100100', 'BS100200', 'BS100300', 'BS100400
|
||||
.icon-btn:hover img {
|
||||
opacity: 1;
|
||||
}
|
||||
.auth-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.btn-oidc-top {
|
||||
--color-primary: #f95523;
|
||||
--color-primary-border: #ca3f14;
|
||||
background: var(--color-primary, #f95523);
|
||||
border: 1px solid var(--color-primary-border, #ca3f14);
|
||||
color: #fff;
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.btn-oidc-top:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.auth-user {
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.btn-logout-top {
|
||||
--color-secondary: #3a3a3a;
|
||||
--color-secondary-border: #2a2a2a;
|
||||
background: var(--color-secondary, #3a3a3a);
|
||||
border: 1px solid var(--color-secondary-border, #2a2a2a);
|
||||
color: #fff;
|
||||
padding: 8px 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
margin-left: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-logout-top:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
/* 툴팁 래퍼 */
|
||||
.tooltip {
|
||||
position: relative;
|
||||
@@ -85,16 +148,29 @@ $isCompanyAdmin = in_array($auth, ['BS100100', 'BS100200', 'BS100300', 'BS100400
|
||||
<div class="header-wrap">
|
||||
<header class="header">
|
||||
<h1>
|
||||
<a href="/kngil/skin/index.php">KNGIL</a>
|
||||
<a href="/">KNGIL</a>
|
||||
</h1>
|
||||
|
||||
<div class="header-right">
|
||||
<div class="auth-status">
|
||||
<?php if ($isLogin): ?>
|
||||
<span class="auth-user">
|
||||
<?= htmlspecialchars($displayName) ?>
|
||||
<?php if ($displayEmail): ?>
|
||||
(<?= htmlspecialchars($displayEmail) ?>)
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<a href="/kngil/bbs/logout.php" class="btn-logout-top">로그아웃</a>
|
||||
<?php else: ?>
|
||||
<button type="button" class="btn-oidc-top" data-oidc-login>[바론 통합로그인]</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($isLogin): ?>
|
||||
|
||||
<!-- 통합 회원관리 (관리자/개발자만) -->
|
||||
<?php if ($isSuperAdmin): ?>
|
||||
<a href="/kngil/skin/adm.php"
|
||||
<a href="/admin"
|
||||
class="icon-btn tooltip">
|
||||
<img src="/kngil/img/ico/ico_super_admin.svg" class="header-icon" alt="통합 회원관리">
|
||||
<span class="tooltip-text">통합 회원관리</span>
|
||||
@@ -103,7 +179,7 @@ $isCompanyAdmin = in_array($auth, ['BS100100', 'BS100200', 'BS100300', 'BS100400
|
||||
|
||||
<!-- 회사 관리자 (관리자/개발자/메인/서브) -->
|
||||
<?php if ($isCompanyAdmin): ?>
|
||||
<a href="/kngil/skin/adm_comp.php"
|
||||
<a href="/admin/company"
|
||||
class="icon-btn tooltip">
|
||||
<img src="/kngil/img/ico/ico_company_admin.svg" class="header-icon" alt="회사 관리자">
|
||||
<span class="tooltip-text">회사 관리자</span>
|
||||
@@ -112,30 +188,23 @@ $isCompanyAdmin = in_array($auth, ['BS100100', 'BS100200', 'BS100300', 'BS100400
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 기존 사용자 메뉴 -->
|
||||
<div class="menu-box">
|
||||
<button class="menu-user">
|
||||
<img src="/kngil/img/ico/ico_user.svg" alt="user">
|
||||
</button>
|
||||
<?php if ($isLogin): ?>
|
||||
<!-- 기존 사용자 메뉴 -->
|
||||
<div class="menu-box">
|
||||
<button class="menu-user">
|
||||
<img src="/kngil/img/ico/ico_user.svg" alt="user">
|
||||
</button>
|
||||
|
||||
<ul class="menu-list">
|
||||
<!-- 비로그인 -->
|
||||
<li class="<?= $isLogin ? 'd-none' : '' ?>">
|
||||
<a class="my-join" href="javascript:agreement();">회원가입</a>
|
||||
</li>
|
||||
<li class="<?= $isLogin ? 'd-none' : '' ?>">
|
||||
<a class="my-login" href="javascript:login();">로그인</a>
|
||||
</li>
|
||||
|
||||
<!-- 로그인 -->
|
||||
<li class="<?= $isLogin ? '' : 'd-none' ?>">
|
||||
<a class="my-join" href="javascript:mypage01()">마이페이지</a>
|
||||
</li>
|
||||
<li class="<?= $isLogin ? '' : 'd-none' ?>">
|
||||
<a class="my-login" href="/kngil/bbs/logout.php">로그아웃</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="menu-list">
|
||||
<li>
|
||||
<a class="my-join" href="javascript:mypage01()">마이페이지</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="my-login" href="/kngil/bbs/logout.php">로그아웃</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div>
|
||||
<button class="menu-all">
|
||||
|
||||
Reference in New Issue
Block a user