📄 reg.asp
字号:
<!-- #include file="conn.asp" -->
<!-- #include file= "function.asp" -->
<!-- #include file= "MD5.asp" -->
<html>
<head>
<link href=css.css rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>中国人民大学二手交易网-用户注册</title></head>
<%
action=request.QueryString("action")
if action="save" then
name=ReplaceBadChar(request("name"))
pass=ReplaceBadChar(request("pass"))
pass2=ReplaceBadChar(request("pass2"))
mail=request("mail")
qq=ReplaceBadChar(request("qq"))
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
set rs=server.createobject("adodb.recordset")
sql="select * from config"
rs.open sql,conn,1,1
allowip1=rs("webconfig_allowip1")
allowip2=rs("webconfig_allowip2")
rs.close
sql="select * from [user] where user_name='"&name&"'"
rs.open sql,conn,1,1
if checkip(userip,allowip1,allowip2)=false then
message="注册失败,只限制校内用户!"
elseif name="" or pass="" or pass2="" or mail="" then
message="注册失败,请您填写完整!"
elseif pass<>pass2 then
message="注册失败,两次密码不相同!"
elseif isvalidemail(trim(mail))=false then
message="注册失败,您的E-mail不合法!"
elseif not rs.eof then
message="注册失败,该帐号已经存在!请您选择其他账号!"
rs.close
else
sql="insert into [user](user_name,user_pass,user_mail,user_qq,user_ip,user_lastlogintime) values('"&name&"','"&Md5(pass2)&"','"&mail&"','"&qq&"','"&userip&"','"&now()&"') "
conn.execute(sql)
sql="update config set user_count=user_count+1"
conn.execute(sql)
session("user")=name
response.write "<script LANGUAGE='javascript'>alert('注册成功!');location.replace('index.asp');</script>"
end if
end if
%>
<body>
<div align="center">
<!-- #include file="head.asp" -->
<!-- #include file="menu.asp" -->
<table width="760" border="0" cellpadding="0" cellspacing="0" >
<!--DWLayoutTable-->
<tr>
<td width="183" height="39"> </td>
<td width="386" valign="top"><p> </p>
<p><font color="#FF0000"><%=message%></font></p>
</td>
<td width="191"> </td>
</tr>
<tr>
<td height="233"> </td>
<td valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#66CCFF">
<!--DWLayoutTable-->
<tr>
<td width="382" height="24" valign="middle" bgcolor="#00FFFF"> <div align="center">用户快速注册</div></td>
</tr>
<tr>
<td height="148" valign="top" bgcolor="#FFFFFF"><form method="post" action="reg.asp?action=save">
<table width="382" height="146" border="0">
<!--DWLayoutTable-->
<tr>
<td width="49" height="24" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="94"> 账号: </td>
<td width="60%"><input name="name" type="text" size="15" maxlength="16">
*账号长度<=16字符</td>
</tr>
<tr>
<td height="21" valign="top"><!--DWLayoutEmptyCell--> </td>
<td>密码: </td>
<td><input name="pass" type="password" size="15" maxlength="20">
*密码长度<=20字符</td>
</tr>
<tr>
<td height="26" valign="top"><!--DWLayoutEmptyCell--> </td>
<td>确认密码: </td>
<td><input name="pass2" type="password" size="15">
*</td>
</tr>
<tr>
<td height="18" valign="top"><!--DWLayoutEmptyCell--> </td>
<td>E-mail: </td>
<td><input type="text" name="mail">
*</td>
</tr>
<tr>
<td height="18" valign="top"><!--DWLayoutEmptyCell--> </td>
<td>QQ: </td>
<td><input name="qq" type="text" onkeyup="value=value.replace(/[^\d]/g,'') " size="15" maxlength="15"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></td>
</tr>
<tr>
<td height="25" valign="top"><!--DWLayoutEmptyCell--> </td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="28" valign="top" bgcolor="#00FFFF"><p>说明:<br>
1.本站暂时只对校内开放用户注册,带*为必填项<br>
2.账号和密码建议使用英文和数字或者中文,请勿使用非法字符<br>
3.由于本站完全非营利性质,请各位支持工作,不要随意注册<br>
4.注册实时通过,即可使用账号发布信息<br>
5.本站账号不活动时间超过2个月,系统自动将账号删除</p></td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td height="80"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<!-- #include file="foot.asp" -->
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -