<!--#include file="utf-8.asp" -->
<!--#include file="js/Function.asp" -->
<!--#include file="CheckAdmin.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="js/admin.css" rel="stylesheet" type="text/css">
<title>邮件设置!</title>
</head>
<body>
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.
if admin_qx = 2 then
	 response.write "<div class=""admin_qx"">对不起,您没有权限操作!</div>"
	 response.end
end if


		dim rs,sql
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_jemail"
		rs.open sql,dbok,1,1
			shuaiweb_jmail=rs("shuaiweb_jmail")
			shuaiweb_jmailadmin=rs("shuaiweb_jmailadmin")
			shuaiweb_jmailname=rs("shuaiweb_jmailname")
			shuaiweb_jmailpass=rs("shuaiweb_jmailpass")
			shuaiweb_jmailsmtp=rs("shuaiweb_jmailsmtp")
			shuaiweb_jmailuserreg=rs("shuaiweb_jmailuserreg")
			shuaiweb_jmailuserregn=rs("shuaiweb_jmailuserregn")
			shuaiweb_jmailuserbuy=rs("shuaiweb_jmailuserbuy")
			shuaiweb_jmailuserbuyn=rs("shuaiweb_jmailuserbuyn")
			shuaiweb_jmailuserfa=rs("shuaiweb_jmailuserfa")
			shuaiweb_jmailuserfan=rs("shuaiweb_jmailuserfan")
		rs.close
		set rs=nothing 
%>
		<table width="98%" border="0" cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" bgcolor="#FFFFFF" align="center">
<form id="form1" name="form1" method="POST" action="admin_jmail.asp?yidacms=add">
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">选项<br />
				  <input type="radio" name="shuaiweb_jmail" value="1" <%if shuaiweb_jmail = 1 then response.write "checked" end if %>/>
				打开
				  <input type="radio" name="shuaiweb_jmail" value="2" <%if shuaiweb_jmail = 2 then response.write "checked" end if %>/>
			  关闭<br /><div class="admintitlebg">1.须支持Jmail组件 <a href="SysCome.asp">查看</a></div></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">站长邮箱<br /><input name="shuaiweb_jmailadmin" type="text" value="<%=shuaiweb_jmailadmin%>" class="win"/> <font color=red>(必填)</font></td>
		  </tr>
		  <tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">smtp登录名<br /><input name="shuaiweb_jmailname" type="text"  value="<%=shuaiweb_jmailname%>" class="win"/> <font color=red>(必填)</font></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">smtp 密码<br /><input name="shuaiweb_jmailpass" type="password" value="<%=shuaiweb_jmailpass%>" class="win"/> <font color=red>(必填)</font></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">smtp服务器<br /><input name="shuaiweb_jmailsmtp" type="text" value="<%=shuaiweb_jmailsmtp%>" class="win"/> <font color=red>(必填)</font></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">注册用户邮件通知<br />
				  <input type="radio" name="shuaiweb_jmailuserreg" value="1" <%if shuaiweb_jmailuserreg = 1 then response.write "checked" end if %>/>
				是
				  <input type="radio" name="shuaiweb_jmailuserreg" value="2" <%if shuaiweb_jmailuserreg = 2 then response.write "checked" end if %>/>
			  不<br /></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">可用标签：<br />
			用户姓名:{Yidacms:username} 注册账号:{Yidacms:usermail}</td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">邮件内容<br />
                           <textarea name="shuaiweb_jmailuserregn" class="daimayangshi"><%=shuaiweb_jmailuserregn%></textarea></td>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">用户订单邮件通知<br />
				  <input type="radio" name="shuaiweb_jmailuserbuy" value="1" <%if shuaiweb_jmailuserbuy = 1 then response.write "checked" end if %>/>
				是
				  <input type="radio" name="shuaiweb_jmailuserbuy" value="2" <%if shuaiweb_jmailuserbuy = 2 then response.write "checked" end if %>/>
			  不<br /></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">可用标签：<br />
			订单号:{Yidacms:userbuynumber} 订购的商品:{Yidacms:userbuyproducts}</td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">邮件内容<br />
                           <textarea name="shuaiweb_jmailuserbuyn" class="daimayangshi"><%=shuaiweb_jmailuserbuyn%></textarea></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">已发货邮件通知<br />
				  <input type="radio" name="shuaiweb_jmailuserfa" value="1" <%if shuaiweb_jmailuserfa = 1 then response.write "checked" end if %>/>
				是
				  <input type="radio" name="shuaiweb_jmailuserfa" value="2" <%if shuaiweb_jmailuserfa = 2 then response.write "checked" end if %>/>
			  不<br /></td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">可用标签：<br />
			用户姓名:{Yidacms:username} 发货时间:{Yidacms:usertime}</td>
		  </tr>
		  <tr>
			<td class="center cc" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'">邮件内容<br />
                           <textarea name="shuaiweb_jmailuserfan" class="daimayangshi"><%=shuaiweb_jmailuserfan%></textarea></td>
		  </tr>

			<td><input type="submit" name="submit" value="提交" class="inanniu"/></td>
		  </tr>
		  </form>
		</table>

<%
	    if request("yidacms")="add" Then
			if len(trim(request.Form("shuaiweb_jmailadmin")))<5 then
				response.write ("<script language=javascript> alert('站长必填且不能少于5个字符！');history.back(-1);</script>")
				response.end
			end if
			  
			if len(trim(request.Form("shuaiweb_jmailname")))<5 then
				response.write ("<script language=javascript> alert('smtp登录名不能为空，且不少于5个字符！');history.back(-1);</script>")
				response.end
			end if 
			  
			if len(trim(request.Form("shuaiweb_jmailpass")))<1 then
				response.write ("<script language=javascript> alert('smtp密码不能为空,且不少于1个字符!');history.back(-1);</script>")
				response.end
			end if
			  
			if len(trim(request.Form("shuaiweb_jmailsmtp")))<1 then
				response.write ("<script language=javascript> alert('smtp服务器必填且不能少于1个字符！');history.back(-1);</script>")
				response.end
			end if 

		Set rs = Server.CreateObject("ADODB.Recordset")
		sql = "SELECT * FROM shuaiweb_jemail"
		rs.open sql,dbok,1,3
			rs("shuaiweb_jmail")=trim(request.form("shuaiweb_jmail"))
			rs("shuaiweb_jmailadmin")=trim(request.form("shuaiweb_jmailadmin"))
			rs("shuaiweb_jmailname")=trim(request.form("shuaiweb_jmailname"))
			rs("shuaiweb_jmailpass")=trim(request.form("shuaiweb_jmailpass"))
			rs("shuaiweb_jmailsmtp")=trim(request.form("shuaiweb_jmailsmtp"))
			rs("shuaiweb_jmailuserreg")=trim(request.form("shuaiweb_jmailuserreg"))
			rs("shuaiweb_jmailuserregn")=trim(request.form("shuaiweb_jmailuserregn"))
			rs("shuaiweb_jmailuserbuy")=trim(request.form("shuaiweb_jmailuserbuy"))
			rs("shuaiweb_jmailuserbuyn")=trim(request.form("shuaiweb_jmailuserbuyn"))
			rs("shuaiweb_jmailuserfa")=trim(request.form("shuaiweb_jmailuserfa"))
			rs("shuaiweb_jmailuserfan")=trim(request.form("shuaiweb_jmailuserfan"))
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('设置成功！');location.replace('admin_jmail.asp');</script>"
		response.end
		End If
%>
</body>
</html>