<!--#include file="include/conn.asp"-->
<% 
'website:http://www.angelasp.com
' Angel工作室技术开发团队:QQ:815657032、QQ：709047174
' Copyright (C) Angel工作室 (http://www.angelasp.com).  All rights reserved
action=request.QueryString("action")

Select case action
Case "ckusername"
user_name=Request.Form("username")
if user_name<>"" Then 
set rs = server.createobject("adodb.recordset")
sql="select * from bookuser where user_name='"&user_name&"'"
rs.open sql,conn,1,1
If rs.eof Then 
response.write "<script language='javascript'>alert('不好意思用户名不存在哦！');history.back(-1);</script>"
response.end
 else 
Response.Write "<script language='javascript'>location='usergetpassword.asp?getusername="&user_name&"';</script>"
 End If
 Else 
response.write "<script language='javascript'>alert('不好意思用户名不能为空！');history.back(-1);</script>"
response.end
 End If 
Case "ckuseremail"

user_name=Request.Form("username")
user_email=Request.Form("email") 
set rs = server.createobject("adodb.recordset")
sql="select * from bookuser where 1=1 and user_name='"&user_name&"' and user_email='"&user_email&"' "
rs.open sql,conn,1,3
If rs.eof Then 
response.write "<script language='javascript'>alert('不好意思你输入的邮箱不对？');history.back(-1);</script>"
response.end
Else 
userpasswrod=Hour(now)&Minute(now)&Second(now)&int(900*rnd)+100
rs("user_password")=userpasswrod
rs.update
rs.close
set rs=nothing
Response.Write "<script language='javascript'>alert('恭喜你密码也找回！你的密码为["&userpasswrod&"]这次一定要记住啊！');location='index.asp';</script>"
Response.End 
End If 

Case Else 
End select


%>