<!--#include virtual="/incs/config.asp"-->
<%
chk_log()
chk_newpwr 4,19,2
''''''''''''''''''''''''''''''''
msid=SafeRequest("msid")
msmod=SafeRequest("msmod")
if chk_int(msid)=false and msmod="" then
call errorpage(-2,"对不起，请选择邮件")
end if
if msmod<>"" then
query="select * from emlmod  where ms_mod='"&msmod&"'"
else
query="select * from emlmod  where ms_id="&msid
end if
 conn.open constr
rs.open query,conn,1,1
if rs.eof then
call errorpage(-2,"对不起，该记录不存在！")
else
msid=rs("ms_id")
msmod=rs("ms_mod")
end if
%>
<!--#include virtual="/incs/top.asp"-->
<script language="javascript">
<!--

function delit(d_prd)
{
if (confirm("确认删除此邮件模板吗？"))
{location.href="/control/mai_mng/mai_mng.asp?module=del&msid="+d_prd;
}
}
function copyto()
{
if (confirm("确认复制否？"))
{document.cotpy.submit();
}
}
 //-->
 </script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><b>邮件模版列表</b></td>
          <td valign=bottom noWrap align=right 
                        width="75%"><a href="snd_add.asp" class=commonface >添加邮件模版</a> 
            | <a href="snd_add.asp?module=sign" class=commonface >添加邮件签名</a> | 
            <a href="snd_lst.asp" class=commonface >邮件模版列表</a></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2  class=menuline></td>
        </tr>
        </tbody> 
      </table>
      <br>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="middle" height="28" align="center"> 
      <table border=0 cellpadding=0 
                        cellspacing=0 class=datalist align="center"  width="100%">
        <tbody> 
        <form action=snd_mng.asp method=post name=theform>
          <tr > 
            <th class=datalistheader align=center> 
              <div align="center">项目</div>
            </th>
            <th  class=datalistheader  align=center>值</th>
          </tr>
          <tr  > 
            <td height="25" class=datalistgrida   align=center width="15%">邮件标志</td>
            <td height="25" class=datalistgrida > 
              <input type="text" name="ms_mod" size="50" value="<%=trim(rs("ms_mod"))%>">
              复制为: 
              <input type="text" name="newtag" size="10" value="填新标志"  onmousedown="javascript:this.value='';">
              <input type="button" name="Submit" value="复  制" class=btxx  onClick="javascript:document.theform.submit();">
            </td>
          </tr>
          <tr  > 
            <td height="25" class=datalistgrida   align=center>所属分类</td>
            <td height="25" class=datalistgrida > 
              <select name="ms_tpe">
                <option value="oths">其它</option>
                <% 
			query="select * from pdttpe order by pt_odr"
				rs1.open query,conn,1,1
				while not rs1.eof 
				%>
                <option <%if rs("ms_tpe")=rs1("pt_tag") then
				response.write " selected "
				end if  %> value="<%=trim(rs1("pt_tag"))%>"><%=trim(rs1("pt_nme"))%></option>
                <%
				rs1.movenext
				wend
				rs1.close
				%>
              </select>
              &nbsp; 
              <%
	rsstr=""
	i=1
	j=0
    query="select  emlmod.*,pdttpe.*  from emlmod    left outer join pdttpe on emlmod.ms_tpe=pdttpe.pt_tag order by pdttpe.pt_tag"
	rs1.open query,conn,1,1
	while not rs1.eof
	if clng(rs1("ms_id"))=clng(msid) then
	j=i
	end if
	rsstr=rsstr&"|" &cstr(rs1("ms_mod"))
	rs1.movenext
	if not rs1.eof then
	i=i+1
	end if
	wend
	rs1.close
    rspre=j-1
	rspnext=j+1
	rsstrs=split(rsstr,"|")
	if rspre<=0 then
	rsprename=""
	else
	rsprename=rsstrs(rspre)
	end if
	if rspnext>i then
	rspnextname=""
	else
	rspnextname=rsstrs(rspnext)
	end if
 	%>
              <input <%if rsprename="" then
	  response.write " disabled "
	  end if %> type="button" name="Submit32" value="上一个" class=btxx onClick="javascript:location.href='snd_edt.asp?msmod=<%=rsprename%>';" title="模板标志：<%=rsprename%>">
              <input <%if rspnextname="" then
	  response.write " disabled "
	  end if %> type="button" name="Submit32" value="下一个" class=btxx onClick="javascript:location.href='snd_edt.asp?msmod=<%=rspnextname%>';"  title="模板标志：<%=rspnextname%>">
            </td>
          </tr>
          <tr  > 
            <td height="25" class=datalistgrida   align=center>是否使用HTML</td>
            <td height="25" class=datalistgrida > 
              <input type="radio" name="ms_ifhtm" value="0" <%if rs("ms_ifhtm")<>"1" then
			  response.write " checked"
			  end if %>>
              不使用 
              <input type="radio" name="ms_ifhtm" value="1" <%if rs("ms_ifhtm")="1" then
			  response.write " checked"
			  end if %>>
              使用 </td>
          </tr>
          <tr  > 
            <td height="25" class=datalistgrida   align=center>邮件名称</td>
            <td height="25" class=datalistgrida > 
              <input type="text" name="ms_nme" size="50" value="<%=trim(rs("ms_nme"))%>">
            </td>
          </tr>
          <tr  > 
            <td height="25" class=datalistgrida   align=center>邮件标题</td>
            <td height="25" class=datalistgrida > 
              <input type="text" name="ms_ttl" size="50" value="<%=trim(rs("ms_ttl"))%>">
            </td>
          </tr>
          <tr  > 
            <td height="25" class=datalistgrida   align=center>下级平台获取</td>
            <td height="25" class=datalistgrida > 
              <select name="ms_ifagt">
                <option value="1" <%if rs("ms_ifagt")=1 then
							response.write " selected"
							end if %>>允许</option>
                <option value="0" <%if rs("ms_ifagt")=0 then
							response.write " selected"
							end if %> style='color:#ff0000'>禁止</option>
              </select>
            </td>
          </tr>
          <tr  > 
            <td height="25" class=datalistgrida   align=center>邮件正文</td>
            <td height="25" class=datalistgrida >注意不要输入双引号。 
              <% if rs("ms_mod")<>"sign" then 
			response.write "（如果要加入邮件签名，则在适当位置请加入[C]）"
			end if %>
            </td>
          </tr>
          <tr  > 
            <td height="25"  class=datalistgrida  align=center>&nbsp; </td>
            <td height="25"  class=datalistgrida> 
              <textarea name="ms_bdy" cols="90" rows="30" class=normalform><%=rs("ms_bdy")%></textarea>
            </td>
          </tr>
          <tr  > 
            <td height="50"   class=datalistgrida align=center colspan="2"> 
              <input type="submit" name="Submit2" value="修 改" class=btxx>
              <input type="reset" name="Submit3" value="重 置" class=btxx>
              <input type="hidden" name="module" value="snd_edt" class=dud_button1>
              <input type="hidden" name="msid" value="<%=rs("ms_id")%>" class=dud_button1>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->




