<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view(TPL_FOLDER."header");?>

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
  <tr>
    <td width="3%" align="left" ><img src="{tpl_path}images/forward.jpg" /></td>
    <td width="97%" align="left" >您现在的位置：<a href="<?php echo $url;?>">邮件模板列表</a> &gt; 模板修改</td>
  </tr>
</table>
<fieldset>
<legend>模板修改--<?php echo $edit_data['shuo_ming'];?></legend>
<p><h5>可用标签说明：（某些标签只适用于特定的邮件模板）</h5>网站名称：{tpl_site_name}  | 网站地址：{tpl_site_url}  |  邮件发送时间：{tpl_send_time}  |  用户名：{tpl_user_name} | 用户密码：{tpl_user_password} |  用户邮箱：{tpl_user_email} | 订单号：{tpl_trade_num} | 订单金额：{tpl_total_price} | 订单状态：{tpl_order_status} | 发信附言：{tpl_email_detail} | 管理员登录地址：{tpl_admin_login_url} | 会员登录地址：{tpl_user_login_url}</p>
<form action="<?php echo site_url(CTL_FOLDER."email_template/save_record");?>" method="post" name="dialog_edit_form" id="dialog_edit_form">
  <table width="100%"  border="0" cellpadding="3" cellspacing="0" >
    <tr>
      <td width="133"><font color="#FF0000">*</font>是否开启发送：</td>
      <td width="592"><input type="radio" name="status" value="1" <?php if($edit_data['status']==1) echo "checked";?> />
        开启 &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="radio" name="status" value="0" <?php if($edit_data['status']==0) echo "checked";?> />
        关闭 </td>
    </tr>
    <tr>
      <td><font color="#FF0000">*</font>邮件标题：</td>
      <td><input type="text" id="title" name="title" value="<?php echo $edit_data['title'];?>" size="50" dataType="Require" msg="该项必填" /></td>
    </tr>
    <tr>
      <td colspan="2"><?php echo $content->create();?></td>
    </tr>
    <tr>
      <td width="133">&nbsp;</td>
      <td width="592"><input type="button" name="sbmit" onclick="sub_edit_form()" value="修改" class="button-style2" />
        <input name="rd_id" type="hidden" value="<?php echo $edit_data['id'];?>" />
        <input name="url" type="hidden" value="<?php echo $url;?>" />      </td>
    </tr>
  </table>
</form>
</fieldset>
<script language="javascript">
function sub_edit_form(){
	var form_ob=document.getElementById("dialog_edit_form"); 
	if (!Validator.Validate(form_ob,3)) return false;
	if(GetMessageLength('content')==0)
	{
		alert("请填写模板内容");
		return false;
	}
	form_ob.submit();
}
</script>
<?php $this->load->view(TPL_FOLDER."footer");?>
