📄 reg.asp
字号:
<%@ Language=VBScript %>
<%Response.Buffer = True
Response.ExpiresAbsolute=now()-1
Response.Expires=0
Response.CacheControl="no-cache"
%>
<!--#include file="top.asp" -->
<!--#include file="gongneng.asp"-->
<!--#include file="user.asp"-->
<!--#include file="asptbfunction.asp"-->
<!--#include file="bottom.asp" -->
<table width="775" border="0" align="center" cellspacing="0" class="td4">
<tr>
<td><a href="./" target="_self"><font color="#FFFFFF">·首页</font></a>>>><font color="#FFFFFF">用户注册</font></td>
</tr>
</table>
<%
Response.Write "<table width=775 align=center border=0 align=center cellspacing=0><tr><td align=center>"
cc="select * from user"
set rs=server.createobject("adodb.recordset")
rs.open cc,conn,1,3
%><title>会员注册</title>
<%
us=request.form("us")
us=Replace(us,"'","")
pw=request.form("pw")
pw=Replace(pw,"'","")
pww=request.form("pww")
un=request.form("un")
un=Replace(un,"'","")
sb=request.form("sb")
sb=Replace(sb,"'","")
nl=request.form("nl")
nl=Replace(nl,"'","")
qq=request.form("qq")
qq=Replace(qq,",","")
if not IsNumeric(qq) then
qq=""
end if
ht=request.form("ht")
ht=Replace(ht,"'","")
em=request.form("em")
em=Replace(em,"'","")
jj=request.form("jj")
jj=Replace(jj,"'","")
mystring=cip
call mystr(mystring,allstr,leng)
youcipc=0
youcip=""
for i=0 to leng
if InStr(un,allstr(i))>0 then
youcipc=youipp+1
youcip=allstr(i)
end if
If i=leng Then Exit For
Next
if youcipc>0 then '词被屏蔽
Response.Write "注册失败,昵称不能用[<font color=#FF0000>"&youcip&"</font>]有疑问请与管理员联系"
else '词被屏蔽
if un ="" then '昵称是否为空
%>
<div align="center"><strong><font color="#FF0000">带有*号不能为空</font></strong> </div>
<%
else '是否重复昵称
ccu="select * from user where bm='"&un&"'"
set rsu=server.createobject("adodb.recordset")
rsu.open ccu,conn,1,1
if not rsu.eof then
%>
<div align="center"><font color="#FF0000"><strong>昵称重复,请用另外一个昵称</strong></font>
</div>
<% else
if pw="" or pw<>pww then '密码是否为空
%>
<div align="center"><strong><font color="#FF0000">密码不能为空或者两次输入不一样</font></strong> </div>
<%
else '密码是否为空
if len(us)<4 or len(us)>10then '测试用户名为空或重复
%>
<div align="center"><strong><font color="#FF0000">用户名4-10个字</font></strong> </div>
<%else
ccu="select * from user where user='"&us&"'"
set rsu=server.createobject("adodb.recordset")
rsu.open ccu,conn,1,1
if not rsu.eof then
%>
<div align="center"><font color="#FF0000"><strong>用户名重复,请用另外一个用户名</strong></font>
</div>
<%
else
rs.AddNew
rs("user") = us
rs("pwl") = pw
rs("time") = now()
rs("bm")= un
rs("email") = em
rs("xingbie") = sb
rs("age") = nl
rs("geren") = jj
rs("qq") = qq
rs("home") = ht
rs("IP") = userip
rs("jibie")= 1
rs.Update
didy=rs("idy")
conn.Execute("update online set hdtime=now(),bm='"&un&"',online=1,idy='"&didy&"' where id="&id)
conn.Execute("update user set dltime=now() where idy="&didy&"")
session("idy")=didy
response.redirect "javascript:history.back()"
end if '是否重名
end if'名是否为空
end if'密码是否为空
end if'昵称重复
end if'昵称为空
end if '词被屏蔽
%>
<div align="center">
<form name="form1" method="post" action="reg.asp">
<table width="400" border="0" cellspacing="0" bgcolor="#FFFFCC" class="td1">
<tr>
<td>用户名:</td>
<td>
<input type="text" name="us">
<font color="#FF0000">*</font> </td>
<td width="20"> </td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="pw">
<font color="#FF0000">*</font></td>
<td>数字或字母组合</td>
</tr>
<tr>
<td>再输密码:</td>
<td><input type="password" name="pww">
<font color="#FF0000">*</font></td>
<td> </td>
</tr>
<tr>
<td>昵称:</td>
<td><input type="text" name="un">
<font color="#FF0000">*</font></td>
<td> </td>
</tr>
<tr>
<td>性别:</td>
<td><select name="sb" size="1">
<option value="男" selected>男</option>
<option value="女">女</option>
</select></td>
<td> </td>
</tr>
<tr>
<td>年龄:</td>
<td><input name="nl" type="text" size="3"></td>
<td> </td>
</tr>
<tr>
<td>QQ:</td>
<td><input type="text" name="qq"></td>
<td> </td>
</tr>
<tr>
<td>个人主页:</td>
<td><input type="text" name="ht"></td>
<td> </td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="em"></td>
<td> </td>
</tr>
<tr>
<td>个人简介:</td>
<td><textarea name="jj" rows="3"></textarea></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form></div>
<%
Response.Write "</td></tr><tr><td width=1> </td></tr></table>"
Response.Write"<table width=775 border=0 align=center cellspacing=0 class=td3><tr> <td> </td></tr></table>"
Response.Write""&asptbcopy&""
Response.Flush
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -