<!--#Include File="WapConfig/WapHeader.asp"-->
<%
'以下为文件正文。
if Request.QueryString("ToDo")="Reg" then
	receive_a=Trim(Lcase(request("Send_A"))) 'person_name
	receive_b=Trim(Lcase(request("Send_B"))) 'password 'return 小写形式 
	receive_b1=Trim(Lcase(request("Send_B1"))) 
	receive_D=request("Send_D")
	receive_C=request("Send_C")
	receive_e=now()
	receive_G=request("Send_G")
	receive_F=request("Send_F")
	receive_M=request("Send_M")
if receive_a="" then
			error_message="请输入姓名。"
elseif receive_b="" then
			error_message="请输入密码。"
elseif receive_b<>receive_b1 then
			error_message="两次密码输入不一致！请重新输入"		
else
	XML.ErrorPagePath="" '一定要在此设置此句。
	XML.StrSql="SELECT M_Name FROM Members where M_Name=" & "'" & receive_a & "'"
		XML.MdbDo
		If XML.RecordCount=0 then			
			XML.StrSql = "insert into members (M_Name, M_Password,M_Sex,M_Email,M_Reg_day,M_Country,M_ICQ,M_MSN)  values ('"&receive_a&"','"&receive_b&"',"&receive_c&",'"&receive_d&"','"&receive_e&"','"&receive_G&"','"&receive_F&"','"&receive_M&"')"
                   	XML.MdbDo
			session("OnlineName")=Receive_a
			session("OnlinePwd")=receive_b
			XML.StrSql ="Update totals set U_Count=U_Count + 1, P_NewUser ='" & Receive_A & "'"
			XML.MdbDo 
			Response.Redirect XML.wappath & "success.asp?todo=RegOK" '表示登陆成功
		Else
			error_message="用户名已经存在！"

		End if	
End if
End if
XML.WriteRow error_message
XML.WriteOut "<b>新用户注册：</b>"
XML.WriteOut XML.Div(,,"N")
XML.WriteOut "<form method='post' action='" & XML.ThisFileName & "?ToDo=Reg" & "'>"
XML.WriteOut "帐号"
XML.WriteRow "<input type='text' name='Send_A' size='15' value=''/>"
XML.WriteOut "密码"
XML.WriteRow "<input type='text' name='Send_B' value=''/>"
XML.WriteOut "再次输入密码"
XML.WriteRow "<input type='text' name='Send_B1' value=''/>"
XML.WriteOut "性别:"
XML.WriteOut "<select name='Send_C' size='1'>"
XML.WriteOut "<option value='0'>先生</option>"
XML.WriteOut "<option value='1'>小姐</option>"
XML.WriteRow "</select>"
XML.WriteRow "------选填项-------"
XML.WriteOut "邮箱:"
XML.WriteRow "<input type='text' name='Send_D' value='@'/>"
XML.WriteOut "MSN:"
XML.WriteRow "<input type='text' name='Send_M' value=''/>"
XML.WriteOut "来自:"
XML.WriteRow "<input type='text' name='Send_G' value=''/>"
XML.WriteOut "ＱＱ:"
XML.WriteRow "<input type='text' name='Send_F' maxLength='12'  value=''/>"
XML.WriteOut "<input type='hidden' name='ToDo'>"
XML.WriteOut "<input type='submit' value='注册'/>"
XML.WriteOut "</form>"
'以下为返回链接等信息。
XML.WriteRow XML.ImgA("Images/topt.gif","Index.asp","返回上级")
XML.WriteRow XML.ImgA("",XML.WapPath,"返回首页")
%>
<!--#Include File="WapConfig/WapFooter.asp"--> 
