📄 user_reg.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
b1=request("b1")
if b1="" then
%>
<HTML><HEAD><TITLE>汕头育新学校 - 注册页面</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="images/style.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.pinkstar {
COLOR: #ed5460
}
<STYLE type=text/css>BODY {
FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
INPUT {
FONT-SIZE: 12px; COLOR: #000080
}
SELECT {
FONT-SIZE: 12px; COLOR: #000080
}
TH {
FONT-SIZE: 12px; COLOR: #000080
}
TD {
FONT-SIZE: 12px; COLOR: #000080; LINE-HEIGHT: 12pt
}
A:link {
FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:visited {
FONT-SIZE: 12px; COLOR: #0000e0; TEXT-DECORATION: none
}
A:active {
FONT-SIZE: 12px; COLOR: #0000ff; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 12px; COLOR: #ff0000; TEXT-DECORATION: underline
}
</STYLE>
<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY>
<!--#include file="up.inc"-->
<TABLE height=20 cellSpacing=0 cellPadding=0 width=750 bgColor=#4f8fcb border=0 align=center>
<TBODY>
<TR>
<TD align=middle>
<TABLE border=0>
<TBODY>
<TR>
<TD align=middle width=120><FONT
color=#fffff>系统首页</FONT></TD>
<TD align=middle width=120><FONT
color=#fffff>修改资料</FONT></TD>
<TD align=middle width=120><FONT
color=#fffff>学籍管理</FONT></TD>
<TD align=middle width=120><FONT
color=#fffff>成绩查询</FONT></TD>
<TD align=middle width=120><FONT
color=#fffff>网上留言</FONT></TD>
<TD align=middle width=120><A
href="logout.asp"><FONT
color=#fffff>退出登陆</FONT></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<DIV align=center>
<P><FONT style="FONT-SIZE: 13pt">欢迎访问汕头育新学校成绩管理系统</P>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center>
<TBODY>
<TR class=h4_center>
<TD align=middle bgColor=#d2e7f4 height=30>尊敬的用户,您好!</TD></TR>
<TR>
<TD height=10></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top width=200>
<DIV align=center><IFRAME id=hotarea border=0
marginWidth=0 frameSpacing=0 marginHeight=0
src="hotsite.htm" frameBorder=0 width=200 scrolling=no
height=250></IFRAME>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=15></TD></TR></TBODY></TABLE></DIV></TD>
<TD width=20> </TD>
<TD vAlign=top width=530>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=tdTit_p>汕头育新学校新用户注册</TD></TR>
<TR>
<TD class=tdBor_p>
<DIV align=center>
<TABLE cellSpacing=4 cellPadding=0 width=521 align=center bgColor=#fff7f7
border=0><form action="user_reg.asp" method="POST">
<TBODY>
<TR>
<TD width=521>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width=400 border=0>
<TBODY>
<TR bgColor=#ffe8e8>
<TD class=p14 colSpan=4 height=23>
<DIV align=center><STRONG>用户信息</STRONG></DIV></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 用户类别</TD>
<TD colSpan=3><input name="u_type" type="radio" value="0" checked> 学生 <input name="u_type" type="radio" value="2" > 教师 <SPAN
class=pinkstar>*(请选择用户类型,以后不能更改)</SPAN></TD></TR>
<TR>
<TD class=p12 vAlign=top width=60 height=23> 用 户 名</TD>
<TD colSpan=3><input type="hidden" name="u_no" value="0"><INPUT class=txBox_p id=u_name maxLength=30 size=24
name=u_name> <SPAN class=pinkstar>*</SPAN> <SPAN
class=gray_text>英文字母或数字,3~14位</SPAN></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 密 码</TD>
<TD colSpan=3><INPUT class=txBox_p id=u_password type=password
maxLength=30 size=24 name=u_password> <SPAN
class=pinkstar>*</SPAN> <SPAN
class=gray_text>6~14位</SPAN></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 确认密码</TD>
<TD colSpan=3><INPUT class=txBox_p id=reu_password type=password
maxLength=30 size=24 name=reu_password> <SPAN
class=pinkstar>*</SPAN> <SPAN
class=gray_text>再输入一遍密码</SPAN></TD></TR>
<TR>
<TD class=p12 vAlign=top height=23> 联系mail</TD>
<TD colSpan=3><INPUT class=txBox_p id=u_email
maxLength=30 size=24 name=u_email> <SPAN
class=pinkstar>*</SPAN> <SPAN
class=gray_text>6~20个位,用于取回密码</SPAN></TD></TR>
<TR>
<TD height=10></TD>
<TD colSpan=3></TD></TR>
<TR vAlign=top>
<TD colSpan=4 height=26>
<DIV align=center><INPUT class=Button_p type=submit type=submit value="注 册" name="B1">
<INPUT class=Button_p type=reset value="重 置"> <INPUT type=hidden
name=lm> </DIV></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></FORM></TABLE>
</DIV></TD></TR>
<TR>
<TD class=tdBott_p>对汕头育新学校有任何意见和问题,<a href="../note.asp">请给我们留言</a>。</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="down.inc"-->
</BODY></HTML>
<%elseif b1="注 册" then
Dim u_name,u_password,u_email,u_type,u_no,Ipaddr
u_name=Request.Form("u_name")
u_password=Request.Form("u_password")
u_email=Request.Form("u_email")
reu_password=Request.Form("reu_password")
u_type=Request.Form("u_type")
u_no=Request.Form("u_no")
Ipaddr=Request.ServerVariables("REMOTE_ADDR")
Dim Result
Result="错误:"
If u_name="" Then Response.write "<script>alert(""用户名没有填写!"");history.back();</script>"
If Len(u_name)>14 Then Result=Result&"用户名不能超过14位!"
If Len(u_name)<3 Then Result=Result&"用户名太短!"
If Checkid(u_name) ="Passed" Then Result=Result&"用户名存在!"
If u_password="" Then Response.write "<script>alert(""密码没有填写!"");history.back();</script>"
If Len(u_password)<6 Then Result=Result&"密码不能少于6位!"
If Len(u_password)>14 Then Result=Result&"密码不能超过14位!"
If reu_password="" Then Response.write "<script>alert(""确认密码没有填写!"");history.back();</script>"
If u_password<>reu_password Then Response.write "<script>alert(""两次输入的密码不一致!"");history.back();</script>"
If u_email="" Then Response.write "<script>alert(""电子邮件不能为空!"");history.back();</script>"
If Len(u_email)<6 Then Result=Result&"电子邮件地址不能少于6位!"
If Len(u_email)>28 Then Result=Result&"电子邮件不能超过28位!"
If Not IsValidEmail(u_email) Then Result=Result&"电子邮件有错!"
IF Result="错误:" Then
Dim sql
sql="insert into users(u_name,u_password,u_email,u_type,u_ip,u_now)"
sql=sql&" values('"&u_name&"','"&u_password&"','"&u_email&"','"&u_type&"','"&Ipaddr&"','"&Now&"')"
Conn.Execute sql
Session("u_name") = u_name
Session("u_password") = u_password
Session("u_type") = u_type
Session("u_no") = u_no
Session("u_id") = u_id
Response.write "<script>alert('注册成功!点确定返回登陆页面!');location.href('user_login.asp');</script>"
Else
Response.write "<script>alert("""&Result&""");history.back();</script>"
end if
conn.close
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -