<!--#include file="../Include/Class_Conn.asp" -->

<% 
Dim action,values,Rs,SQL
action=replace_text(request.querystring("action"))
values=replace_text(request.querystring("value"))
'Set rs=server.createobject("ADODB.recordset")
select case action
 case "cusername"
  call cusername()
 case "cmailbox"
  call cmailbox()
end select

Sub cusername()
 SQL="select username From [pH_Intro_Base] where username='"&values&"'"
 Set Rs=Conn.Execute(SQL)
 if rs.eof then
  'rs.close
  Set rs=nothing
  Closedb
  Response.write "<b>恭喜！您可以使用这个用户名</b>"
  Response.write "<script>alert('-恭喜！您可以使用这个用户名-');window.close();</script>"
  Response.End()
 Else
  'rs.close
  Set rs=nothing
  Closedb
  Response.write "<b>抱歉！您不能使用这个用户名</b>"
  Response.write "<script>alert('-抱歉！您不能使用这个用户名-');window.close();</script>"
  Response.End()

 end if
end sub

Sub cmailbox()
 SQL="select email from [pH_Intro_Base] where email='"&values&"'"
 Set Rs=Conn.Execute(SQL)
  If rs.eof then
  'rs.close
  Set rs=nothing
  Closedb
  Response.write "<b>该邮箱没有被使用，可以注册！</b>"
  Response.write "<script>alert('-该邮箱没有被使用，可以注册！-');window.close();</script>"
  Response.End()
 Else
  'rs.close
  Set rs=nothing
  Closedb
  Response.write "<b>该邮箱已经被使用，不能注册！</b>"
  Response.write "<script>alert('-该邮箱已经被使用，不能注册！-');window.close();</script>"
  Response.End()

 end if

end sub
 %>
