⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reg.asp

📁 在线点播系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	response.end
	end if
	if myobj.ChkLen(request.form("u_name"))<4 or myobj.ChkLen(request.form("u_name"))>8 then
	response.write"<script language=javascript>alert('真实姓名不能少于2个汉字或多于4个汉字');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_sex")<>"" then
	if myobj.chkbool(request.form("u_sex"))=false then
	response.write"<script language=javascript>alert('用户性别值类型错误');history.back();</Script>"
	response.end
	end if
end if
if request.form("b_year")<>"" or request.form("b_month")<>"" or request.form("b_day")<>"" then
	if request.form("b_year")="" or request.form("b_month")="" or request.form("b_day")="" then
	response.write"<script language=javascript>alert('请将出生日期填写完整');history.back();</Script>"
	response.end
	end if
	if isdate(request.form("b_year")&"-"&request.form("b_month")&"-"&request.form("b_day"))=false then
	response.write"<script language=javascript>alert('您填写的出生日期无效');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_add")<>"" then
	if myobj.chkcn(request.form("u_add"))=false then
	response.write"<script language=javascript>alert('用户所在地区的值错误');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_qq")<>"" then
	if myobj.ChkLen(request.form("u_qq"))<5 or myobj.ChkLen(request.form("u_qq"))>20 then
	response.write"<script language=javascript>alert('腾讯QQ号码长度必须为5-20个数字');history.back();</Script>"
	response.end
	end if
	if myobj.ChkNum(request.form("u_qq"))=false then
	response.write"<script language=javascript>alert('腾讯QQ号码只能填写0-9的数字');history.back();</Script>"
	response.end
	end if
	if left(request.form("u_qq"),1)=0 then
	response.write"<script language=javascript>alert('腾讯QQ号码的第一个数字不能是0');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_msn")<>"" then
	if myobj.ChkLen(request.form("u_msn"))>50 then
	response.write"<script language=javascript>alert('MSN地址不能大于50个字符');history.back();</Script>"
	response.end
	end if
	if myobj.ChkEmail(request.form("u_msn"))=false then
	response.write"<script language=javascript>alert('MSN地址格式错误');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_email")<>"" then
	if myobj.ChkLen(request.form("u_email"))>50 then
	response.write"<script language=javascript>alert('电子邮件地址不能大于50个字符');history.back();</Script>"
	response.end
	end if
	if myobj.ChkEmail(request.form("u_email"))=false then
	response.write"<script language=javascript>alert('电子邮件地址格式错误');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_tel")<>"" then
	if myobj.ChkNum(request.form("u_tel"))=false then
	response.write"<script language=javascript>alert('固定电话的只能填写0-9的数字');history.back();</Script>"
	response.end
	end if
	if myobj.ChkLen(request.form("u_tel"))<>11 then
	response.write"<script language=javascript>alert('固定电话的长度必须为11个数字');history.back();</Script>"
	response.end
	end if
	if left(request.form("u_tel"),1)<>0 then
	response.write"<script language=javascript>alert('固定电话的第一个数字只能是0');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_mtel")<>"" then
	if myobj.ChkLen(request.form("u_mtel"))<>11 then
	response.write"<script language=javascript>alert('手机号码必须是11位的数字');history.back();</Script>"
	response.end
	end if
	if left(request.form("u_mtel"),1)<>1 then
	response.write"<script language=javascript>alert('手机号码的第一个数字只能是1');history.back();</Script>"
	response.end
	end if
end if
if request.form("cmd_userid")<>"" then
	if myobj.ChkLen(request.form("cmd_userid"))<3 or myobj.ChkLen(request.form("cmd_userid"))>12 then
		response.write"<script language=javascript>alert('推荐注册人的账号不能小于3个字符或大于12个字符');history.back();</Script>"
		response.end
	end if
	if myobj.ChkID(request.form("cmd_userid"))=false then
		response.write"<script language=javascript>alert('推荐注册人账号只能填写字母、数字、下划线');history.back();</Script>"
		response.end
	end if
	set rs=server.createobject("adodb.recordset")
	rs.open "select * from member where userid='"&request.form("cmd_userid")&"'",conn,1,1
	if rs.eof then
		call nr()
		response.write"<script language=javascript>alert('推荐注册人账号并不存在');history.back();</Script>"
		response.end
	end if
	rs.close
end if
if UCase(request.form("vcode"))<>session("vcode") then
	response.write"<script language=javascript>alert('验证代码错误');history.back();</Script>"
	response.end
end if
if request.form("ok")="" then
	response.write"<script language=javascript>alert('请查看《用户注册协议》,如同意的话,请勾选“我已查看并同意 《用户注册协议》”,否则视为不同意,则无法注册');history.back();</Script>"
	response.end
end if
if myobj.chkbool(request.form("ok"))=false then
	response.write"<script language=javascript>alert('同意《用户注册协议》的值类型错误');history.back();</Script>"
	response.end
end if

set rs=server.createobject("adodb.recordset")
rs.open "select * from setup where id=1",conn,1,1
reg_point=rs("reg_point")
reg_hr=rs("reg_hr")
rs.close

set rs=server.createobject("adodb.recordset")
rs.open "select * from member where (id is null)",conn,1,3
rs.addnew
rs("u_type")=request.form("u_type")
rs("userid")=LCase(request.form("userid"))
rs("u_pwd")=md5(request.form("u_pwd"))
rs("pwd_qu")=request.form("pwd_qu")
rs("pwd_an")=md5(request.form("pwd_an"))
rs("is_vip")=cbool(request.form("is_vip"))
rs("is_free")=false
if request.form("u_type")=3 then
rs("bd_ip")=request.form("bdip0")&"."&request.form("bdip1")&"."&request.form("bdip2")&"."&request.form("bdip3")
rs("max_online")=request.form("max_online")
end if
if request.form("u_name")<>"" then
rs("u_name")=request.form("u_name")
end if
if request.form("u_sex")<>"" then
rs("u_sex")=cbool(request.form("u_sex"))
end if
if request.form("b_year")<>"" and request.form("b_month")<>"" and request.form("b_day")<>"" and isdate(request.form("b_year")&"-"&request.form("b_month")&"-"&request.form("b_day"))=true then
rs("bd_time")=request.form("b_year")&"-"&request.form("b_month")&"-"&request.form("b_day")&" "&time()
end if
if request.form("u_add")<>"" then
rs("u_add")=request.form("u_add")
end if
if request.form("u_qq")<>"" then
rs("u_qq")=request.form("u_qq")
end if
if request.form("u_msn")<>"" then
rs("u_msn")=request.form("u_msn")
end if
if request.form("u_email")<>"" then
rs("u_email")=request.form("u_email")
end if
if request.form("u_tel")<>"" then
rs("u_tel")=request.form("u_tel")
end if
if request.form("u_mtel")<>"" then
rs("u_mtel")=request.form("u_mtel")
end if

if request.form("u_type")=1 then '如果注册的是个人用户
	if isnull(reg_point)=false and reg_point<>"" and reg_point<>0 then
		rs("point")=reg_point
		no_reg=false
	else
		no_reg=true
	end if
else
	if isnull(reg_hr)=false and reg_hr<>"" and reg_hr<>0 then
		rs("end_time")=DateAdd("h",cint(reg_hr),now())
		no_reg=false
	else
		no_reg=true	
	end if
end if

rs.update
rs.close

if request.form("cmd_userid")<>"" then
	set rs=server.createobject("adodb.recordset")
	rs.open "select * from setup where id=1",conn,1,1
	cmd_point=rs("cmd_point")
	cmd_hr=rs("cmd_hr")
	rs.close
	set rs=server.createobject("adodb.recordset")
	rs.open "select * from member where userid='"&request.form("cmd_userid")&"'",conn,1,3
	if rs("u_type")=1 then
		if isnull(cmd_point)=false and cmd_point<>"" and cmd_point<>0 then
			rs("point")=rs("point")+cmd_point
			no_cmd=false
		else
			no_cmd=true
		end if
	else
		if isnull(cmd_hr)=false and cmd_hr<>"" and cmd_hr<>0 then
			rs("end_time")=DateAdd("h",cint(cmd_hr),rs("end_time"))
			no_cmd=false
		else
			no_cmd=true
		end if
	end if
	rs.update
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
end if
%>
<table width="550" height="200" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><table width="400" height="25" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center">用户账号:<span class="f3"><%=request.form("userid")%></span> 注册成功!</td>
      </tr>
    </table>    
      <%if no_reg=false then%>
      <table width="400" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">本站赠送给您<%if request.form("u_type")=1 then%><%=reg_point%>点影币<%end if%><%if request.form("u_type")<>1 then%><%=reg_hr%>小时点播时间<%end if%></td>
        </tr>
      </table>
      <%end if%>
<%if no_cmd=true then%>
      <table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">您的推荐注册人账号:<%=request.form("cmd_userid")%> 已获取<%if request.form("u_type")=1 then%><%=cmd_point%>点影币<%end if%><%if request.form("u_type")<>1 then%><%=cmd_hr%>小时点播时间<%end if%>的奖励</td>
        </tr>
      </table>
      <%end if%>
      <table width="500" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">您现在可以使用新注册的账号登陆本站,如果您注册的是网吧包月用户,则可以自动登陆</td>
        </tr>
      </table></td>
  </tr>
</table>
<%end sub%>
</td>
  </tr>
</table>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -