<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->
<%call head()
call saycardd("找回密码")

dim p
p=trim(request.querystring("p"))
if p<>"" then
dim name,mail,userid,pass,sjhm
sjhm=usb(request("sjhm"))
mail=usb(request("mail"))

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select [ID],[name],[email],[mm],[sjhm] from [users] where [sjhm]='"& sjhm &"' and [email]='"&mail&"' order by [id] desc",conn,1,1
	if rs.eof then
  Call Error("手机号或邮箱错误！")
end if
 sjhm=rs("sjhm")
 pass=rs("mm")
 userid=rs("ID")
rs.close
set rs=nothing
Dim msg
Set msg = Server.CreateObject("JMail.Message")
msg.ContentType = "multipart/mixed"
msg.CharSet = "GB2312"
msg.FromName = "找回密码成功"				'发件者的签名
msg.From = "nowtx.cn@qq.com"			'发件者邮箱
msg.ReplyTo = "nowtx.cn@qq.com"			'指定回复邮箱
msg.Subject = "找回密码"				'邮件主题
msg.AddAttachment(Server.MapPath("../img/email_logo.jpg"))	'附件地址，必填
msg.Body =""
msg.Body =msg.Body & "您的手机号是"&sjhm&",ID是"&userid&",密码是"&pass&"" & vbCrLf
msg.Body =msg.Body & waptitle&"找回密码系统"	'邮件正文
msg.AddRecipient mail, "来自"&waptitle&""		'收件人的邮箱、签名
msg.MailServerUserName = "nowtx.cn"	'自己邮箱的管理用户名
msg.MailServerPassword  = "nowtx.cn"	'自己邮箱密码
msg.Send("smtp.qq.com")				'发邮件服务器
msg.Close
Set msg = Nothing
response.Write "您的手机号和密码已成功发送到邮箱！<br/>"
else
Response.Write "你的手机号：<br/><input name=""sjhm"" maxlength=""11""/><br/>"
Response.Write "你的邮箱：<br/><input name=""mail"" maxlength=""50"" value=""@""/><br/>"
Response.Write "<anchor>找回密码"
Response.Write "<go href=""getmm.asp?p=1"" method=""post"" accept-charset=""utf-8"">"
Response.Write "<postfield name=""sjhm"" value=""$(sjhm)""/>"
Response.Write "<postfield name=""mail"" value=""$(mail)""/>"
Response.Write "</go></anchor><br/>"
end if
Response.Write "---------<br/><a href='login.asp?saytk="&saytk&"&amp;sid="&sid&"'>返回登录</a>"& chr(13)
conn.close
set conn=nothing
%><!--#include file="fanhui.asp"-->
<%call headsay()%>