📄 register.asp
字号:
<%
''''''''''''''''''''''''''''''''''''''''''''
'
' TXSite / 通用网站系统
'
' 版本 :v1.8.20
'
' 制作人 :milp(milp@21cn.com)
'
' 版权所有:源码之家(http://www.21tx.com)
'
' 主页地址:http://www.21tx.com
' http://www.bestnets.net
' http://www.soucn.com
'
' 技术支持:http://www.21tx.com/bbs
'
''''''''''''''''''''''''''''''''''''''''''''
'程序创建时间:14:09 2001-8-18
'程序完成时间:14:34 2001-8-18
'最后修改时间:14:34 2001-8-18
dim action
action=request("action")
const thisprog="register.asp"
%>
<!--#include file=base.asp-->
<!--#include file=char.asp-->
<%
if action="" then action="add"
if action="saveadd" then
Call saveuser
else
Call adduser
end if
%>
<!--#include file=end.asp-->
<%Sub adduser%>
<form method="post" action=<%=thisprog%>?action=saveadd>
<table width="80%" border="0" cellspacing="1" cellpadding="3" align=center bordercolor=#777777>
<tr bgcolor=#EEEEEE>
<td height="23" colspan="2" ><font color=#000000><b>新用户注册</b></font>(以下各空请不要超过30字符)</td>
</tr>
<tr>
<td width="41%" height="18">用户名</td>
<td width="59%" height="18">
<input type="text" name="name" size="20">
</td>
</tr>
<tr>
<td width="41%" height="18">密码</td>
<td width="59%" height="18">
<input type="password" name="password" size="20">
</td>
</tr>
<tr>
<td width="41%" height="18">确认密码</td>
<td width="59%" height="18">
<input type="password" name="repassword" size="20">
</td>
</tr>
<tr>
<td width="41%" height="18">邮件地址</td>
<td width="59%" height="18">
<input type="text" name="useremail" size="20">
</td>
</tr>
<tr bgcolor=#EEEEEE>
<td height="23" colspan="2" ><input type="submit" value="提 交"> <input type="reset" value="重 填"></td>
</tr>
</table>
</form>
<%End Sub
Sub saveuser()
name=trim(request("name"))
password=trim(request("password"))
repassword=trim(request("repassword"))
useremail=trim(request("useremail"))
if name="" then
OutMsg=OutMsg+"<br>"+"<li>请输入用户名。"
founderr=true
end if
if password="" then
OutMsg=OutMsg+"<br>"+"<li>请输入密码。"
founderr=true
end if
if repassword="" then
OutMsg=OutMsg+"<br>"+"<li>请输入确认密码。"
founderr=true
end if
if password<>repassword then
OutMsg=OutMsg+"<br>"+"<li>密码和确认密码不相同。"
founderr=true
end if
if not IsValidEmail(useremail) then
OutMsg=OutMsg+"<br>"+"<li>请输入一个合法的邮箱地址。"
founderr=true
end if
if len(name)>30 or len(password)>30 or len(useremail)>30 then
OutMsg=OutMsg+"<br>"+"<li>各空请不要超过30字符。"
founderr=true
end if
if founderr=true then Call PrintMsg(OutMsg)
rSub.Open "select * from admin where name='"&name&"'",conn
if not rSub.eof then Call PrintMsg("该用户名已经存在!")
rSub.close
rSub.open "select * from admin",conn,1,3
rSub.addnew
rSub("name")=name
rSub("password")=password
rSub("useremail")=useremail
rSub("adminflag")=4
rSub("isUse")=True
rSub("logins")=1
rSub.update
rSub.close
PrintMsg("注册成功,希望你多多为本站添加更新,<a href=default.asp>点击登录</a>")
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -