Initial commit: 교육 프로젝트 배포

This commit is contained in:
송대일
2026-07-01 18:32:42 +09:00
commit be6dccd120
1483 changed files with 5082202 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
header('Content-Type: application/json; charset=utf-8');
require_once '../../bbs/db_conn.php';
// PDO 연결 생성
$pdo = db_conn();
try {
$group_code = $_POST['group_code'] ?? '';
$group_name = $_POST['group_name'] ?? '';
$is_active = ($_POST['is_active'] ?? '') === '1' ? '1' : '0';
$comment = $_POST['comment'] ?? '';
$desc01 = $_POST['desc01'] ?? '';
if (empty($group_code) || empty($group_name)) {
echo json_encode(['success' => false, 'message' => '?꾩닔 ?꾨뱶媛€ ?꾨씫?섏뿀?듬땲??']);
exit;
}
$stmt = $pdo->prepare("REPLACE INTO edu_code_group (group_code, group_name, is_active, comment, desc01, updated_at) VALUES (?, ?, ?, ?, ?, NOW())");
$result = $stmt->execute([$group_code, $group_name, $is_active, $comment, $desc01]);
echo json_encode(['success' => (bool)$result]);
} catch (Exception $e) {
echo json_encode(['success' => false, 'message' => $e->getMessage()]);
}
?>