This commit is contained in:
2026-01-30 17:20:52 +09:00
commit 21b6332c9c
459 changed files with 190743 additions and 0 deletions

155
kngil/skin/adm.php Normal file
View File

@@ -0,0 +1,155 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'].'/kngil/bbs/adm_guard.php';
?>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>큰길회원 list</title>
<!-- CSS -->
<link rel="stylesheet" href="/kngil/css/adm_style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/vitmalina/w2ui@master/dist/w2ui.min.css">
</head>
<body>
<a href="/kngil/skin/index.php" class="btn-home-fixed" title="홈으로">
<svg class="icon-home"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round">
<path d="M3 11L12 3l9 8"/>
<path d="M5 10v10h5v-6h4v6h5V10"/>
</svg>
</a>
<!-- =========================
페이지 타이틀 + 우측 버튼
========================= -->
<h1 class="adm-title">
큰길회원 list
<div class="adm-title-actions">
<button id="btnfaq" class="btn-faq">
F&Q 내용 등록
</button>
<button id="btnServiceRegister" class="btn-service">
서비스등록
</button>
<button id="btnPurchaseHistory" class="btn-history">
구매이력
</button>
<button id="btnProductManage" class="btn-product">
상품등록
</button>
</div>
</h1>
<div class="super-search-wrap">
<!-- 🔹 좌측: 검색 영역 -->
<div class="super-search">
<select id="schMemberStatus">
<option value="">회원상태 전체</option>
<option value="Y">사용중</option>
<option value="N">미사용</option>
</select>
<input type="text" id="schMemberName" placeholder="회원명 입력">
<input type="number" id="schRemainArea" placeholder="잔여면적(㎡ 이하)">
<!-- ✅ 검색버튼은 여기 -->
<button id="btnSearch">검색</button>
</div>
<!-- 🔹 우측: 저장 버튼 -->
<button id="btnSave">저장</button>
</div>
<!-- =========================
상단 Grid (회사 / 관리자)
========================= -->
<div class="card">
<div id="userGrid" style="height:520px;"></div>
</div>
<!-- =========================
하단 Grid (회사 사용자 목록)
========================= -->
<div class="card" id="detailCard" style="display:none;">
<div id="detailGrid" style="height:260px;"></div>
</div>
<!-- =========================
ES Module
========================= -->
<script type="module">
import { w2ui,w2alert } from 'https://cdn.jsdelivr.net/gh/vitmalina/w2ui@master/dist/w2ui.es6.min.js'
import { createSuperAdminGrid, bindSaveButton } from '/kngil/js/adm.js'
import { createUserGrid } from '/kngil/js/adm_comp.js'
import { openPurchaseHistoryPopup } from '/kngil/js/adm_purch_popup.js' //구매이력
import { openProductPopup } from '/kngil/js/adm_product_popup.js'
import { openfaqPopup } from '/kngil/js/adm_faq_popup.js'
// =========================
// 상단 회사 Grid 생성
// =========================
createSuperAdminGrid('#userGrid')
bindSaveButton()
// =========================
// 하단 사용자 Grid 생성 (빈 상태)
// =========================
createUserGrid('#detailGrid', {
loadSummary: false
})
// =========================
// 구매이력 버튼
// =========================
// 구매이력 버튼
/*
document.getElementById('btnPurchaseHistory')
.addEventListener('click', () => {
// 실제로는 선택된 회원ID를 넘길 예정
openPurchaseHistoryPopup('TEST001')
})
*/
// 💡 PHP 세션에서 로그인한 회원 ID 가져오기
// 세션 배열 구조에 따라 $_SESSION['login']['member_id']를 참조합니다.
const loginMemberId = "<?php echo $_SESSION['login']['member_id'] ?? ''; ?>";
const isSuperAdmin = <?php echo IS_SUPER_ADMIN ? 'true' : 'false'; ?>; // 관리자 여부
// 구매이력 버튼 클릭 이벤트
document.getElementById('btnPurchaseHistory')
.addEventListener('click', () => {
if (!loginMemberId) {
alert('로그인 세션이 만료되었거나 회원 정보를 찾을 수 없습니다.');
return;
}
// 'TEST001' 대신 실제 로그인한 세션 ID를 전달합니다.
openPurchaseHistoryPopup('',isSuperAdmin);
})
// =========================
// 상품등록 버튼
// =========================
document.getElementById('btnProductManage')
.addEventListener('click', () => {
openProductPopup()
})
// =========================
// F&Q 버튼
// =========================
document.getElementById('btnfaq')
.addEventListener('click', () => {
openfaqPopup()
})
</script>
</body>
</html>