📄 reg.asp
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from setup where id=1",conn,1,1
website_name=rs("website_name")
max_pc_count=rs("max_pc_count")
pb_vip=rs("pb_vip")
rs.close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=website_name%> - 用户注册</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
a:hover {
color: #FF6600;
}
-->
</style>
<link href="../images/style.css" rel="stylesheet" type="text/css">
</head>
<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<!--#include file="header.asp"-->
<table width="776" height="36" border="0" align="center" cellpadding="0" cellspacing="0" background="../images/img22.gif">
<tr>
<td><img src="../images/img29.gif" width="220" height="36"></td>
</tr>
</table>
<table width="776" height="300" border="0" align="center" cellpadding="0" cellspacing="0" class="t1">
<tr>
<td align="center" valign="top">
<table width="550" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<%
action_e=request.QueryString("action")
Select Case action_e
Case ""
Call main()
Case "data_more"
Call data_more()
Case "save_data"
Call save_data()
end select
%>
<%sub main%>
<table width="550" border="0" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="reg.asp?action=data_more">
<tr>
<td height="30" align="center"><strong>用户注册</strong>-填写用户账号</td>
</tr>
<tr>
<td height="30" align="center">填写用户账号和选择用户类别,用户账号只能填写3~12个字母、数字及下划线</td>
</tr>
<tr>
<td height="30" align="center">用户账号:
<input name="userid" type="text" class="input1" id="userid" size="20" maxlength="12">
<select name="u_type" class="select1" id="u_type">
<option value="" selected>请选择</option>
<option value="1">个人计点用户</option>
<option value="2">个人包月用户</option>
<option value="3">网吧包月用户</option>
</select></td>
</tr>
<tr>
<td height="30" align="center"><input name="Submit" type="submit" class="button1" value="下一步"></td>
</tr>
</form>
</table>
<%
end sub
%>
<%
sub data_more()
call myobj.chkrq()
if request.form("userid")="" then
response.write"<script language=javascript>alert('请填写要注册的用户账号');history.back();</Script>"
response.end
end if
if myobj.ChkID(request.form("userid"))=false then
response.write"<script language=javascript>alert('用户账号只能是字母、数字及下划线');history.back();</Script>"
response.end
end if
if len(request.form("userid"))<3 or len(request.form("userid"))>12 then
response.write"<script language=javascript>alert('用户账号不能小于3或大于12个字符');history.back();</Script>"
response.end
end if
if request.Form("u_type")="" then
response.write"<script language=javascript>alert('请选择用户的类型');history.back();</Script>"
response.end
end if
if myobj.ChkNum(request.Form("u_type"))=false then
response.write"<script language=javascript>alert('用户类型值错误');history.back();</Script>"
response.end
end if
if request.Form("u_type")<>1 and request.Form("u_type")<>2 and request.Form("u_type")<>3 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("userid")&"'",conn,1,1
if not rs.eof then '该账号存在
call nr()
response.write"<script language=javascript>alert('该用户账号已经有人使用,请重新填写');history.back();</Script>"
response.end
end if
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type="&request.Form("u_type")&"",conn,1,1
u_count=rs.recordcount '当前用户类型总数
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "select max_ps1,max_ps2,max_pb from setup",conn,1,1
max_ps1=rs("max_ps1")
max_ps2=rs("max_ps2")
max_pb=rs("max_pb")
rs.close
set rs=nothing
conn.close
set conn=nothing
if max_ps1<>"" and isnull(max_ps1)=false then
if request.form("u_type")=1 then
if cint(u_count)>=cint(max_ps1) then
response.write"<script language=javascript>alert('允许注册的个人计点用户数量已达到上限');history.back();</Script>"
response.end
end if
end if
end if
if max_ps2<>"" and isnull(max_ps2)=false then
if request.form("u_type")=2 then
if cint(u_count)>=cint(max_ps2) then
response.write"<script language=javascript>alert('允许注册的个人包月用户数量已达到上限');history.back();</Script>"
response.end
end if
end if
end if
if max_pb<>"" and isnull(max_pb)=false then
if request.form("u_type")=3 then
if cint(u_count)>=cint(max_pb) then
response.write"<script language=javascript>alert('允许注册的网吧包月用户数量已达到上限');history.back();</Script>"
response.end
end if
end if
end if
%>
<table width="580" border="0" cellpadding="0" cellspacing="5">
<form name="form1" method="post" action="reg.asp?action=save_data">
<tr>
<td height="30" colspan="2" align="center"><strong>用户注册</strong>-详细资料</td>
</tr>
<tr>
<td colspan="2" align="center"><span class="f3">(名称加粗的表单项目必须填写)</span> <a href="online_help.asp" target="_blank">点击此处查看用户注册帮助</a></td>
</tr>
<tr>
<td width="140" height="25" align="right" bgcolor="#E7E7E7"><strong>用户账号:</strong></td>
<td width="440" align="left" bgcolor="#F7F7F7"> <%=LCase(request.form("userid"))%></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>用户类型:</strong></td>
<td align="left" bgcolor="#F7F7F7"> <%if request.form("u_type")=1 then%>个人计点用户<%end if%><%if request.form("u_type")=2 then%>个人包月用户<%end if%><%if request.form("u_type")=3 then%>网吧包月用户<%end if%></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>用户密码:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="u_pwd" type="password" class="input1" id="u_pwd" style="ime-mode:disabled" size="20" maxlength="24">
<br>
<span class="f7">(最少6个字符、最多24个字符)</span></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>确认密码:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="re_u_pwd" type="password" class="input1" id="re_u_pwd" style="ime-mode:disabled" size="20" maxlength="24">
<br>
<span class="f7">(必须与上面输入的密码一致)</span></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>密码提示问题:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="pwd_qu" type="text" class="input1" id="pwd_qu" size="20">
<br>
<span class="f7">(最少8个字符、最多50个字符,汉字占两个字符,不能与密码相同)</span></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>密码提示答案:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="pwd_an" type="text" class="input1" id="pwd_an" size="20">
<br>
<span class="f7">(最少8个字符、最多50个字符,汉字占两个字符,不能与问题或密码相同)</span></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>申请VIP用户:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input type="radio" name="is_vip" value="true">
申请
<input type="radio" name="is_vip" value="false">
不申请 <%if pb_vip=false then%><span class="f3">(网吧用户不允许申请VIP用户)</span><%end if%><br>
<span class="f7">(可获得查看VIP类别的影片,或下载影片的权限)</span></td>
</tr>
<%
if request.form("u_type")=3 then
aryReturn = Split(myobj.getIP(),".")
%>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>注册客户机台数:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="max_online" type="text" class="input1" id="max_online" size="10" style="ime-mode:disabled" onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
台 <%if isnull(max_pc_count)=false or max_pc_count<>"" then%><span class="f3">(最多允许注册 <%=max_pc_count%> 台)</span><%end if%><br>
<span class="f7">(即最多同时使用该账号点播影片的台数,不少于1台)</span></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>绑定网吧IP地址:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="bdip0" type="text" class="input1" id="bdip0" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(0),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
.
<input name="bdip1" type="text" class="input1" id="bdip1" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(1),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
.
<input name="bdip2" type="text" class="input1" id="bdip2" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(2),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
.
<input name="bdip3" type="text" class="input1" id="bdip3" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[^\d]/g,'') " value="<%=Right(aryReturn(3),Len(aryReturn(i))-0)%>" size="2" maxlength="3"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
<br>
<span class="f7">(默认的是您当前计算机的IP地址,可修改)</span></td>
</tr>
<%end if%>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7">真实姓名:</td>
<td align="left" bgcolor="#F7F7F7"><input name="u_name" type="text" class="input1" id="u_name" size="20" maxlength="4" onkeyup="value=value.replace(/[ -~]/g,'')" onkeydown="if(event.keyCode==13)event.keyCode=9">
</td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7">用户性别:</td>
<td align="left" bgcolor="#F7F7F7"><input type="radio" name="u_sex" value="true">
男
<input type="radio" name="u_sex" value="false">
女 </td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -