📄 reg1.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="email.asp"-->
<!--#include file="top.asp"-->
<table width="100%" class="szy" bgcolor=#ffffff>
<tr>
<td align="left" width="100%">  <img src="image/register1.gif" border="0"><br>
<font color=red>注</font>:带!!为必填项</td>
</tr>
</table>
<%if trim(request("mode"))="reg" or trim(request("mode"))="" then %>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function reset()
{
document.form1.user.value="";
document.form1.realname.value="";
document.form1.password.value="";
document.form1.password2.value="";
document.form1.sex.value="1";
document.form1.byear.value="1975";
document.form1.bmonth.value="01";
document.form1.bday.value="01";
document.form1.question.value="";
document.form1.answer.value="";
document.form1.address.value="";
document.form1.telephone.value="";
document.form1.mobile.value="";
document.form1.bp.value="";
document.form1.qq.value="";
document.form1.workshop.value="";
document.form1.homeaddr.value="";
document.form1.email.value="";
document.form1.addinfo.value="";
}
//-->
</SCRIPT>
<table width="100%" border="0" cellspacing="2" cellpadding="2" class=xzy bgcolor="#ffffff">
<form name="form1" method="post" action="reg.asp?mode=submit" onsubmit="return check()">
<tr>
<td width="130" align="right">用户名:</td>
<td width="370">
<input type="text" name="user" onmouseover="window.document.form1.user.select();"> !!(请写英文)
</td>
</tr> <tr>
<td width="130" align="right">真实姓名:<br>
</td>
<td height="15" width="370">
<input type="text" name="realname" onmouseover="window.document.form1.realname.select();">
!!(请填写中文)</td>
</tr>
<tr>
<td width="130" align="right">个人密码:</td>
<td width="370">
<input type="password" name="password" onmouseover="window.document.form1.password.select();">
!!(多于5位,少于15位)</td>
</tr>
<tr>
<td width="130" align="right">重复密码:</td>
<td width="370">
<input type="password" name="password2" onmouseover="window.document.form1.password2.select();">
!!</td>
</tr>
<tr>
<td width="130" align=right>
头像:</td>
<td width="370">
<select name=face size=1 onChange="document.images['face'].src=options[selectedIndex].value;" style="BACKGROUND-COLOR: #99CCFF; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000">
<% for i=1 to 137
response.write"<option value='face/"&i&".gif'>头像"&i&"</option>"
next
%>
</select><img id=face src="face/1.gif" alt=个人形象代表>**</td>
</tr>
<tr>
<td width="130" align="right">性别:</td>
<td width="370"> <select name="sex" size="1" style="font-size: 9pt">
<option value="1">男</option>
<option value="2">女</option>
</select>
</td>
</tr>
<tr>
<td width="130" align="right">您的生日:</td>
<td width="370">
<select name="byear" size="1" style="font-size: 9pt">
<option value="1975">1975</option>
<option value="1976">1976</option>
<option value="1977">1977</option>
<option value="1978">1978</option>
<option value="1979">1979</option>
<option value="1980">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option></select>
年
<select name="bmonth" size="1" style="font-size: 9pt">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option></select>
月
<select name="bday" size="1" style="font-size: 9pt">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
日 </td>
</tr>
<tr>
<td width="130" align="right">密码丢失提示问题:</td>
<td width="370">
<input type="text" name="question" onmouseover="window.document.form1.question.select();">
(例如您的身份证号码?)</td>
</tr>
<tr>
<td width="130" align="right">提示答案:</td>
<td width="370">
<input type="text" name="answer" onmouseover="window.document.form1.answer.select();">
</td>
</tr>
<tr>
<td width="130" align="right">通信地址(邮编):</td>
<td width="370">
<input type="text" name="address" size="40" value="不告诉你" onmouseover="window.document.form1.address.select();">
</td>
</tr>
<tr>
<td width="130" align="right">固定电话:</td>
<td width="370">
<input type="text" name="telephone" onmouseover="window.document.form1.telephone.select();">
</td>
</tr>
<tr>
<td width="130" align="right">移动电话:</td>
<td width="370">
<input type="text" name="mobile" value="无" onmouseover="window.document.form1.mobile.select();">
</td>
</tr>
<tr>
<td width="130" align="right">传呼:</td>
<td width="370">
<input type="text" name="bp" value="无" onmouseover="window.document.form1.bp.select();">
</td>
</tr>
<tr>
<td width="130" align="right">OICQ/ICQ 号码:</td>
<td width="370">
<input type="text" name="qq" value="无" onmouseover="window.document.form1.qq.select();">
</td>
</tr>
<tr>
<td width="130" align="right">工作单位:</td>
<td width="370">
<input type="text" name="workshop" size="40" value="无" onmouseover="window.document.form1.workshop.select();">
</td>
</tr>
<tr>
<td width="130" align="right">家庭居住地址:</td>
<td width="370">
<input type="text" name="homeaddr" value="无" onmouseover="window.document.form1.homeaddr.select();">
</td>
</tr>
<tr>
<td width="130" align="right">电子邮件地址:</td>
<td width="370">
<input type="text" name="email" onmouseover="window.document.form1.email.select();">
!! <input type="hidden" name="logincount" value="0"></td>
</tr>
<tr>
<td width="130" align="right">附加信息:</td>
<td width="370">
<textarea name="addinfo" rows="5" cols="35" onmouseover="window.document.form1.addinfo.select();">无</textarea>
</td>
</tr>
<tr>
<td width="130" align="right"> </td>
<td width="370" height="50" valign="bottom">
<input type="image" src="image/1-sub.gif">  
<a href="javascript:reset()"><img border="0" src="image/1-reset.gif" width="44" height="23"></a>   </td>
</tr>
</form>
</table>
<br>
<br>
<br>
<br>
</td>
</tr>
</table>
<%end if%>
<%if request("mode")="submit" then %>
<table width="100%" border="0" cellspacing="2" cellpadding="2" class=xzy bgcolor="#ffffff">
<tr><td align=center><br><br><br><br><br><br><br>
<%if trim(request.form("user"))="" then%>
对不起,<font color=red>用户名为空!</font>
请返回重写
<%elseif trim(request.form("realname"))="" then%>
对不起,<font color=red>真实姓名为空!</font>请返回重写
<%elseif trim(request.form("password"))="" then%>
对不起,<font color=red>密码为空!</font>
请返回重写
<%elseif len(trim(request.form("password")))>20 or len(trim(request.form("password")))<5 then%>
对不起,<font color=red>密码长度不对!</font>
请返回重写
<%elseif trim(request.form("password2"))="" then%>
对不起,<font color=red>确认密码为空!</font>
请返回重写
<%elseif trim(request.form("email"))="" then %>
对不起,<font color=red>email</font>
请返回重写
<%elseif trim(request.form("password"))<>trim(request.form("password2")) then %>
对不起,<font color=red>密码与确定密码不一样</font>
请返回重写
<%elseif Isemail(trim(request.form("email")))=false then %>
对不起,<font color=red>email格式不对</font>
请返回重写
<%else%>
<% if isemail(trim(request.form("email")))<>false then%>
<%set rs=server.createobject("adodb.recordset")
user=request("user")
sql="select * from user where user='"&user&"'"
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then%>
对不起,您输入的用户名已经被注册,请重新输入
<% else
'加密密码开始
function encrypt(preString)
Dim texts
Dim seed
Dim i,length
prestring = trim(preString)
length = len(preString)
seed = length
Randomize(length)
texts = ""
for i = 1 to length
seed = int(94*rnd(-asc(mid(preString,i,1))-seed*asc(right(prestring,1)))+32)
texts = texts & chr(seed) & chr(int(94*rnd(-seed)+32))
next
dim dist
dist=""
for i = 1 to len(texts)
if mid(texts,i,1)<>"'" then
dist=dist+mid(texts,i,1)
end if
next
encrypt = dist
end function
'加密结束
password=encrypt(request("password"))
conn.execute "insert into user (user,realname,password,sex,byear,bmonth,bday,question,answer,address,"_
&"telephone,mobile,bp,qq,workshop,homeaddr,email,logincount,userimage,addinfo) values("_
&"'"&request.form("user")&"',"_
&"'"&request.form("realname")&"',"_
&"'"&password&"',"_
&"'"&request.form("sex")&"',"_
&"'"&request.form("byear")&"',"_
&"'"&request.form("bmonth")&"',"_
&"'"&request.form("bday")&"',"_
&"'"&request.form("question")&"',"_
&"'"&request.form("answer")&"',"_
&"'"&request.form("address")&"',"_
&"'"&request.form("telephone")&"',"_
&"'"&request.form("mobile")&"',"_
&"'"&request.form("bp")&"',"_
&"'"&request.form("qq")&"',"_
&"'"&request.form("workshop")&"',"_
&"'"&request.form("homeaddr")&"',"_
&"'"&request.form("email")&"',"_
&"'"&request.form("logincount")&"',"_
&"'"&request.form("face")&"',"_
&"'"&request.form("addinfo")&"')"
conn.close
set conn=nothing
%>
恭喜,<%=request("user")%>,你已经注册成功!
<%
topic="您在"&sysName&"注册的个人资料"
mailbody=mailbody &"<style>A:visited { TEXT-DECORATION: none }"
mailbody=mailbody &"A:active { TEXT-DECORATION: none }"
mailbody=mailbody &"A:hover { TEXT-DECORATION: underline overline }"
mailbody=mailbody &"A:link { text-decoration: none;}"
mailbody=mailbody &"A:visited { text-decoration: none;}"
mailbody=mailbody &"A:active { TEXT-DECORATION: none;}"
mailbody=mailbody &"A:hover { TEXT-DECORATION: underline overline}"
mailbody=mailbody &"BODY { FONT-FAMILY: 宋体; FONT-SIZE: 9pt;}"
mailbody=mailbody &"TD { FONT-FAMILY: 宋体; FONT-SIZE: 9pt }</style>"
mailbody=mailbody &"<TABLE border=0 width='95%' align=center><TBODY><TR><TD>"
mailbody=mailbody &""&trim(request("user"))&",您好:<br><br>"
mailbody=mailbody &"欢迎您注册本系统,我们将提供给您最好的服务!<br>"
mailbody=mailbody &"下面是您的注册信息:<br>"
mailbody=mailbody &"注册名:"&trim(request("user"))&"<br>"
mailbody=mailbody &"密 码:"&trim(request("password"))&"<br>"
mailbody=mailbody &"<br><br>"
mailbody=mailbody &"<center><font color=red>再次感谢您注册本系统,让我们一起来建设这个网上家园!</font>"
mailbody=mailbody &"<br><br><br>"
mailbody=mailbody &"<tr align=right><td><font size=3.5pt> "&now()&"</font></td></tr>"
mailbody=mailbody &"<br><br><br><br><br>"
mailbody=mailbody &"***********************************************************************************************"
mailbody=mailbody &"</TD></TR></TBODY></TABLE>"
on error resume next
%>
<%if EmailFlag=0 then%><center>欢迎使用本系统,有任何问题,请与网管人心(<%=systememail%>)(QQ:5241279)联系!
<%elseif EmailFlag=1 then
Response.Write "<center> 一封注册信已经发送到你您注册时填写的信箱"
email =request("email")
call Jmail(email)
%>
<%elseif EmailFlag=2 then
Response.Write "<center> 一封注册信已经发送到你您注册时填写的信箱!"
email =request("email")
call Cdonts(email)
%>
<%elseif EmailFlag=3 then
Response.Write "<center> 一封注册信已经发送到你您注册时填写的信箱"
email =request("email")
call Aspemail(email)
end if
%><br><br>请返回  <a href="index.asp">主页</a>  登陆
<% end if%>
<%end if%><br><br><br><br><br>
</td></tr></table>
<%end if%>
<%end if%>
<!--#include file="end.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -