<%PageName="UserRegPost"%>
<!--#include file="functionuser.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
founderr=false

if request.form("UserName")="" or len(request.form("UserName"))>20 then
	errmsg=errmsg+""+"用户名输入错误(未输入或长度超过了20个字节)。<br>"
	founderr=true
else
	UserName=trim(request.form("UserName"))
end if
if request.form("password")="" or Len(request.form("password"))>20 then
	errmsg=errmsg+""+"请输入您的密码(长度不能大于20)。<br>"
	founderr=true
else
	password=request.form("password")
end if

if password<>request("password2") then
	errmsg=errmsg+""+"您输入的密码和确认密码不一致。"
	founderr=true
end if

if request.form("OICQ")="" or Len(request.form("OICQ"))<5 then
	errmsg=errmsg+""+"你的OICQ号码有误，请查证后重新输入。<br>"
	founderr=true
else
	oicq=request.form("oicq")
end if

if founderr=true then
	call error()
else
	set rs=server.createobject("adodb.recordset")
	sql="select * from [user] where username='"&username&"'"
	rs.open sql,conn,1,3
	if not rs.eof or username=WebName then
		errmsg=""+"对不起，您输入的用户名已经被注册，请重新输入。"
		founderr=true
	else
		rs.addnew
		rs("username")=username
		rs("password")=password
		rs("email")=email
		rs("oicq")=oicq
		rs("loginDate")=NOW()
rs("loginIP")=Request.ServerVariables("REMOTE_ADDR")
		if request.form("Address")<>"" then rs("Address")=request.form("Address")
		if request.form("Tel")<>"" then rs("Tel")=request.form("Tel")
		if request.form("Sex")<>"" then rs("Sex")=request.form("Sex")
		if request.form("Youbian")<>"" then rs("Youbian")=request.form("Youbian")
		if request.form("name")<>"" and request.form("Shenfenzheng")<>"" then
			rs("name")=request("Namse")
			rs("Shenfenzheng")=request("Shenfenzheng")
		end if
		rs("addDate")=NOW()
		rs("lockuser")=false
		rs.update
	end if
	rs.close

	if founderr=true then
		call error()
	else
%> 
<head>
<title><%=name2%>会员注册</title>
<%=css%>
</head>

<body topmargin="3" leftmargin="3">

<table border="0" cellpadding="0" cellspacing="0" width="350" height="420">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="420">
<tr>
<td style="border: 2 double #FF7040">
<div align="center">
  <center>
<table border="0" cellpadding="0" cellspacing="0" width="97%" height="293">
<tr>
<td colspan="2" height="37">
<p align="center"><font color="#FF0000" size="2"><b> VIP会员注册成功</b></font></p>
</tr>
<tr>
<td height="17">登录帐号：</td>
<td height="17" >&nbsp; <%=username%> </td>   
</tr>   
<tr>   
<td height="17">登录密码：</td>   
<td height="17" >&nbsp; <%=password%> </td>   
</tr>   
<tr>   
<td height="17">电子邮件：</td>   
<td height="17" >&nbsp;<%=Email%></td>   
</tr>   
<tr>   
<td height="17">会员类型：</td>   
<td height="17" >&nbsp;<%=request.form("vipdate")%>天会员 </td>   
</tr>   
<tr>   
<td height="18">您的性别：</td>   
<td height="18" >&nbsp;<%=request.form("Sex")%></td>   
</tr>   
<tr>   
<td height="17">真实姓名：</td>   
<td height="17" >&nbsp;   
<%if request.form("name")="" then%>   
未填写   
<%else%>   
<%=request.form("name")%>   
<%end if%>   
</td>   
</tr>   
<tr>   
<td height="17">身份证号：</td>   
<td height="17" >&nbsp;   
<%if request.form("Shenfenzheng")="" then%>   
未填写   
<%else%>   
<%=request.form("Shenfenzheng")%>   
<%end if%>   
</td>   
</tr>   
<tr>   
<td height="17">联系电话：</td>   
<td height="17" >&nbsp;   
<%if request.form("Tel")="" then%>   
未填写   
<%else%>   
<%=request.form("Tel")%>   
<%end if%>   
</td>   
</tr>   
<tr>   
<td height="17">详细地址：</td>   
<td height="17" >&nbsp;   
<%if request.form("Address")="" then%>   
未填写   
<%else%>   
<%=request.form("Address")%>   
<%end if%>   
</td>   
</tr>   
<tr>   
<td height="17">邮政编码：</td>   
<td height="17" >&nbsp;   
<%if request.form("Youbian")="" then%>   
未填写   
<%else%>   
<%=request.form("Youbian")%>   
<%end if%>   
</td>   
</tr>   
<tr>   
<td height="7">OICQ号码：</td>   
<td height="7" >&nbsp;   
<%if request.form("Oicq")="" then%>   
未填写   
<%else%>   
<%=request.form("Oicq")%>   
<%end if%>   
</td>   
</tr>   
<tr>   
<td height="6" colspan="2"> 
  <p align="center"><a href="javascript:self.close()" target="_top">关闭本窗口现在登录即可</a></td>  
</tr>  
</table> 
  
  </center>
</div>
  
</td>  
</tr> 
</table> 
</td> 
</tr> 
</table> 
 
<%       
	end if       
	set rs=nothing       
end if       
conn.close       
set conn1=nothing       
%>






