first commit 2

This commit is contained in:
hmw1001
2026-06-11 18:47:38 +09:00
parent c768729ce6
commit 6f534e33a6
11095 changed files with 1595758 additions and 0 deletions
@@ -0,0 +1,77 @@
<?php
if (!defined('_GNUBOARD_')) exit;
?>
<div class="local_ov01 local_ov">
<strong>메일 템플릿 목록</strong>
<p>이곳에서 메일 발송에 사용할 여러 템플릿을 등록하고 관리할 수 있습니다.</p>
</div>
<div class="btn_fixed_top">
<a href="?action=create_form" class="btn btn_01">메일 템플릿 추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption>메일 템플릿 목록</caption>
<colgroup>
<col class="grid_1"> <!-- ID -->
<col class="grid_3"> <!-- 코드 -->
<col> <!-- 제목 -->
<col class="grid_2"> <!-- 미리보기 -->
<col class="grid_1"> <!-- 사용 -->
<col class="grid_3"> <!-- 관리 -->
</colgroup>
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">코드</th>
<th scope="col">제목</th>
<th scope="col">미리보기</th>
<th scope="col">사용</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($template_list_data)):
foreach ($template_list_data as $row):
?>
<tr>
<td class="td_num"><?= $row['id'] ?></td>
<td class="td_left"><?= htmlspecialchars($row['code']) ?></td>
<td class="td_left"><?= htmlspecialchars($row['title']) ?></td>
<td>
<!-- [개선] 헤더, 본문, 푸터를 합친 전체 내용을 미리보기 하도록 수정합니다. -->
<?php $full_content = stripslashes(htmlspecialchars_decode($row['header_html'] ?? '') . ($row['content'] ?? '') . ($row['footer_html'] ?? '')); ?>
<button type="button" class="btn btn_03 preview-btn" data-content="<?php echo base64_encode($full_content); ?>">미리보기</button>
</td>
<td class="td_num"><?= $row['is_use'] ? '<strong class="txt_true">사용</strong>' : '미사용' ?></td>
<td class="td_mng td_mng_m">
<a href="./template.php?action=edit_form&id=<?= $row['id'] ?>" class="btn btn_03">수정</a>
<!-- 💡 [개선] 삭제 링크에서 token을 직접 생성하지 않고, delete_confirm() 함수가 CSRF 토큰을 자동으로 처리하도록 합니다. -->
<a href="./template.php?action=delete&id=<?= $row['id'] ?>" onclick="return delete_confirm(this);" class="btn btn_02">삭제</a>
</td>
</tr>
<?php
endforeach;
else:
?>
<tr>
<td colspan="6" class="empty_table">등록된 템플릿이 없습니다.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<?php
// [개선] GnuBoard의 자바스크립트 로드 방식을 따라 add_javascript() 함수를 사용합니다.
add_javascript('<script src="'.G5_ADMIN_URL.'/mail_manage/assets/js/template_list.js"></script>', 1);
?>
<noscript>
<p>
귀하께서 사용하시는 브라우저는 현재 <strong>자바스크립트를 사용하지 않음</strong>으로 설정되어 있습니다.<br>
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
</p>
</noscript>