first commit 2
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
$sub_menu = "800500";
|
||||
include_once("./_common.php");
|
||||
|
||||
auth_check_menu($auth, $sub_menu, "r");
|
||||
|
||||
$id = (int) $_GET['id'];
|
||||
$template = sql_fetch("SELECT * FROM order_mail_templates WHERE id = {$id}");
|
||||
|
||||
if (!$template) {
|
||||
alert('템플릿을 찾을 수 없습니다.', './mail_templates.php');
|
||||
}
|
||||
|
||||
$g5['title'] = "메일 템플릿 수정";
|
||||
|
||||
include_once(G5_ADMIN_PATH . '/admin.head.php');
|
||||
|
||||
$variables = json_decode($template['variables'], true);
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
메일 템플릿 수정 - <?php echo htmlspecialchars($template['template_name']); ?>
|
||||
</div>
|
||||
|
||||
<form name="templateForm" method="post" action="mail_template_update.php">
|
||||
<input type="hidden" name="id" value="<?php echo $template['id']; ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>메일 템플릿 수정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">템플릿명</th>
|
||||
<td>
|
||||
<input type="text" name="template_name"
|
||||
value="<?php echo htmlspecialchars($template['template_name']); ?>" class="frm_input"
|
||||
style="width:100%;" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">메일 제목</th>
|
||||
<td>
|
||||
<input type="text" name="subject" value="<?php echo htmlspecialchars($template['subject']); ?>"
|
||||
class="frm_input" style="width:100%;" required>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">메일 내용</th>
|
||||
<td>
|
||||
<textarea name="content" class="frm_input" style="width:100%; height:300px;"
|
||||
required><?php echo htmlspecialchars($template['content']); ?></textarea>
|
||||
<div class="frm_info">HTML 태그 사용 가능합니다.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">사용 가능한 변수</th>
|
||||
<td>
|
||||
<?php if (is_array($variables)) { ?>
|
||||
<?php foreach ($variables as $var) { ?>
|
||||
<span class="variable-tag">{<?php echo $var; ?>}</span>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div class="frm_info">위 변수들을 메일 제목과 내용에 사용할 수 있습니다.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="저장" class="btn_submit">
|
||||
<a href="mail_templates.php" class="btn btn_02">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<style>
|
||||
.variable-tag {
|
||||
display: inline-block;
|
||||
background: #e3f2fd;
|
||||
color: #1976d2;
|
||||
padding: 2px 8px;
|
||||
margin: 2px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
font-family: monospace;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
include_once(G5_ADMIN_PATH . '/admin.tail.php');
|
||||
?>
|
||||
Reference in New Issue
Block a user