<%@ LANGUAGE=VBScript CodePage=65001%>
<% response.charset="utf-8" %>
<% session.codepage=65001 %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--#include file="../LyricInc/access.asp"  -->
<!-- #include file="LyricInc/functions.asp" -->
<%
act=Request("act")
If act="save" Then 

set rs=server.createobject("adodb.recordset")
sql="select * from web_Mail"
rs.open(sql),cn,1,3
rs("MailAddress")=trim(request.form("MailAddress"))
rs("MailName")=trim(request.form("MailName"))
rs("MailPassword")=trim(request.form("MailPassword"))
rs("MailSmtp")=trim(request.form("MailSmtp"))
rs("MailSentName")=trim(request.form("MailSentName"))
rs("MailEmergency")=trim(request.form("MailEmergency"))
rs("ReceiveMailAddress")=trim(request.form("ReceiveMailAddress"))
'rs("ReceiveOrderYes")=trim(request.form("ReceiveOrderYes"))
rs("ReceiveMessageYes")=trim(request.form("ReceiveMessageYes"))
'rs("ReceiveResumeYes")=trim(request.form("ReceiveResumeYes"))
'rs("ReplyOrderYes")=trim(request.form("ReplyOrderYes"))
rs("ReplyMessageYes")=trim(request.form("ReplyMessageYes"))
'rs("ReplyResumeYes")=trim(request.form("ReplyResumeYes"))
rs("EditTime")=now()
rs.update
rs.close
set rs=nothing

response.Write "<script language='javascript' >alert('OK');location.href='Mail_Settings.asp';</script>"
end if
 %>
 
	<%
Call header()

%>
<%set rs=server.createobject("adodb.recordset")
sql="select * from web_Mail"
rs.open(sql),cn,1,1
if not rs.eof and not rs.bof then
%>
  <form id="form1" name="form1" method="post" action="?act=save">
         <script language='javascript'>
function checksignup1() {
if ( document.form1.web_name.value == '' ) {
window.alert('请输入qq号^_^');
document.form1.web_name.focus();
return false;}

return true;}
</script>

	<table cellpadding='3' cellspacing='1' border='0' class='tableBorder' align=center>
	<tr>
	  <th class='tableHeaderText' colspan=2 height=31>邮件回复设置</th>
	<tr>
	  <td height=23 colspan="2" class='forumRow'><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="20" class='TipTitle'>&nbsp;√ 操作提示</td>
        </tr>
        <tr>
          <td height="30" valign="top" class="TipWords"><p>1、使用邮件功能需确保您的主机或IIS安装了 <span style='color:#F00'>Jmail组件</span>，否则将无法使用此功能。</p>
          <p>2、“发送邮箱" 是指您使用此邮箱发送邮件给您的客户，这个邮箱是你的。建议使用163.com邮箱。</p>
          <p>3、"接收邮箱" 是指当系统自动发送邮件时您需要接收此邮件的邮箱地址。这个邮箱也是你的。可以与“发送邮箱”保持一致。</p>
          <p>4、由于主机及邮件服务器的不确定性，我们无法保证此功能在任意主机上及任何邮件服务器上使用。</p>
</td>
        </tr>
        <tr>
          <td height="10">&nbsp;</td>
        </tr>
      </table></td>
	  </tr>
	<tr>
	  <td height=23 colspan="2" class='forumRowHighLight'><strong><span style='color:#F00'>发送</span> 邮箱设置</strong></td>
	  </tr>
	<tr>
	<td width="15%" height=23 class='forumRow'>邮件地址</td>
	<td class='forumRow'><input name='MailAddress' type='text' id='MailAddress' value="<%=rs("MailAddress")%>" size='40'> </td>
	</tr>
	<tr>
	<td width="15%" height=23 class='forumRow'>邮件用户名</td>
	<td class='forumRow'><input name='MailName' type='text' id='MailName' value="<%=rs("MailName")%>" size='40'> </td>
	</tr>
	<tr>
	<td width="15%" height=23 class='forumRow'>邮件密码</td>
	<td class='forumRow'><input name='MailPassword' type='password' id='MailPassword' value="<%=rs("MailPassword")%>" size='40'> </td>
	</tr>
	<tr>
	<td width="15%" height=23 class='forumRow'>邮件SMTP服务器</td>
	<td class='forumRow'><input name='MailSmtp' type='text' id='MailSmtp' value="<%=rs("MailSmtp")%>" size='40'> </td>
	</tr>
	<tr>
	<td width="15%" height=23 class='forumRow'>发件人姓名</td>
	<td class='forumRow'><input name='MailSentName' type='text' id='MailSentName' value="<%=rs("MailSentName")%>" size='40'> </td>
	</tr>
	<tr>
	<td width="15%" height=23 class='forumRow'>邮件紧急程度</td>
	<td class='forumRow'><input name='MailEmergency' type='text' id='MailEmergency' value="<%=rs("MailEmergency")%>" size='40'> 输入数字，1为最快，5为最慢。</td>
	</tr>
	<tr>
	  <td height=23 colspan="2" class='forumRowHighLight'><strong><span style='color:#F00'>接收</span> 邮箱设置</strong></td>
	  </tr>
	<tr>
	<td width="15%" height=23 class='forumRow'>接收邮件地址</td>
	<td class='forumRow'><input name='ReceiveMailAddress' type='text' id='ReceiveMailAddress' value="<%=rs("ReceiveMailAddress")%>" size='40'> </td>
	</tr>
	<tr>
	  <td class='forumRow' height=23>当有新留言时邮件通知我</td>
	  <td class='forumRow'><label>
	       <input type="radio" name="ReceiveMessageYes" value="1"<%
		if rs("ReceiveMessageYes")=1 then
		response.write "checked"
		end if%>>
      是
      &nbsp;
      <input name="ReceiveMessageYes" type="radio" value="0" <%if rs("ReceiveMessageYes")=0 then
		response.write "checked"
		end if%>>
      否 </label></td>
	  </tr>
      
	<tr>
	  <td class='forumRow' height=23>当留言被回复时通知对方</td>
	  <td class='forumRow'><label>
	       <input type="radio" name="ReplyMessageYes" value="1"<%
		if rs("ReplyMessageYes")=1 then
		response.write "checked"
		end if%>>
      是
      &nbsp;
      <input name="ReplyMessageYes" type="radio" value="0" <%if rs("ReplyMessageYes")=0 then
		response.write "checked"
		end if%>>
      否 </label></td>
	  </tr>
      

      
      
	<tr><td height="100" colspan=2  class='forumRow2'><div class='ButtonFix' align="center">
	  <INPUT class='GPetSubmit' type=submit value='提 交'  onClick='javascript:return checksignup1()' name=Submit>
	  </div></td></tr>
	</table>
</form>

<%
Call DbconnEnd()
else
response.write "暂时无数据"
end if %>