<!-- #include file="include/config_other.asp" -->
<!-- #include file="include/conn.asp" -->
<%
tit="验证用户名"
call web_head(0,0,5,0,0)

response.write "<script language=javascript>"
call val_username()
response.write "</script>"

call web_end2(0)

sub val_username()
  dim usernames
  usernames=trim(request.form("username"))
  if symbol_name(usernames)<>"yes" then
    response.write "alert(""您输入的 用户名称 为空或不符合相关规则！"");"
    exit sub
  else
    if health_name(usernames)<>"yes" then
      response.write "alert(""您输入的 用户名称 含有本系统禁用字符！"");"
      exit sub
    end if
  end if
  
  sql="select id from user_data where username='"&usernames&"'"
  set rs=conn.execute(sql)
  if rs.eof and rs.bof then
    response.write "alert(""恭喜！\n\n您输入的用户名称（"&usernames&"）可以注册！"");"
  else
    response.write "alert(""对不起！\n\n您输入的用户名称（"&usernames&"）已被注册！\n\n请择其它的用户名称。"");"
  end if
  rs.close:set rs=nothing
end sub
%>