<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Dim NCheck:NCheck=true
Dim rs
Dim eStr:eStr=""
%>
<!--#include file="cgi/Config.asp"-->
<%


Dim act:act=Request("act")


if act="save" then 
	s_mailcheck=request("s_mailcheck")
	s_smtp=request("s_smtp")
	s_remail=request("s_remail")
	s_smail=request("s_smail")
	s_pass=request("s_pass")
	s_user=request("s_user")
	masterpass=request("masterpass")
	if 	not mobj.testreg(s_mailcheck,"^1$")	then s_mailcheck=0
	s_mailcheck=cint(s_mailcheck)
	if masterpass="" then mobj.jscheck "管理密码不能为空",1
	mobj.crs rs
	rs.open "select * from b2c_admin where  a_id="&Session("a_id")&" and a_type=1 and a_userpass='"&md5(masterpass)&"'",dstr,1,1
	if rs.eof and rs.bof then
		mobj.drs rs
		mobj.JsCheck "密码错误",1
			
	else
		mobj.drs rs
		mobj.crs rs
		mobj.crs rs
		rs.open "select * from b2c_sys where s_id=1",dstr,1,3
		rs("s_mailcheck")=s_mailcheck
		rs("s_smtp")=s_smtp
		rs("s_remail")=s_remail
		rs("s_smail")=s_smail
		rs("s_pass")=s_pass
		rs("s_user")=s_user
		rs.update
		mobj.drs rs
	end if
end if
%>

<!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 http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>管理页面</title>
<meta http-equiv="Expires" Content="0"/>
<meta http-equiv="Cache-Control" Content="no-cache"/>
<meta http-equiv="Pragma" Content="no-cache"/>
<link href="/images/skin_1/style.css" type="text/css" rel="stylesheet"/>

<script language=javascript type="text/javascript" src="/js/jquery-1.7.1.min.js"></script>
<script language="javascript" src="js/comm.js"></script>
<script language="javascript">
function cleardate(){
	  $("#qstime").val("");
	  $("#qetime").val("");
		
}
</script>
<base target="_self"/>
</head>
<body class="htmlbody">

<table class="table1" cellspacing="1" cellpadding="3" align="center" border="0">
	<tr>
		<td class="tableline linetitle" width="200" align="left">邮件管理</td>
		<td class="tableline" width="*" align="right">&nbsp;</td>
	</tr>
</table>

<%
mobj.crs rs
rs.open "select * from b2c_sys where s_id=1",dstr,1,1
s_mailcheck=rs("s_mailcheck")
s_smtp=rs("s_smtp")
s_remail=rs("s_remail")
s_smail=rs("s_smail")
s_pass=rs("s_pass")
s_user=rs("s_user")

mobj.drs rs
%>


<div>

<table  border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
        <tr>
          <th colspan="4">修改邮件服务器</th>
        </tr>
		<form action="admin_email.asp" method="Post" name="myform" id="passform">
<input type="Hidden" name="act" value="save">
        <tr>
          <td width="27%" align="right" class="tablerow2"><b>是否开启邮件发送功能：</b></td>
          <td width="73%" colspan="3" class="tablerow2"><label>
            <input name="s_mailcheck" type="checkbox" id="s_mailcheck" value="1" <%if s_mailcheck=1 then response.Write("checked='checked'")%>  />
            勾选表示开通
          </label></td>
        </tr>
        <tr>
          <td align="right" class="tablerow1"><b>SMTP邮件服务器：</b></td>
          <td colspan="3" class="tablerow1">
            <input name="s_smtp" type="text" id="s_smtp" value="<%=s_smtp%>" size="30" maxlength="80" />          </td>
        </tr>
		<tr>
          <td align="right" class="tablerow2"><b>SMTP登录账号：</b></td>
          <td colspan="3" class="tablerow2"><input name="s_user" type="text" id="s_user" value="<%=s_user%>" size="30" /></td>
        </tr>
		
		 <tr>
          <td align="right" class="tablerow1"><b>SMTP登录密码：</b></td>
          <td colspan="3" class="tablerow1">
            <input name="s_pass" type="text" id="s_pass" value="<%=s_pass%>" size="30" maxlength="80" />          </td>
        </tr>
		<tr>
          <td align="right" class="tablerow2"><b>发件箱完整地址：</b></td>
          <td colspan="3" class="tablerow2"><input name="s_smail" type="text" id="s_smail" value="<%=s_smail%>" size="30" /></td>
        </tr>
		 <tr>
          <td align="right" class="tablerow1"><b>接收地址邮箱：</b></td>
          <td colspan="3" class="tablerow1">
            <input name="s_remail" type="text" id="s_remail" value="<%=s_remail%>" size="30" maxlength="80" />          </td>
        </tr>
		<tr>
          <td align="right" class="tablerow2"><b>管理员密码：</b></td>
          <td colspan="3" class="tablerow2"><input name="masterpass" type="password" id="masterpass" value="" size="30" /></td>
        </tr>
       
        <tr align="center">
          <td class="tablerow1">&nbsp;</td>
          <td colspan="3" align="left" class="tablerow1"><input   type="submit" class="button"  value="确认修改" />
          &nbsp;&nbsp;&nbsp;&nbsp;          </td>
          </tr>
		</form>
      </table>
     




      
      <%if act="ok" then%>
      <table align="center" border="0" cellpadding="3" cellspacing="1" class="table2">
    <tr> 
      <th colspan="2" align="left"> 成功提示信息!</th>
    </tr>
  <tr><td align="center" width="20%" class="tableline1"><img src="/images/suc.gif" width="95" height="97" border="0"></td><td width="80%" class="tableline1"> <b style="color:blue">您在成功提示页面的停留时间 <span id="jump">0</span> 秒</b><br><li><%=eStr%>。</li></td></tr>
  <tr><td colspan="2" align="center" height="25" class="tableline2">
  <%if act="ok" and u_id="" then%>
  <a href="admin_pass.asp?act=edit">返回上一页...</a>
  <%end if%>
 
   
  
  
  
  </td></tr>
</table><p>&nbsp;</p>

      <%end if%>
      <%if act="error" then%>
<table align="center" border="0" cellpadding="3" cellspacing="1" class="table2">
    <tr> 
      <th colspan="2" align="left"> 错误提示信息!</th>
    </tr>
  <tr><td align="center" width="20%" class="tableline1"><img src="/images/err.gif" width="95" height="97" border="0"></td><td width="80%" class="tableline1"> <b style="color:blue">产生错误的可能原因：</b><br><%=eStr%></td></tr>
  <tr><td colspan="2" align="center" height="25" class="tableline2"><a href="javascript:history.go(-1)">返回上一页...</a></td></tr>
</table><p>&nbsp;</p>
<%end if%>
      <div id="BokeccBtn"> </div>
</div>

<form name="NewAsp_UploadForm" action="../remoteupload.asp?action=upload&ChannelID=1" method="post" target="NewAsp_UploadTarget">
<input type="hidden" name="NewAsp_UploadText" value=""/>
</form>
<div id="divProcessing" style="width:200px;height:30px;position:absolute;display:none">
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" width="100%" height="100%"><tr><td bgcolor="#0650D2"><marquee align="middle" behavior="alternate" scrollamount="5" style="font-size:9pt"><font color="#FFFFFF">...正在保存数据...请等待...</font></marquee></td></tr></table>
</div>

<script type="text/javascript">
function checkpass(){
	if($("#oldpass").val()==""){alert("原始密码必填");$("#oldpass").focus();return;}
	if($("#newpass").val()==""){alert("新密码必填");$("#newpass").focus();return;}
	if($("#newpass1").val()!=$("#newpass").val()){alert("两次输入的新密码不一致");$("#newpass1").focus();return;}
	$("#passform").submit();
}
 
</script>
<!--#include file="end.asp"-->
</body></html>
