<!--#include file="../include/config.asp"-->
<!--#include file="checkadmin.asp"-->
<script language=javascript src=../include/mouse_on_title.js></script>
 <%
sub checkmanage(str)
Set mrs = conn.Execute("select * from manage where username='"&request.cookies("buyok")("admin")&"'")
if not (mrs.bof and mrs.eof) then
manage=mrs("manage")
if instr(manage,str)<=0 then
response.write "<script language='javascript'>"
response.write "alert('警告：您没有此项操作的权限！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
else
session("buyok_admin_login")=0
end if
else 
response.write "<script language='javascript'>"
response.write "alert('没有登陆，不能执行此操作！');"
response.write "location.href='quit.asp';"
response.write "</script>"
response.end
end if
set mrs=nothing
end sub
%>
<%call checkmanage("01")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../images/css.css" type=text/css rel=stylesheet>
<LINK href="../list/newhead.css" type=text/css rel=stylesheet>
</head>

<BODY bgcolor="#D9EAFC">
		  <table height="5"><tr><td></td></tr></table>
<TABLE cellSpacing=0 cellPadding=0 width=95% border=0 style="BORDER-RIGHT: #b1bfee 1px solid; BORDER-TOP: #b1bfee 1px solid; BORDER-LEFT: #b1bfee 1px solid; BORDER-BOTTOM: #b1bfee 1px solid" 
>
  <TBODY>
    <TR> 
      <TD width="90%" bgColor=#f4f5fd><font color="#000000">　<B><font color="#FF0000">发送邮件设置</font></B></font></TD>
      <TD bgColor=#f4f5fd height=30><font color="#000000"></font></TD>
    </TR>
  </TBODY>
</TABLE>		  <table height="5"><tr><td></td></tr></table>

<%
action=request("ok")
if action="" then 
    Set rs = conn.Execute("select * from shopsetup") 
	%>
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#b1bfee" width="95%">
  <form action=config7.asp method=post name=setup>
    <tr bgcolor="#FFFFFF"> 
      <td width=20% align=right>会员注册发邮件通知&nbsp; </td>
      <td> <input name="usermailyesorno" value=1
	<%
	if rs("usermailyesorno")<>0 then
	%>
	checked
	<%end if%>
	type="radio">
        是 
        <input name="usermailyesorno" value=0 
	<%
	if rs("usermailyesorno")=0 then
	%>
	checked
	<%end if%>type="radio">
        否 &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="会员注册后，向会员注册时填写的邮箱发送一封通知邮件"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF"> 
      <td width=20% align=right>新订单邮件通知&nbsp; </td>
      <td> <input name="mailyesorno" value=1
	<%
	if rs("mailyesorno")<>0 then
	%>
	checked
	<%end if%>
	type="radio">
        是 
        <input name="mailyesorno" value=0 
	<%
	if rs("mailyesorno")=0 then
	%>
	checked
	<%end if%>type="radio">
        否 &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="客户购物提交订单后，向管理员邮箱发送通知邮件"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF"> 
      <td width=20% align=right>汇款确认发邮件通知&nbsp; </td>
      <td> <input name="huikuan_mailyesorno" value=1
	<%
	if rs("huikuan_mailyesorno")<>0 then
	%>
	checked
	<%end if%>
	type="radio">
        是 
        <input name="huikuan_mailyesorno" value=0 
	<%
	if rs("huikuan_mailyesorno")=0 then
	%>
	checked
	<%end if%>type="radio">
        否 &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="前台“会员中心”有一个“汇款确认”<br>选择“否”，只通过站内消息发送<br>选择“是”，将同时发送邮件给管理员"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF"> 
      <td width=20% align=right>访问者发邮件推荐商品&nbsp; </td>
      <td> <input name="tj_mailyesorno" value=1
	<%
	if rs("tj_mailyesorno")<>0 then
	%>
	checked
	<%end if%>
	type="radio">
        是 
        <input name="tj_mailyesorno" value=0 
	<%
	if rs("tj_mailyesorno")=0 then
	%>
	checked
	<%end if%>type="radio">
        否 &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="商品页底部有一项“推荐给好友”<br>访问者可发送邮件向好友推荐"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF"> 
      <td width=20% align=right>群发邮件&nbsp; </td>
      <td> <input name="qf_mailyesorno" value=1
	<%
	if rs("qf_mailyesorno")<>0 then
	%>
	checked
	<%end if%>
	type="radio">
        是 
        <input name="qf_mailyesorno" value=0 
	<%
	if rs("qf_mailyesorno")=0 then
	%>
	checked
	<%end if%>type="radio">
        否 &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="打开邮件发送功能<br>可以向单个或多个会员发送邮件"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF"> 
      <td width=20% align=right>选择发信组件&nbsp; </td>
      <td> <input name="jmail" value=1
	<%
	if rs("jmail")<>0 then
	%>
	checked
	<%end if%>
	type="radio">
        Jmail 
        <input name="jmail" value=0 
	<%
	if rs("jmail")=0 then
	%>
	checked
	<%end if%>type="radio">
        CDONTS &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="如不清楚服务器支持哪种邮件组件，请向服务商咨询<br>若支持CDONTS，请尽量使用CDONTS<br>如都不支持，请将上面全部选“否”"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF"> 
      <td width=20% align=right>发信服务器&nbsp; </td>
      <td> <input type=text value="<%=rs("mailserver")%>" name=mailserver  size="30" maxlength="100"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="用于发信的SMTP服务器<br>如：mail.mowshop.com.cn<br>smtp.163.com等"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF">
      <td width=20% align=right>发信邮箱&nbsp; </td>
      <td> <input type=text value="<%=rs("mailname")%>" name=mailname  size="30" maxlength="100"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="用于发信的邮箱名<br>如：shop@163.com<br>建议不要使用重要邮箱作为发信邮箱"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF">
      <td width=20% align=right>用户密码&nbsp; </td>
      <td> <input type=password value="<%=rs("mailpassword")%>" name=mailpassword  size="30" maxlength="20"> 
        &nbsp;&nbsp; <img src=../images/admin/memo.gif alt="填写发信邮箱的密码<br><br><font color=red><b>特别提示：</b>此密码以未加密方式保存在数据库中<br>因此，建议您设置一个专用的发信邮箱<br>不要使用重要的邮箱作为发信邮箱"> 
      </td>
    </TR>
    <tr  bgcolor="#FFFFFF">
      <td colspan=2 width="568" ><INPUT name="ok" TYPE="hidden" value="ok">
        <INPUT name=action TYPE="submit" value="保存设置"> &nbsp;</td>
    </tr>
  </form>
</table>
	
<%
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
end if

if action="ok" then

     Set rs=Server.CreateObject("ADODB.Recordset")
	 sql="select * from shopsetup"
	 rs.open sql,conn,1,3

 	 rs("usermailyesorno")=trim(request.form("usermailyesorno"))
 	 rs("mailyesorno")=trim(request.form("mailyesorno"))
 	 rs("tj_mailyesorno")=trim(request.form("tj_mailyesorno"))
 	 rs("qf_mailyesorno")=trim(request.form("qf_mailyesorno"))
 	 rs("huikuan_mailyesorno")=trim(request.form("huikuan_mailyesorno"))
 	 rs("mailserver")=trim(request.form("mailserver"))
  	 rs("mailname")=trim(request.form("mailname"))
  	 rs("jmail")=request.form("jmail")
 	 rs("mailpassword")=trim(request.form("mailpassword"))

	rs.update
	url="config7.asp"
	rs.close	
	set rs=nothing
	conn.close
	set conn=nothing

	response.write "<script language='javascript'>"
	response.write "alert('操作成功，您设置的信息已保存！');"
	response.write "location.href='"&url&"';"			
	response.write "</script>"
end if%>
