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

23
kngil/bbs/get_base_cd.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
require_once 'db_conn.php';
header('Content-Type: application/json');
// URL 파라미터로 group_id를 받습니다. (예: get_base_cd.php?group_id=BS210)
$group_id = isset($_GET['group_id']) ? $_GET['group_id'] : '';
if (empty($group_id)) {
echo json_encode([]);
exit;
}
try {
// 파라미터(? 처리)를 사용하여 보안을 강화하고 재사용성을 높입니다.
$stmt = $pdo->prepare("SELECT id, text FROM kngil.fn_base_cd(?)");
$stmt->execute([$group_id]);
$items = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($items);
} catch (PDOException $e) {
echo json_encode(['status' => 'error', 'message' => $e->getMessage()]);
}
?>