📄 reg.asp
字号:
<!--#include file="function.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="../inc/top.asp"-->
<html>
<head>
<title>网上办税系统</title>
<link href="/images/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
@import url("wsbs.css");
-->
</style>
</head>
<body style="margin:0px">
<div align=center>
<%top()%>
<br>
<table width=770 border=0 cellspacing=0 cellpadding=0 bordercolorlight=#d90000 bordercolordark=#ffffff>
<tr><td align=center valign=middle height=200>
<%
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">填写用户账号和选择企业类别,用户账号只能是15位数字形式的纳税人编码</td>
</tr>
<tr>
<td height="30" align="center">用户账号【纳税人编码】:
<input name="userid" type="text" class="input1" id="userid" style="ime-mode:disabled" size="20" maxlength="15">
企业类型:<select name="qylx" class="select1" id="qylx">
<option value="" selected>请选择</option>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from qylb order by id",conn,1,1
if not rs.eof then
while not rs.eof
%>
<option value="<%=rs("lbid")%>"><%=rs("cotype")%></option>
<%
rs.movenext
wend
end if
call nr()
%>
</select></td>
</tr>
<tr>
<td height="30" align="center"><input name="Submit" type="submit" class="button9" value="下一步"></td>
</tr>
</form>
</table>
<%end sub%>
<%
sub data_more()
if request.form("userid")="" then
response.write"<script language=javascript>alert('请填写要注册的用户账号');history.back();</Script>"
response.end
end if
if myobj.ChkNum(request.form("userid"))=false or myobj.ChkLen(request.form("userid"))<>15 then
response.write"<script language=javascript>alert('用户账号只能是15位数字形式的纳税人编码');history.back();</Script>"
response.end
end if
if request.Form("qylx")="" then
response.write"<script language=javascript>alert('请选择企业类型');history.back();</Script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from user where username = '"&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
%>
<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="f7">名称加粗的表单项目必须填写</span></td>
</tr>
<tr>
<td width="140" height="25" align="right" bgcolor="#E7E7E7"><strong>用户账号:</strong></td>
<td width="440" align="left" bgcolor="#F7F7F7"> <font face=arial style='font-size:16px;color:#d90000'><%=LCase(request.form("userid"))%></font></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>企业类型:</strong></td>
<td align="left" bgcolor="#F7F7F7">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from qylb where lbid = '"&request.Form("qylx")&"'",conn,1,1
if not rs.eof then
response.write " "&rs("cotype")
end if
%>
</td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>用户密码:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="pwd" type="password" class="input1" id="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_pwd" type="password" class="input1" id="re_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>企业名称:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="copname" type="text" class="input1" id="copname" size="32" maxlength="16">
<br>
<span class="f7">(最少2个汉字、最多16个汉字)</span>
</td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7"><strong>法人代表:</strong></td>
<td align="left" bgcolor="#F7F7F7"><input name="faren" type="text" class="input1" id="faren" size="20" maxlength="4">
<br>
<span class="f7">(最少2个汉字、最多4个汉字)</span>
</td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7">E-Mail地址:</td>
<td align="left" bgcolor="#F7F7F7"><input name="email" type="text" class="input1" id="email" size="20" style="ime-mode:disabled"></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#E7E7E7">联系电话:</td>
<td align="left" bgcolor="#F7F7F7"><input name="tel" type="text" class="input1" id="tel" style="ime-mode:disabled" onKeyUp="value=value.replace(/[^\d]/g,'') " size="20" maxlength="11" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
<br>
<span class="f7">(请填写区号,区号与电话号码之间不需要-等符号间隔)</span></td>
</tr>
<tr align="center">
<td height="50" colspan="2"><input name="Submit" type="submit" class="button9" value="确定注册">
<input name="userid" type="hidden" id="userid" value="<%=LCase(request.form("userid"))%>">
<input name="qylx" type="hidden" id="qylx" value="<%=request.form("qylx")%>"></td>
</tr>
</form>
</table>
<%end sub%>
<%
sub save_data()
if request.form("userid")="" then
response.write"<script language=javascript>alert('请填写要注册的用户账号');history.back();</Script>"
response.end
end if
if myobj.ChkNum(request.form("userid"))=false or myobj.ChkLen(request.form("userid"))<>15 then
response.write"<script language=javascript>alert('用户账号只能是15位数字形式的纳税人编码');history.back();</Script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from user where username = '"&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
if request.form("pwd")="" then
response.write"<script language=javascript>alert('用户密码必须填写');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("pwd"))<6 or myobj.ChkLen(request.form("pwd"))>20 then
response.write"<script language=javascript>alert('用户密码长度必须为6-20个字符');history.back();</Script>"
response.end
end if
if request.form("pwd")<>request.form("re_pwd") then
response.write"<script language=javascript>alert('两次输入的用户密码必须相同');history.back();</Script>"
response.end
end if
if request.form("pwd_qu")="" then
response.write"<script language=javascript>alert('密码提示问题必须填写');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("pwd_qu"))<8 or myobj.ChkLen(request.form("pwd_qu"))>50 then
response.write"<script language=javascript>alert('密码提示问题长度必须为8-50个字符(汉字占两个字符)');history.back();</Script>"
response.end
end if
if request.form("pwd_qu")=request.form("pwd") then
response.write"<script language=javascript>alert('密码提示问题不能与用户密码相同');history.back();</Script>"
response.end
end if
if request.form("pwd_an")="" then
response.write"<script language=javascript>alert('密码提示答案必须填写');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("pwd_an"))<8 or myobj.ChkLen(request.form("pwd_an"))>50 then
response.write"<script language=javascript>alert('密码提示答案长度必须为8-50个字符(汉字占两个字符)');history.back();</Script>"
response.end
end if
if request.form("pwd_an")=request.form("pwd_qu") then
response.write"<script language=javascript>alert('密码提示的答案不能与密码提示问题相同');history.back();</Script>"
response.end
end if
if request.form("pwd_an")=request.form("pwd") then
response.write"<script language=javascript>alert('密码提示答案不能与用户密码相同');history.back();</Script>"
response.end
end if
if request.form("copname")="" then
response.write"<script language=javascript>alert('企业名称必须填写');history.back();</Script>"
response.end
end if
if request.form("faren")="" then
response.write"<script language=javascript>alert('法人代表必须填写');history.back();</Script>"
response.end
end if
if myobj.chkcn(request.form("copname"))=false then
response.write"<script language=javascript>alert('企业名称只能填写汉字');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("copname"))<4 or myobj.ChkLen(request.form("copname"))>32 then
response.write"<script language=javascript>alert('企业名称不能少于2个汉字或多于16个汉字');history.back();</Script>"
response.end
end if
if myobj.chkcn(request.form("faren"))=false then
response.write"<script language=javascript>alert('法人代表只能填写汉字');history.back();</Script>"
response.end
end if
if myobj.ChkLen(request.form("faren"))<4 or myobj.ChkLen(request.form("faren"))>8 then
response.write"<script language=javascript>alert('法人代表不能少于2个汉字或多于4个汉字');history.back();</Script>"
response.end
end if
if request.form("email")<>"" then
if myobj.ChkLen(request.form("email"))>50 then
response.write"<script language=javascript>alert('电子邮件地址不能大于50个字符');history.back();</Script>"
response.end
end if
if myobj.ChkEmail(request.form("email"))=false then
response.write"<script language=javascript>alert('电子邮件地址格式错误');history.back();</Script>"
response.end
end if
end if
if request.form("tel")<>"" then
if myobj.ChkNum(request.form("tel"))=false then
response.write"<script language=javascript>alert('固定电话的只能填写0-9的数字');history.back();</Script>"
response.end
end if
' if left(request.form("tel"),1)<>0 then
' response.write"<script language=javascript>alert('固定电话的第一个数字只能是0');history.back();</Script>"
' response.end
' end if
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from user",conn,1,3
rs.addnew
rs("username")=LCase(request.form("userid"))
rs("password")=request.form("pwd")
rs("flag")=2
rs("lbid")=request.form("qylx")
rs("pwd_qu")=request.form("pwd_qu")
rs("pwd_an")=request.form("pwd_an")
rs("copname")=request.form("copname")
rs("faren")=request.form("faren")
if request.form("email")<>"" then
rs("email")=request.form("email")
end if
if request.form("tel")<>"" then
rs("tel")=request.form("tel")
end if
rs.update
rs.close
%>
<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> 注册成功!
<br><br><a href=index.asp>登陆网上办税系统</a>
</td>
</tr>
</table>
<%end sub%>
</td>
</tr>
<%foot()%>
</table>
</div>
</body>
</html>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -