초기 커밋: 5130 레거시 시스템
- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
This commit is contained in:
31
account_plan/load_excluded_items.php
Normal file
31
account_plan/load_excluded_items.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* 제외 항목 목록 로드 (수정)
|
||||
*
|
||||
* 이 파일은 excluded_items.json 파일에서 제외 항목 목록을 읽어와 HTML 테이블 코드로 반환합니다.
|
||||
* 복구 버튼이 추가되었습니다.
|
||||
*/
|
||||
|
||||
$excludedItemsFile = $_SERVER['DOCUMENT_ROOT'] . "/account_plan/excluded_items.json";
|
||||
|
||||
$excludedItems = [];
|
||||
if (file_exists($excludedItemsFile)) {
|
||||
$excludedItems = json_decode(file_get_contents($excludedItemsFile), true);
|
||||
}
|
||||
|
||||
$tableRows = '';
|
||||
if (!empty($excludedItems)) {
|
||||
foreach ($excludedItems as $item) {
|
||||
$tableRows .= "<tr>";
|
||||
$tableRows .= "<td>" . htmlspecialchars($item['yearMonth']) . "</td>";
|
||||
$tableRows .= "<td>" . htmlspecialchars($item['customerName']) . "</td>";
|
||||
$tableRows .= "<td>" . number_format($item['amount']) . "</td>";
|
||||
$tableRows .= "<td><button class='btn btn-secondary btn-sm restore-btn' data-year-month='" . htmlspecialchars($item['yearMonth']) . "' data-customer-name='" . htmlspecialchars($item['customerName']) . "' data-amount='" . htmlspecialchars($item['amount']) . "'>복구</button></td>";
|
||||
$tableRows .= "</tr>";
|
||||
}
|
||||
} else {
|
||||
$tableRows = "<tr><td colspan='4'>제외된 항목이 없습니다.</td></tr>";
|
||||
}
|
||||
|
||||
echo $tableRows;
|
||||
?>
|
||||
Reference in New Issue
Block a user