fix: Q&A 등록 중지(마이그레이션 사전작업)

This commit is contained in:
root committed 2026-11-11 14:46:46 +09:00
1 parent 580b403b40
commit 2616b8a005
7 files changed
+43 -6

No files matched your search

+10
View File
@@ -45,6 +45,16 @@ try {
$postId = isset($_GET['id']) ? (int)$_GET['id'] : 0; $postId = isset($_GET['id']) ? (int)$_GET['id'] : 0;
$isEdit = $postId > 0; $isEdit = $postId > 0;
// 신규 Q&A 접수 중단: 폼 URL 직접 접근과 POST 우회를 모두 차단합니다.
if (!$isEdit) {
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
http_response_code(403);
exit('현재 Q&A 신규 문의 접수가 중단되었습니다.');
}
header('Location: /egbim/bbs/descope_qa_list.php');
exit;
}
// 5) 수정 모드이면 기존 글 불러오기 // 5) 수정 모드이면 기존 글 불러오기
if ($isEdit) { if ($isEdit) {
$stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?"); $stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?");
+10
View File
@@ -43,6 +43,16 @@ try {
$postId = isset($_GET['id']) ? (int)$_GET['id'] : 0; $postId = isset($_GET['id']) ? (int)$_GET['id'] : 0;
$isEdit = $postId > 0; $isEdit = $postId > 0;
// 구형 URL을 통한 신규 문의 등록도 차단합니다.
if (!$isEdit) {
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
http_response_code(403);
exit('현재 Q&A 신규 문의 접수가 중단되었습니다.');
}
header('Location: /egbim/bbs/descope_qa_list.php');
exit;
}
// 5) 수정 모드이면 기존 글 불러오기 // 5) 수정 모드이면 기존 글 불러오기
if ($isEdit) { if ($isEdit) {
$stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?"); $stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?");
+1 -3
View File
@@ -251,9 +251,7 @@ $download_url = "https://release-download.hmac.kr/eg-bim/{$version}/setup_eg-bim
<?php endif ?> <?php endif ?>
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-write" onclick="openQaWrite()"> <p class="qa-closed-notice" role="status">현재 Q&amp;A 신규 문의 접수가 중단되었습니다. 기존 문의는 계속 확인할 수 있습니다.</p>
<i class="fa fa-pencil" aria-hidden="true"></i> 문의등록
</button>
</div> </div>
</div><!-- contents END /egbim/skin/qa/basic/descope_qa_write.skin.php--> </div><!-- contents END /egbim/skin/qa/basic/descope_qa_write.skin.php-->
</div><!-- container END --> </div><!-- container END -->
+1
View File
@@ -20,6 +20,7 @@ function get_admin_display_name($loginId, $fallbackName = null) {
'b23008@baroncs.co.kr' => '관리자3', 'b23008@baroncs.co.kr' => '관리자3',
'cjy627@hanmaceng.co.kr' => '관리자4', 'cjy627@hanmaceng.co.kr' => '관리자4',
'b23072@hanmaceng.co.kr' => '관리자5', 'b23072@hanmaceng.co.kr' => '관리자5',
'm21318@hanmaceng.co.kr' => '강근아',
]; ];
if (isset($map[$loginId])) { if (isset($map[$loginId])) {
return $map[$loginId]; return $map[$loginId];
+10
View File
@@ -45,6 +45,16 @@ try {
$postId = isset($_GET['id']) ? (int)$_GET['id'] : 0; $postId = isset($_GET['id']) ? (int)$_GET['id'] : 0;
$isEdit = $postId > 0; $isEdit = $postId > 0;
// New Q&A submissions are closed. Block both direct form access and POST bypasses.
if (!$isEdit) {
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
http_response_code(403);
exit('New Q&A submissions are currently closed.');
}
header('Location: /eng/bbs/descope_qa_list.php');
exit;
}
// 5) 수정 모드이면 기존 글 불러오기 // 5) 수정 모드이면 기존 글 불러오기
if ($isEdit) { if ($isEdit) {
$stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?"); $stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?");
+10
View File
@@ -43,6 +43,16 @@ try {
$postId = isset($_GET['id']) ? (int)$_GET['id'] : 0; $postId = isset($_GET['id']) ? (int)$_GET['id'] : 0;
$isEdit = $postId > 0; $isEdit = $postId > 0;
// Block new submissions through this legacy URL as well.
if (!$isEdit) {
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
http_response_code(403);
exit('New Q&A submissions are currently closed.');
}
header('Location: /eng/bbs/descope_qa_list.php');
exit;
}
// 5) 수정 모드이면 기존 글 불러오기 // 5) 수정 모드이면 기존 글 불러오기
if ($isEdit) { if ($isEdit) {
$stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?"); $stmt = $pdo->prepare("SELECT * FROM qa_posts WHERE post_id = ?");
+1 -3
View File
@@ -237,9 +237,7 @@ $download_url = "https://release-download.hmac.kr/eg-bim/{$version}/setup_eg-bim
<?php endif ?> <?php endif ?>
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-write" onclick="openQaWrite()"> <p class="qa-closed-notice" role="status">New Q&amp;A submissions are closed. Existing inquiries remain available.</p>
<i class="fa fa-pencil" aria-hidden="true"></i> Create
</button>
</div> </div>
</div><!-- contents END /eng/skin/qa/basic/descope_qa_write.skin.php--> </div><!-- contents END /eng/skin/qa/basic/descope_qa_write.skin.php-->
</div><!-- container END --> </div><!-- container END -->