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
+33
View File
@@ -0,0 +1,33 @@
<?php
require_once __DIR__ . '/../../bbs/db_conn.php';
header('Content-Type: application/json; charset=utf-8');
try {
$pdo = db_conn();
$input = json_decode(file_get_contents('php://input'), true);
$offer_id = $input['offer_id'] ?? '';
$status_code = $input['status_code'] ?? '';
$reason_return = $input['reason_return'] ?? '';
if (!$offer_id || !$status_code) {
echo json_encode(['success' => false, 'message' => '필수 파라미터가 누락되었습니다.'], JSON_UNESCAPED_UNICODE);
exit;
}
$sql = "UPDATE edu_content_offer SET status_code = ?, reason_return = ? WHERE offer_id = ?";
$stmt = $pdo->prepare($sql);
$stmt->execute([$status_code, $reason_return, $offer_id]);
if ($stmt->rowCount() > 0) {
echo json_encode(['success' => true], JSON_UNESCAPED_UNICODE);
} else {
echo json_encode(['success' => false, 'message' => '업데이트된 행이 없습니다.'], JSON_UNESCAPED_UNICODE);
}
} catch (Exception $e) {
error_log('[UPDATE_OFFER ERROR] ' . $e->getMessage());
echo json_encode(['success' => false, 'message' => '서버 오류가 발생했습니다.'], JSON_UNESCAPED_UNICODE);
}
?>