<!--#include file="../inc/conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>商户注册</title>
<%
dim server_v1,server_v2
server_v1=cstr(request.servervariables("http_referer"))
server_v2=cstr(request.servervariables("server_name"))
if  mid(server_v1,8,len(server_v2))<>server_v2  then
response.Write "<Script>alert('警告！你正在从外部提交数据！！请立即终止！！\r\n如果你不是在外部提交,可能是因为你重复提交数据,请不要重复提交！！');window.location.href='/';</Script>"
response.End
end if
if Replace(request("username"), "'", "''")="" or Replace(request("password"), "'", "''")="" then
response.write "<script>alert('表单未填完整不能注册！');history.back();</Script>"
response.end
end if
if request("qq")=no then
response.write "<script>alert('QQ号码没填写不能注册！');history.back();</Script>"
response.end
end if
if request("mobile")=no then
response.write "<script>alert('手机号码没填写不能注册！');history.back();</Script>"
response.end
end if
if request("bank")=no then
response.write "<script>alert('开户银行没填写不能注册！');history.back();</Script>"
response.end
end if
if request("accountname")=no then
response.write "<script>alert('开户人姓名没填写不能注册！');history.back();</Script>"
response.end
end if
if request("bankacc")=no then
response.write "<script>alert('开户银行账号没填写不能注册！');history.back();</Script>"
response.end
end if
if request("bankname")=no then
response.write "<script>alert('开户银行城市没填写不能注册！');history.back();</Script>"
response.end
end if
%>
<%
username=request.form("username")	'会员帐号
login_password=request.form("password")	'会员密码
mobile=request.form("mobile")		'电话
qq=request.form("qq")			'Q Q
accountname=request.form("accountname")	'收款人
bankacc=request.form("bankacc")		'收款帐号
bankname=request.form("bankname")	'银行地址
bank=request.form("bank")		'银行名称


	call ConnectionDatabase
	Set Rs=GrateRs("Select * from member where username like '"&username&"'",3)

if Rs.eof then 
	Rs.addnew
	Rs("username")=username		'会员帐号
	Rs("passwd")=md5(login_password)	'会员密码
	Rs("mobile")=mobile		'电话
	Rs("qq_msn")=qq			'Q Q
	Rs("email")=email		'EMAIL地址
	Rs("payee")=accountname		'收款人
	If Session("tuiguang") <> ""  Then rs("tuiguang")=Session("tuiguang")		'推广ID
	Rs("bank_card")=bankacc		'收款帐号
	Rs("bank_address")=bankname	'银行地址
	Rs("bankname")=bank		'银行名称
	Rs("regtime")=now()		'注册时间
	Rs("bufa")=1			'补充充值功能
	Rs("hy")=0			'级别
	rs("vip")=1 '自动审核
	Rs.update
	

else
response.write "<script language='JavaScript'>{window.alert('对不起,您注册的用户已经存在,请选择另外的登录用户名!');window.location='javascript:history.back();';}</script>"
end if
	call DBConnEnd


	response.write "<script language='JavaScript'>{window.alert('注册成功!');window.location.href='login.asp';}</script>"


%>

