<%Response.Buffer = true %>
<!--#include file="../inc/config.asp" -->
<!--#include file="../inc/conn.asp" -->
<!-- #include file="inc/function.asp" -->
<!-- #include file="inc/session.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<%
'定义变量
dim id,vals
id=Clng(request.QueryString("id"))
vals=Clng(request.QueryString("vals"))
%>
<HTML>
<HEAD>
<TITLE>删除</TITLE>
<meta http-equiv="refresh" content="0;URL=<%=request.ServerVariables("HTTP_REFERER")%>">
<style>
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {font-size: 14pt}
</style>
</HEAD>
<BODY>
<%
dim m_userid,m_username,m_email
conn.execute("update t_agent set IsCheck="&vals&" where id="&id)
set rs=server.CreateObject("adodb.recordset") 
rs.open "select UserId,UserName,Email from t_agent where id="&id,conn,3,1
if not rs.eof then
	m_userid=rs(0)
	m_username=rs(1)
	m_email=rs(2)
end if
rs.close
set rs=nothing
if(vals=10) then
	'send email
		dim msgc
		msgc=ReadFromTextFile(server.MapPath("/mail.htm"))
		Set msg = Server.CreateObject("JMail.Message") 
		msg.silent = true 
		msg.Logging = true 
		msg.Charset = "gb2312" 
		msg.ContentType ="text/html"   'multipart/mixed
		msg.MailServerUserName=MailServerUserName	'登录邮件服务器的用户名 
		msg.MailServerPassword=MailServerPassword  '输入smtp服务器验证密码  （用户Email帐号对应的密码） 
		msg.From = MailAddress    '发件人Email 
		msg.FromName = SiteName   '发件人姓名 	
		msg.AddRecipient m_email  '收件人Email 
		msg.Subject = "会员["&m_userid&"]通过审核"  '信件主题 
		msg.Body = msgc   '正文 
		msg.Priority = 1
		msg.Send MailServer        'smtp服务器地址（企业邮局地址） smtp.**.com
		set msg = nothing 
end if
call connclose()
%>
<div align="center">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p class="style1">
  <%response.Write("成功操作!")%></p>
</div>
</BODY>
</HTML>
