<!-- #include file="Conn.asp" -->
<!--#include file="Comm/Site_Class.asp" -->
<%
Response.Expires = -1 
Response.ExpiresAbsolute = Now() - 1 
Response.cachecontrol = "no-cache"

Set Qsite = New Site_Class

Qsite.SiteConfig()

Dim Rs,UserName,sMsg
Set Rs = server.CreateObject("ADODB.recordset")

UserName = Request.QueryString("UserName")

If UserName = "" Or IsNull(UserName) Then
	sMsg = "请输入用户名"
End If
If Qsite.CheckUserName(UserName) = True Then
	sMsg = "用户名称只能是字母，数字或下划线"
End If

If Qsite.CheckStr(UserName , Qsite.RegNoName) = True Then
	sMsg = "输入的用户名称含有非法字符，请重新输入"
End If

If sMsg = "" Then

	If Not IsObject(Conn) Then ConnectionDatabase()
	
	Rs.Open "select * from PersonTbl where UserName = '"& UserName &"'" , Conn , 1 , 1
	If Rs.Eof Then
		sMsg = "用户名 "& UserName &" 还未被注册，您可以使用"
	Else
		sMsg = "用户名 "& UserName &" 已经存在，请重新选择用户名"
	End If
	Rs.Close

End If
%>
<script language="javascript">
	alert("<%=sMsg%>");
	window.close();
</script>