Normalize admin routes and docker config
This commit is contained in:
23
.htaccess
Normal file
23
.htaccess
Normal file
@@ -0,0 +1,23 @@
|
||||
RewriteEngine On
|
||||
|
||||
# Skip existing files and directories.
|
||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
# Admin UI
|
||||
RewriteRule ^admin/?$ /kngil/skin/adm.php [L]
|
||||
RewriteRule ^admin/company/?$ /kngil/skin/adm_comp.php [L]
|
||||
|
||||
# Admin APIs
|
||||
RewriteRule ^admin/api/super/?$ /kngil/bbs/adm.php [QSA,L]
|
||||
RewriteRule ^admin/api/company/?$ /kngil/bbs/adm_comp.php [QSA,L]
|
||||
RewriteRule ^admin/api/service/?$ /kngil/bbs/adm_service.php [QSA,L]
|
||||
RewriteRule ^admin/api/purchase-history/?$ /kngil/bbs/adm_purch_popup.php [QSA,L]
|
||||
RewriteRule ^admin/api/use-history/?$ /kngil/bbs/adm_use_history.php [QSA,L]
|
||||
RewriteRule ^admin/api/product/?$ /kngil/bbs/adm_product_popup.php [QSA,L]
|
||||
RewriteRule ^admin/api/product/save/?$ /kngil/bbs/adm_product_popup_save.php [QSA,L]
|
||||
RewriteRule ^admin/api/product/delete/?$ /kngil/bbs/adm_product_popup_delete.php [QSA,L]
|
||||
RewriteRule ^admin/api/faq/?$ /kngil/bbs/adm_faq_popup.php [QSA,L]
|
||||
RewriteRule ^admin/api/faq/save/?$ /kngil/bbs/adm_faq_popup_save.php [QSA,L]
|
||||
RewriteRule ^admin/api/faq/delete/?$ /kngil/bbs/adm_faq_popup_delete.php [QSA,L]
|
||||
10
README.md
10
README.md
@@ -2,15 +2,19 @@
|
||||
|
||||
## 빠른 시작
|
||||
```bash
|
||||
docker compose up --build
|
||||
docker compose up -d --build
|
||||
```
|
||||
- 접속: `http://localhost:8080`
|
||||
```bash
|
||||
docker compose down
|
||||
```
|
||||
|
||||
## 환경변수
|
||||
`docker-compose.yml`에서 기본값을 사용하며, 필요 시 `.env`로 덮어쓸 수 있습니다.
|
||||
|
||||
- `DB_HOST` (기본값: `db`)
|
||||
- `DB_PORT` (기본값: `5432`)
|
||||
- `DB_PORT` (기본값: `5432`) - 웹 컨테이너가 DB에 접속할 때 사용하는 포트
|
||||
- `DB_HOST_PORT` (기본값: `5432`) - 외부에서 포트포워딩으로 접속할 때 사용하는 호스트 포트
|
||||
- `DB_NAME` (기본값: `kngil`)
|
||||
- `DB_USER` (기본값: `postgres`)
|
||||
- `DB_PASS` (기본값: `postgres`)
|
||||
@@ -43,5 +47,5 @@ docker compose down -v
|
||||
- `kngil/bbs/sales_results.php`는 410 응답으로 비활성 처리되어 있습니다.
|
||||
|
||||
## PostgreSQL 이미지 버전
|
||||
- 기본값은 `postgres:18`입니다.
|
||||
- 기본값은 `postgres:16`입니다.
|
||||
- 이미지 풀 실패 시 `docker-compose.yml`의 태그를 사용 가능한 버전으로 변경하세요.
|
||||
|
||||
@@ -21,8 +21,14 @@ services:
|
||||
|
||||
db:
|
||||
image: postgres:16
|
||||
# ports:
|
||||
# - "5432:5432"
|
||||
ports:
|
||||
- "0.0.0.0:${DB_HOST_PORT:-5432}:5432"
|
||||
command:
|
||||
- "postgres"
|
||||
- "-c"
|
||||
- "listen_addresses=*"
|
||||
- "-c"
|
||||
- "hba_file=/etc/postgresql/pg_hba.conf"
|
||||
environment:
|
||||
POSTGRES_DB: ${DB_NAME:-kngil}
|
||||
POSTGRES_USER: ${DB_USER:-postgres}
|
||||
@@ -30,6 +36,7 @@ services:
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
- ./docker/initdb/01_kngil_DB.sql:/docker-entrypoint-initdb.d/01_kngil_DB.sql:ro
|
||||
- ./docker/postgres/pg_hba.conf:/etc/postgresql/pg_hba.conf:ro
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
5
docker/postgres/pg_hba.conf
Normal file
5
docker/postgres/pg_hba.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Allow TCP connections. Narrow the address range in production.
|
||||
#
|
||||
host all all 0.0.0.0/0 scram-sha-256
|
||||
host all all ::/0 scram-sha-256
|
||||
@@ -7,7 +7,7 @@ declare(strict_types=1);
|
||||
// 1. 기본 상수
|
||||
// ---------------------------------
|
||||
define('ROOT', __DIR__);
|
||||
define('SKIN_PATH', ROOT.'/skin');
|
||||
define('SKIN_PATH', ROOT.'/kngil/skin');
|
||||
|
||||
// ---------------------------------
|
||||
// 2. 페이지 결정
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
<?php
|
||||
// /kngil/auth/oidc-callback.php
|
||||
session_start();
|
||||
ini_set('log_errors', '1');
|
||||
ini_set('error_log', '/proc/self/fd/2');
|
||||
require_once dirname(__DIR__) . '/vendor/autoload.php';
|
||||
require_once dirname(__DIR__) . '/bbs/db_conn.php';
|
||||
$config = require_once dirname(__DIR__) . '/bbs/oidc_config.php';
|
||||
|
||||
use Jumbojett\OpenIDConnectClient;
|
||||
|
||||
$usersTable = 'kngil.users';
|
||||
$membersTable = 'kngil.members';
|
||||
|
||||
$oidc = new OpenIDConnectClient(
|
||||
$config['issuer'],
|
||||
$config['client_id'],
|
||||
@@ -16,16 +21,124 @@ $oidc = new OpenIDConnectClient(
|
||||
$oidc->setRedirectURL($config['redirect_url']);
|
||||
|
||||
try {
|
||||
$stmt = $pdo->query("SELECT to_regclass('kngil.users') AS reg");
|
||||
$reg = $stmt ? $stmt->fetchColumn() : null;
|
||||
if (!$reg) {
|
||||
$stmt = $pdo->query("SELECT to_regclass('public.users') AS reg");
|
||||
$reg = $stmt ? $stmt->fetchColumn() : null;
|
||||
if ($reg) {
|
||||
$usersTable = 'public.users';
|
||||
$membersTable = 'public.members';
|
||||
} else {
|
||||
throw new Exception(
|
||||
"사용자 테이블을 찾을 수 없습니다. DB 초기화가 필요합니다. "
|
||||
. "docker compose down -v 후 다시 실행하거나, "
|
||||
. "DB_NAME/DB_USER/DB_PASS 설정을 확인하세요."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$memberReg = $pdo->query("SELECT to_regclass('{$membersTable}') AS reg");
|
||||
$memberReg = $memberReg ? $memberReg->fetchColumn() : null;
|
||||
if (!$memberReg) {
|
||||
$altMembersTable = $membersTable === 'kngil.members' ? 'public.members' : 'kngil.members';
|
||||
$memberReg = $pdo->query("SELECT to_regclass('{$altMembersTable}') AS reg");
|
||||
$memberReg = $memberReg ? $memberReg->fetchColumn() : null;
|
||||
if ($memberReg) {
|
||||
$membersTable = $altMembersTable;
|
||||
} else {
|
||||
throw new Exception("회원 테이블을 찾을 수 없습니다. DB 초기화가 필요합니다.");
|
||||
}
|
||||
}
|
||||
|
||||
$pdo->exec("ALTER TABLE {$usersTable} ADD COLUMN IF NOT EXISTS oidc_sub VARCHAR(255) UNIQUE");
|
||||
|
||||
if (!$oidc->authenticate()) {
|
||||
throw new Exception("Authentication failed");
|
||||
}
|
||||
|
||||
$userInfo = $oidc->requestUserInfo();
|
||||
$idToken = $oidc->getIdToken();
|
||||
$accessToken = $oidc->getAccessToken();
|
||||
$jwtClaims = [];
|
||||
if (!empty($idToken)) {
|
||||
$parts = explode('.', $idToken);
|
||||
if (count($parts) >= 2) {
|
||||
$payload = strtr($parts[1], '-_', '+/');
|
||||
$padding = 4 - (strlen($payload) % 4);
|
||||
if ($padding < 4) {
|
||||
$payload .= str_repeat('=', $padding);
|
||||
}
|
||||
$decoded = json_decode(base64_decode($payload), true);
|
||||
if (is_array($decoded)) {
|
||||
$jwtClaims = $decoded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 디버그용: ID 토큰 확보 여부 로그 출력 (파일)
|
||||
$logDir = dirname(__DIR__) . '/log';
|
||||
if (!is_dir($logDir)) {
|
||||
@mkdir($logDir, 0775, true);
|
||||
}
|
||||
$logPath = $logDir . '/oidc_debug.log';
|
||||
if (!is_writable($logDir)) {
|
||||
$logPath = '/tmp/oidc_debug.log';
|
||||
error_log('[OIDC_DEBUG] log_dir_not_writable, fallback=/tmp/oidc_debug.log');
|
||||
}
|
||||
$tokenInfo = empty($idToken) ? 'MISSING' : ('PRESENT len=' . strlen($idToken));
|
||||
$claimKeys = empty($jwtClaims) ? 'none' : implode(',', array_keys($jwtClaims));
|
||||
$logLine = sprintf(
|
||||
"[%s] host=%s uri=%s sid=%s id_token=%s claims=%s\n",
|
||||
date('c'),
|
||||
$_SERVER['HTTP_HOST'] ?? '-',
|
||||
$_SERVER['REQUEST_URI'] ?? '-',
|
||||
session_id(),
|
||||
$tokenInfo,
|
||||
$claimKeys
|
||||
);
|
||||
$writeOk = @file_put_contents($logPath, $logLine, FILE_APPEND);
|
||||
if ($writeOk === false) {
|
||||
error_log('[OIDC_DEBUG] log_write_failed path=' . $logPath);
|
||||
}
|
||||
// 디버그용: userInfo/claims 전체 덤프 (토큰 제외)
|
||||
$dump = [
|
||||
'userInfo' => $userInfo,
|
||||
'jwtClaims' => $jwtClaims
|
||||
];
|
||||
$dumpLine = sprintf(
|
||||
"[%s] oidc_dump=%s\n",
|
||||
date('c'),
|
||||
json_encode($dump, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)
|
||||
);
|
||||
$dumpOk = @file_put_contents($logPath, $dumpLine, FILE_APPEND);
|
||||
if ($dumpOk === false) {
|
||||
error_log('[OIDC_DEBUG] dump_write_failed path=' . $logPath);
|
||||
}
|
||||
// 도커 로그로도 출력
|
||||
error_log('[OIDC_DEBUG] ' . $dumpLine);
|
||||
// $userInfo 에 포함된 데이터 예시: sub, email, name, preferred_username 등
|
||||
|
||||
$email = $userInfo->email ?? null;
|
||||
$sub = $userInfo->sub ?? null; // IDP 고유 식별자
|
||||
$name = $userInfo->name ?? ($userInfo->preferred_username ?? 'Unknown');
|
||||
$preferred = $userInfo->preferred_username ?? null;
|
||||
$name = $userInfo->name ?? null;
|
||||
if (!$email && isset($jwtClaims['email'])) {
|
||||
$email = $jwtClaims['email'];
|
||||
}
|
||||
if (!$name && isset($jwtClaims['name'])) {
|
||||
$name = $jwtClaims['name'];
|
||||
}
|
||||
if (!$name && $preferred) {
|
||||
$name = $preferred;
|
||||
}
|
||||
if (!$name && $email) {
|
||||
$name = $email;
|
||||
}
|
||||
if (!$name && $sub) {
|
||||
$seed = strtolower(preg_replace('/[^a-z0-9]/', '', (string)$sub));
|
||||
$name = 'oidc_' . substr($seed, 0, 10);
|
||||
}
|
||||
|
||||
if (!$email && !$sub) {
|
||||
throw new Exception("IDP provided insufficient user information.");
|
||||
@@ -33,7 +146,7 @@ try {
|
||||
|
||||
// 1. 사용자 매핑 (sub 또는 email 기준)
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT * FROM kngil.users
|
||||
SELECT * FROM {$usersTable}
|
||||
WHERE (oidc_sub = :sub OR LOWER(email) = LOWER(:email))
|
||||
AND use_yn = 'Y'
|
||||
LIMIT 1
|
||||
@@ -42,14 +155,99 @@ try {
|
||||
$user = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$user) {
|
||||
// [정책 선택] 새 사용자 자동 생성 또는 로그인 거부
|
||||
// 여기서는 예시로 로그인 거부 처리
|
||||
throw new Exception("등록되지 않은 사용자입니다. 관리자에게 문의하세요. (IDP: $email)");
|
||||
$defaultMemberId = getenv('OIDC_DEFAULT_MEMBER_ID') ?: '';
|
||||
if ($defaultMemberId !== '') {
|
||||
$checkMember = $pdo->prepare("SELECT 1 FROM {$membersTable} WHERE member_id = :member_id LIMIT 1");
|
||||
$checkMember->execute([':member_id' => $defaultMemberId]);
|
||||
if (!$checkMember->fetchColumn()) {
|
||||
throw new Exception("OIDC_DEFAULT_MEMBER_ID가 members에 존재하지 않습니다: {$defaultMemberId}");
|
||||
}
|
||||
} else {
|
||||
$memberStmt = $pdo->query("SELECT member_id FROM {$membersTable} ORDER BY member_id ASC LIMIT 1");
|
||||
$defaultMemberId = $memberStmt ? $memberStmt->fetchColumn() : '';
|
||||
if (!$defaultMemberId) {
|
||||
throw new Exception("기본 member_id를 찾을 수 없습니다. OIDC_DEFAULT_MEMBER_ID를 설정하세요.");
|
||||
}
|
||||
}
|
||||
|
||||
$defaultAuth = getenv('OIDC_DEFAULT_AUTH_BC') ?: 'BS100500';
|
||||
|
||||
$baseId = $userInfo->preferred_username ?? ($email ? explode('@', $email)[0] : '');
|
||||
$baseId = strtolower(preg_replace('/[^a-z0-9]/', '', $baseId));
|
||||
if ($baseId === '') {
|
||||
$seed = strtolower(preg_replace('/[^a-z0-9]/', '', (string)($sub ?? 'oidc')));
|
||||
$baseId = 'oidc' . substr($seed, 0, 10);
|
||||
}
|
||||
$baseId = substr($baseId, 0, 16);
|
||||
$userId = $baseId;
|
||||
|
||||
$existsStmt = $pdo->prepare("SELECT 1 FROM {$usersTable} WHERE LOWER(user_id) = LOWER(:user_id) LIMIT 1");
|
||||
$suffix = 1;
|
||||
while (true) {
|
||||
$existsStmt->execute([':user_id' => $userId]);
|
||||
if (!$existsStmt->fetchColumn()) {
|
||||
break;
|
||||
}
|
||||
$tail = sprintf('%02d', $suffix);
|
||||
$userId = substr($baseId, 0, 20 - strlen($tail)) . $tail;
|
||||
$suffix++;
|
||||
if ($suffix > 99) {
|
||||
$userId = 'oidc' . bin2hex(random_bytes(4));
|
||||
$userId = substr($userId, 0, 20);
|
||||
}
|
||||
}
|
||||
|
||||
$userNm = $name ?: ($email ?: $userId);
|
||||
$rawPhone = $userInfo->phone_number ?? '';
|
||||
$digits = preg_replace('/\D/', '', $rawPhone);
|
||||
if (strlen($digits) === 11) {
|
||||
$telNo = substr($digits, 0, 3) . '-' . substr($digits, 3, 4) . '-' . substr($digits, 7, 4);
|
||||
} elseif (strlen($digits) === 10) {
|
||||
$telNo = substr($digits, 0, 3) . '-' . substr($digits, 3, 3) . '-' . substr($digits, 6, 4);
|
||||
} else {
|
||||
$telNo = '000-0000-0000';
|
||||
}
|
||||
|
||||
$insert = $pdo->prepare("
|
||||
INSERT INTO {$usersTable} (
|
||||
member_id, user_id, user_pw, user_nm,
|
||||
dept_nm, posit_nm, tel_no, email,
|
||||
auth_bc, use_yn, rmks,
|
||||
cid, cdt, mid, mdt, oidc_sub
|
||||
) VALUES (
|
||||
:member_id, :user_id, NULL, :user_nm,
|
||||
:dept_nm, :posit_nm, :tel_no, :email,
|
||||
:auth_bc, 'Y', :rmks,
|
||||
:cid, CURRENT_TIMESTAMP, :mid, CURRENT_TIMESTAMP, :oidc_sub
|
||||
)
|
||||
");
|
||||
$insert->execute([
|
||||
':member_id' => $defaultMemberId,
|
||||
':user_id' => $userId,
|
||||
':user_nm' => $userNm,
|
||||
':dept_nm' => $userInfo->department ?? null,
|
||||
':posit_nm' => $userInfo->title ?? null,
|
||||
':tel_no' => $telNo,
|
||||
':email' => $email,
|
||||
':auth_bc' => $defaultAuth,
|
||||
':rmks' => 'OIDC auto-registered',
|
||||
':cid' => $userId,
|
||||
':mid' => $userId,
|
||||
':oidc_sub' => $sub
|
||||
]);
|
||||
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT * FROM {$usersTable}
|
||||
WHERE LOWER(user_id) = LOWER(:user_id)
|
||||
LIMIT 1
|
||||
");
|
||||
$stmt->execute([':user_id' => $userId]);
|
||||
$user = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
// 2. oidc_sub 업데이트 (최초 연동 시)
|
||||
if (empty($user['oidc_sub']) && $sub) {
|
||||
$upd = $pdo->prepare("UPDATE kngil.users SET oidc_sub = :sub WHERE user_id = :id");
|
||||
$upd = $pdo->prepare("UPDATE {$usersTable} SET oidc_sub = :sub WHERE user_id = :id");
|
||||
$upd->execute([':sub' => $sub, ':id' => $user['user_id']]);
|
||||
}
|
||||
|
||||
@@ -63,20 +261,42 @@ try {
|
||||
'dept_nm' => $user['dept_nm'] ?? null,
|
||||
'tel_no' => $user['tel_no'] ?? null,
|
||||
'email' => $user['email'] ?? null,
|
||||
'idp_name' => $name ?: null,
|
||||
'idp_email' => $email ?? null,
|
||||
'idp_id_token' => $idToken ?? null,
|
||||
'idp_access_token' => $accessToken ?? null,
|
||||
'idp_claims' => $jwtClaims ?? null,
|
||||
'oidc_mode' => true // OIDC 로그인을 나타내는 플래그
|
||||
];
|
||||
|
||||
// 로그인 완료 후 부모 창에 알리고 종료
|
||||
session_write_close();
|
||||
|
||||
// 로그인 완료 후 부모 창에 알리고 종료 (팝업이 아닐 경우 메인으로 이동)
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<script>
|
||||
if (window.opener) {
|
||||
window.opener.postMessage({ type: 'OIDC_LOGIN_SUCCESS' }, window.location.origin);
|
||||
}
|
||||
window.close();
|
||||
(function () {
|
||||
const target = '/kngil/skin/index.php';
|
||||
if (window.opener && !window.opener.closed) {
|
||||
try {
|
||||
window.opener.postMessage({ type: 'OIDC_LOGIN_SUCCESS' }, window.location.origin);
|
||||
} catch (e) {
|
||||
// 팝업 차단/보안 정책으로 실패할 수 있어 무시합니다.
|
||||
}
|
||||
window.close();
|
||||
setTimeout(function () {
|
||||
window.location.href = target;
|
||||
}, 300);
|
||||
} else {
|
||||
window.location.href = target;
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
<a href="/kngil/skin/index.php">메인으로 이동</a>
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
|
||||
@@ -7,7 +7,7 @@ if (session_status() === PHP_SESSION_NONE) {
|
||||
1. 로그인 체크
|
||||
========================= */
|
||||
if (empty($_SESSION['login'])) {
|
||||
header('Location: /kngil/skin/index.php');
|
||||
header('Location: /');
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -33,4 +33,4 @@ if (!in_array($auth_bc, $ALLOW_AUTH, true)) {
|
||||
3. 권한 플래그 (중요)
|
||||
========================= */
|
||||
define('IS_SUPER_ADMIN', in_array($auth_bc, ['BS100100','BS100200'], true));
|
||||
define('IS_COMPANY_ADMIN', in_array($auth_bc, ['BS100300','BS100400'], true));
|
||||
define('IS_COMPANY_ADMIN', in_array($auth_bc, ['BS100300','BS100400'], true));
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
@charset "UTF-8";
|
||||
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap");
|
||||
:root {
|
||||
--color-primary: #f95523;
|
||||
--color-primary-border: #ca3f14;
|
||||
}
|
||||
html {
|
||||
font-size: 10px;
|
||||
}
|
||||
@@ -3697,4 +3701,4 @@ i {
|
||||
html {
|
||||
font-size: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ userGrid
|
||||
document.getElementById('detailCard').style.display = 'block'
|
||||
|
||||
// 하단 사용자 로드
|
||||
// fetch(`/kngil/bbs/adm.php?action=user_list&member_id=${record.member_id}`)
|
||||
// fetch(`/admin/api/super?action=user_list&member_id=${record.member_id}`)
|
||||
// .then(res => res.json())
|
||||
// .then(d => {
|
||||
// if (d.status !== 'success') {
|
||||
@@ -243,7 +243,7 @@ function formatBizNo(value) {
|
||||
상단 회사 목록 로드
|
||||
---------------------------------------- */
|
||||
function loadCompanies() {
|
||||
fetch('/kngil/bbs/adm.php')
|
||||
fetch('/admin/api/super')
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
if (!json.records) return
|
||||
@@ -340,7 +340,7 @@ export function bindSaveButton() {
|
||||
return
|
||||
}
|
||||
|
||||
fetch('/kngil/bbs/adm.php?action=save', {
|
||||
fetch('/admin/api/super?action=save', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
||||
@@ -9,7 +9,7 @@ function destroyGrid(name) {
|
||||
}
|
||||
|
||||
function loadBaseCode(mainCd) {
|
||||
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
|
||||
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
if (json.status !== 'success') {
|
||||
@@ -144,7 +144,7 @@ export async function createUserGrid(boxId, options = {}) {
|
||||
}
|
||||
|
||||
function loadUsers() {
|
||||
fetch('/kngil/bbs/adm_comp.php')
|
||||
fetch('/admin/api/company')
|
||||
.then(res => res.text()) // 🔥 먼저 text로 확인
|
||||
.then(text => {
|
||||
try {
|
||||
@@ -168,7 +168,7 @@ export function loadUsersByMember(member_id) {
|
||||
return
|
||||
}
|
||||
|
||||
fetch('/kngil/bbs/adm_comp.php')
|
||||
fetch('/admin/api/company')
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
g.clear()
|
||||
@@ -198,7 +198,7 @@ export function setUserGridMode(mode = 'view') {
|
||||
|
||||
export function loadData({ loadSummary = true } = {}) {
|
||||
|
||||
fetch('/kngil/bbs/adm_comp.php')
|
||||
fetch('/admin/api/company')
|
||||
.then(res => res.json())
|
||||
.then(async d => {
|
||||
|
||||
@@ -323,7 +323,7 @@ document.getElementById('btnSave_comp')?.addEventListener('click', () => {
|
||||
console.log('INSERTS', inserts)
|
||||
console.log('UPDATES', updates)
|
||||
|
||||
fetch('/kngil/bbs/adm_comp.php', {
|
||||
fetch('/admin/api/company', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -408,7 +408,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
|
||||
w2confirm(`선택한 ${ids.length}명의 사용자를 삭제하시겠습니까?`)
|
||||
.yes(() => {
|
||||
|
||||
fetch('/kngil/bbs/adm_comp.php', {
|
||||
fetch('/admin/api/company', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -436,7 +436,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
|
||||
})
|
||||
|
||||
function loadTotalArea(memberId) {
|
||||
return fetch(`/kngil/bbs/adm_comp.php?action=total_area&member_id=${memberId}`)
|
||||
return fetch(`/admin/api/company?action=total_area&member_id=${memberId}`)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
if (json.status !== 'success') {
|
||||
@@ -467,7 +467,7 @@ function doSearch() {
|
||||
}
|
||||
// ⚠️ type === 'id' 는 DB로 안 보냄
|
||||
|
||||
fetch(`/kngil/bbs/adm_comp.php?action=list`
|
||||
fetch(`/admin/api/company?action=list`
|
||||
+ `&user_nm=${encodeURIComponent(p_user_nm)}`
|
||||
+ `&dept_nm=${encodeURIComponent(p_dept_nm)}`
|
||||
+ `&use_yn=${useYn}`
|
||||
|
||||
@@ -21,7 +21,7 @@ function destroyGrid(name) {
|
||||
}
|
||||
|
||||
function loadBaseCode(mainCd) {
|
||||
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
|
||||
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
if (json.status !== 'success') {
|
||||
@@ -251,7 +251,7 @@ export function loadUsersByMember(memberId) {
|
||||
return
|
||||
}
|
||||
|
||||
fetch(`/kngil/bbs/adm_comp.php?action=list&member_id=${memberId}`)
|
||||
fetch(`/admin/api/company?action=list&member_id=${memberId}`)
|
||||
.then(res => res.json())
|
||||
.then(d => {
|
||||
|
||||
@@ -285,7 +285,7 @@ export function setUserGridMode(mode = 'view') {
|
||||
}
|
||||
|
||||
export function loadData({ loadSummary = true } = {}) {
|
||||
fetch('/kngil/bbs/adm_comp.php?action=list')
|
||||
fetch('/admin/api/company?action=list')
|
||||
.then(res => res.json())
|
||||
.then(async d => {
|
||||
|
||||
@@ -404,7 +404,7 @@ document.getElementById('btnSave_comp')?.addEventListener('click', () => {
|
||||
console.log('INSERTS', inserts)
|
||||
console.log('UPDATES', updates)
|
||||
|
||||
fetch('/kngil/bbs/adm_comp.php', {
|
||||
fetch('/admin/api/company', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -489,7 +489,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
|
||||
w2confirm(`선택한 ${ids.length}명의 사용자를 삭제하시겠습니까?`)
|
||||
.yes(() => {
|
||||
|
||||
fetch('/kngil/bbs/adm_comp.php', {
|
||||
fetch('/admin/api/company', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -517,7 +517,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
|
||||
})
|
||||
|
||||
function loadTotalArea(memberId) {
|
||||
return fetch(`/kngil/bbs/adm_comp.php?action=total_area`)
|
||||
return fetch(`/admin/api/company?action=total_area`)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
if (json.status !== 'success') {
|
||||
@@ -548,7 +548,7 @@ function doSearch() {
|
||||
}
|
||||
// ⚠️ type === 'id' 는 DB로 안 보냄
|
||||
|
||||
fetch(`/kngil/bbs/adm_comp.php?action=list`
|
||||
fetch(`/admin/api/company?action=list`
|
||||
+ `&user_nm=${encodeURIComponent(p_user_nm)}`
|
||||
+ `&dept_nm=${encodeURIComponent(p_dept_nm)}`
|
||||
+ `&use_yn=${useYn}`
|
||||
@@ -670,7 +670,7 @@ function openBulkCreatePopup(memberId) {
|
||||
|
||||
function runBulkCreate(memberId, csvUrl) {
|
||||
|
||||
fetch('/kngil/bbs/adm_comp.php', {
|
||||
fetch('/admin/api/company', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -771,7 +771,7 @@ function loadDataByMemberId(memberId) {
|
||||
return;
|
||||
}
|
||||
|
||||
fetch(`/kngil/bbs/adm_comp.php?action=list&member_id=${encodeURIComponent(memberId)}`)
|
||||
fetch(`/admin/api/company?action=list&member_id=${encodeURIComponent(memberId)}`)
|
||||
.then(res => res.json())
|
||||
.then(async d => {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ function destroyGrid(name) {
|
||||
}
|
||||
|
||||
function loadBaseCode(mainCd) {
|
||||
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
|
||||
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
if (json.status !== 'success') {
|
||||
@@ -100,7 +100,7 @@ export function openfaqPopup() {
|
||||
|
||||
// 3. 브라우저 기본 확인창 사용 (가장 확실함)
|
||||
if (confirm(`선택한 ${ids.length}개의 상품을 삭제하시겠습니까?`)) {
|
||||
fetch('/kngil/bbs/adm_faq_popup_delete.php', {
|
||||
fetch('/admin/api/faq/delete', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ action: 'delete', ids: ids })
|
||||
@@ -169,7 +169,7 @@ export function openfaqPopup() {
|
||||
console.log('INSERTS', inserts)
|
||||
console.log('UPDATES', updates)
|
||||
|
||||
fetch('/kngil/bbs/adm_faq_popup_save.php', {
|
||||
fetch('/admin/api/faq/save', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -270,7 +270,7 @@ async function loadfaqData() {
|
||||
try {
|
||||
w2ui.faqGrid.lock('조회 중...', true);
|
||||
|
||||
const response = await fetch('/kngil/bbs/adm_faq_popup.php'); // PHP 파일 호출
|
||||
const response = await fetch('/admin/api/faq'); // PHP 파일 호출
|
||||
const data = await response.json();
|
||||
|
||||
w2ui.faqGrid.clear();
|
||||
|
||||
@@ -11,7 +11,7 @@ function destroyGrid(name) {
|
||||
}
|
||||
|
||||
function loadBaseCode(mainCd) {
|
||||
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
|
||||
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
if (json.status !== 'success') {
|
||||
@@ -101,7 +101,7 @@ export function openProductPopup() {
|
||||
|
||||
// 3. 브라우저 기본 확인창 사용 (가장 확실함)
|
||||
if (confirm(`선택한 ${ids.length}개의 상품을 삭제하시겠습니까?`)) {
|
||||
fetch('/kngil/bbs/adm_product_popup_delete.php', {
|
||||
fetch('/admin/api/product/delete', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ action: 'delete', ids: ids })
|
||||
@@ -171,7 +171,7 @@ export function openProductPopup() {
|
||||
console.log('INSERTS', inserts)
|
||||
console.log('UPDATES', updates)
|
||||
|
||||
fetch('/kngil/bbs/adm_product_popup_save.php', {
|
||||
fetch('/admin/api/product/save', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -265,7 +265,7 @@ async function loadProductData() {
|
||||
try {
|
||||
w2ui.productGrid.lock('조회 중...', true);
|
||||
|
||||
const response = await fetch('/kngil/bbs/adm_product_popup.php'); // PHP 파일 호출
|
||||
const response = await fetch('/admin/api/product'); // PHP 파일 호출
|
||||
const data = await response.json();
|
||||
|
||||
w2ui.productGrid.clear();
|
||||
|
||||
@@ -117,7 +117,7 @@ async function loadPurchaseHistoryData(memberId) {
|
||||
searchParams.append('fbuy_dt', '');
|
||||
searchParams.append('tbuy_dt', '');
|
||||
|
||||
const response = await fetch('/kngil/bbs/adm_purch_popup.php', {
|
||||
const response = await fetch('/admin/api/purchase-history', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
body: searchParams
|
||||
|
||||
@@ -173,7 +173,7 @@ function addServiceFromProduct(p) {
|
||||
------------------------------------------------- */
|
||||
function loadExistingPurchase(memberId, buyDate) {
|
||||
|
||||
fetch(`/kngil/bbs/adm_service.php?member_id=${memberId}&buy_date=${buyDate}`)
|
||||
fetch(`/admin/api/service?member_id=${memberId}&buy_date=${buyDate}`)
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ function createProductList() {
|
||||
new w2grid({
|
||||
name: 'productList',
|
||||
box: '#productList',
|
||||
url: '/kngil/bbs/adm_product_popup.php',
|
||||
url: '/admin/api/product',
|
||||
columns: [
|
||||
{ field: 'itm_nm', text: '상품명', size: '120px' },
|
||||
{
|
||||
@@ -413,7 +413,7 @@ function deleteServiceImmediately(row) {
|
||||
sq_no: row.sq_no
|
||||
})
|
||||
|
||||
fetch('/kngil/bbs/adm_service.php', {
|
||||
fetch('/admin/api/service', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -446,7 +446,7 @@ function isServiceItem(r) {
|
||||
------------------------------------------------- */
|
||||
function loadExistingPurchase(memberId, buyDate) {
|
||||
|
||||
fetch('/kngil/bbs/adm_service.php', {
|
||||
fetch('/admin/api/service', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
@@ -606,7 +606,7 @@ function saveService(ctx) {
|
||||
_deleted: r._deleted || false
|
||||
}))
|
||||
|
||||
fetch('/kngil/bbs/adm_service.php', {
|
||||
fetch('/admin/api/service', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
||||
@@ -131,7 +131,7 @@ async function loadUseHistoryData(memberId = ''){
|
||||
searchParams.append('user_nm', sUnm);
|
||||
searchParams.append('dept_nm', sDnm);
|
||||
|
||||
const response = await fetch('/kngil/bbs/adm_use_history.php', {
|
||||
const response = await fetch('/admin/api/use-history', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
body: searchParams
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -894,6 +894,10 @@ function join() {
|
||||
}
|
||||
|
||||
function login() {
|
||||
if (typeof window.openOidcLogin === "function") {
|
||||
window.openOidcLogin();
|
||||
return;
|
||||
}
|
||||
$(".popup_wrap").hide();
|
||||
//새로고침 없이 다시 팝업창 열었을때 자동 입력된 id, pw 제거
|
||||
$("#login_id").val("");
|
||||
|
||||
@@ -35,23 +35,6 @@ if (form) {
|
||||
})
|
||||
}
|
||||
|
||||
// OIDC 로그인 처리
|
||||
const btnOidc = document.getElementById('btn_oidc_login')
|
||||
if (btnOidc) {
|
||||
btnOidc.addEventListener('click', () => {
|
||||
const width = 500;
|
||||
const height = 600;
|
||||
const left = (window.screen.width / 2) - (width / 2);
|
||||
const top = (window.screen.height / 2) - (height / 2);
|
||||
|
||||
window.open(
|
||||
'/kngil/auth/oidc-login.php',
|
||||
'oidc_login_popup',
|
||||
`width=${width},height=${height},left=${left},top=${top},scrollbars=yes`
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// 팝업으로부터의 메시지 수신 (로그인 성공 시 새로고침)
|
||||
window.addEventListener('message', (event) => {
|
||||
// 보안을 위해 실제 서비스에서는 event.origin을 체크하는 것이 좋습니다.
|
||||
|
||||
@@ -894,6 +894,10 @@ function join() {
|
||||
}
|
||||
|
||||
function login() {
|
||||
if (typeof window.openOidcLogin === "function") {
|
||||
window.openOidcLogin();
|
||||
return;
|
||||
}
|
||||
$(".popup_wrap").hide();
|
||||
//새로고침 없이 다시 팝업창 열었을때 자동 입력된 id, pw 제거
|
||||
$("#login_id").val("");
|
||||
|
||||
0
kngil/log/join.log
Normal file → Executable file
0
kngil/log/join.log
Normal file → Executable file
@@ -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">
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
<!-- //HEADER -->
|
||||
|
||||
<?php
|
||||
include __DIR__ . "/pop_login.php";
|
||||
include __DIR__ . "/pop_join.php";
|
||||
include __DIR__ . "/pop_agreement.php";
|
||||
include __DIR__ . "/pop_mypage01.php";
|
||||
@@ -153,7 +152,6 @@
|
||||
<script src="/kngil/js/index.js"></script>
|
||||
<script src="/kngil/js/mypage.js"></script>
|
||||
<script src="/kngil/js/join.js"></script>
|
||||
<script type="module" src="/kngil/js/login.js"></script>
|
||||
<script src="/kngil/js/login_sms.js"></script>
|
||||
<script>
|
||||
AOS.init();
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
<?php
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<!--index.php-->
|
||||
<html lang="ko">
|
||||
@@ -36,7 +41,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
include __DIR__ . "/pop_login.php";
|
||||
include __DIR__ . "/pop_join.php";
|
||||
include __DIR__ . "/pop_agreement.php";
|
||||
include __DIR__ . "/pop_mypage01.php";
|
||||
@@ -53,7 +57,6 @@
|
||||
<script src="/kngil/js/index.js"></script>
|
||||
<script src="/kngil/js/mypage.js"></script>
|
||||
<script src="/kngil/js/join.js"></script>
|
||||
<script type="module" src="/kngil/js/login.js"></script>
|
||||
<script src="/kngil/js/login_sms.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
<!-- popup_wrap -->
|
||||
<div class="popup-wrap" id="pop_login" role="dialog" aria-labelledby="login_title" aria-modal="true">
|
||||
<!-- popup_in -->
|
||||
<div class="popup-in member">
|
||||
<button class="btn-close" type="button" aria-label="팝업 닫기">
|
||||
<img src="/kngil/img/ico/ico_close.svg" alt="닫기">
|
||||
</button>
|
||||
<!-- popup_container -->
|
||||
<div class="popup-container login">
|
||||
<!-- pop_header -->
|
||||
<div class="pop-header">
|
||||
<h2 class="tit" id="login_title">로그인</h2>
|
||||
<p class="sub-txt">
|
||||
KNGIL 로그인 시<br class="pc-only">
|
||||
<em>다운로드 및 1:1문의 서비스를</em><br class="pc-only" /> 이용하실 수 있습니다.
|
||||
</p>
|
||||
</div>
|
||||
<!-- //pop_header -->
|
||||
<!-- pop_body -->
|
||||
<div class="pop-body">
|
||||
<div class="contents-wrap">
|
||||
<ul class="tab-menu round">
|
||||
<li class="tab-phone on"><span>휴대폰 인증</span></li>
|
||||
<li class="tab-id"><span>아이디 로그인</span></li>
|
||||
</ul>
|
||||
<div class="tab-content phone">
|
||||
<form action="" method="post" novalidate>
|
||||
<div class="form-wrap">
|
||||
<div class="input-box group">
|
||||
<i class="phone" aria-hidden="true"></i>
|
||||
<input type="tel" id="login_phone" name="userPhone" placeholder="휴대폰 번호 (예: 010-1234-5678)" required aria-label="휴대폰 번호">
|
||||
<span class="timer d-none">03:00</span>
|
||||
<!-- ✅ 재요청 버튼 -->
|
||||
<button type="button"
|
||||
class="btn-resend d-none"
|
||||
id="sms_resend">
|
||||
재요청
|
||||
</button>
|
||||
</div>
|
||||
<div class="info-box d-none">
|
||||
<p>
|
||||
<em>인증 링크를 문자로 발송했습니다</em><br />
|
||||
인증 문자가 오지 않으면 인증 링크를 재요청 해보세요
|
||||
</p>
|
||||
</div>
|
||||
<div class="btn-wrap">
|
||||
<button class="btn-full" id="sms_button" type="submit">인증 링크 요청</button>
|
||||
</div>
|
||||
<div class="btn-wrap">
|
||||
<a class="go-signup" href="javascript:agreement();">
|
||||
<span>회원가입</span><i class="arrow-r" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tab-content id">
|
||||
<form action="" method="post" novalidate>
|
||||
<div class="form-wrap">
|
||||
<div class="input-box group">
|
||||
<i class="id" aria-hidden="true"></i>
|
||||
<input type="text" id="login_id" name="userId" placeholder="아이디" required aria-label="아이디">
|
||||
</div>
|
||||
<div class="input-box group">
|
||||
<i class="pw" aria-hidden="true"></i>
|
||||
<input type="password" id="login_password" name="userPassword" placeholder="비밀번호" required aria-label="비밀번호">
|
||||
</div>
|
||||
<div class="btn-wrap">
|
||||
<button class="btn-full" type="submit">로그인</button>
|
||||
</div>
|
||||
<div class="btn-wrap">
|
||||
<a class="go-signup" href="javascript:agreement();">
|
||||
<span>회원가입</span>
|
||||
<i class="arrow-r" aria-hidden="true"></i>
|
||||
</a>
|
||||
<!-- 로그인 팝업 이동 -->
|
||||
<a class="go-login" href="http://172.16.9.44/kngil/skin/popup/callback">
|
||||
<span>로그인</span>
|
||||
<i class="arrow-r" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
<style>
|
||||
.btn-oidc {
|
||||
background-color: #000; /* IDP 브랜드 컬러에 맞춰 조정 가능 */
|
||||
color: #fff;
|
||||
border: none;
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border-radius: 4px;
|
||||
margin-top: 10px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.btn-oidc:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
</style>
|
||||
<div class="btn-wrap">
|
||||
<button type="button" class="btn-oidc" id="btn_oidc_login">
|
||||
OIDC 통합 로그인
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- //pop_body -->
|
||||
</div>
|
||||
<!-- //popup_container -->
|
||||
</div>
|
||||
<!-- //popup_in -->
|
||||
</div>
|
||||
<!-- //popup_wrap -->
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
|
||||
<?php
|
||||
include __DIR__ . "/pop_login.php";
|
||||
include __DIR__ . "/pop_join.php";
|
||||
include __DIR__ . "/pop_agreement.php";
|
||||
include __DIR__ . "/pop_mypage01.php";
|
||||
@@ -347,7 +346,6 @@
|
||||
<script src="/kngil/js/index.js"></script>
|
||||
<script src="/kngil/js/mypage.js"></script>
|
||||
<script src="/kngil/js/join.js"></script>
|
||||
<script type="module" src="/kngil/js/login.js"></script>
|
||||
<script src="/kngil/js/login_sms.js"></script>
|
||||
|
||||
<script>
|
||||
@@ -611,4 +609,3 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
<?php include __DIR__ . "/_header.php"; ?>
|
||||
<!-- //HEADER -->
|
||||
<?php
|
||||
include __DIR__ . "/pop_login.php";
|
||||
include __DIR__ . "/pop_join.php";
|
||||
include __DIR__ . "/pop_agreement.php";
|
||||
include __DIR__ . "/pop_mypage01.php";
|
||||
@@ -259,7 +258,6 @@
|
||||
<script src="/kngil/js/index.js"></script>
|
||||
<script src="/kngil/js/mypage.js"></script>
|
||||
<script src="/kngil/js/join.js"></script>
|
||||
<script type="module" src="/kngil/js/login.js"></script>
|
||||
<script src="/kngil/js/login_sms.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<?php include __DIR__ . "/_header.php"; ?>
|
||||
<!-- //HEADER -->
|
||||
<?php
|
||||
include __DIR__ . "/pop_login.php";
|
||||
include __DIR__ . "/pop_join.php";
|
||||
include __DIR__ . "/pop_agreement.php";
|
||||
include __DIR__ . "/pop_mypage01.php";
|
||||
@@ -254,7 +253,6 @@
|
||||
<script src="/kngil/js/index.js"></script>
|
||||
<script src="/kngil/js/mypage.js"></script>
|
||||
<script src="/kngil/js/join.js"></script>
|
||||
<script type="module" src="/kngil/js/login.js"></script>
|
||||
<script src="/kngil/js/login_sms.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
?>
|
||||
|
||||
<?php
|
||||
include __DIR__ . "/pop_login.php";
|
||||
include __DIR__ . "/pop_join.php";
|
||||
include __DIR__ . "/pop_agreement.php";
|
||||
include __DIR__ . "/pop_mypage01.php";
|
||||
@@ -154,7 +153,6 @@
|
||||
<script src="/kngil/js/index.js"></script>
|
||||
<script src="/kngil/js/mypage.js"></script>
|
||||
<script src="/kngil/js/join.js"></script>
|
||||
<script type="module" src="/kngil/js/login.js"></script>
|
||||
<script src="/kngil/js/login_sms.js"></script>
|
||||
|
||||
<!-- CKEditor 표시용 초기화 (submit 관여 X) -->
|
||||
|
||||
Reference in New Issue
Block a user