📄 reg_student.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'=========================================================
' 学校机房作业管理系统 V 1.0 [创建于200812122100]
' 授权发布网站:清远ABC-http://www.qyabc.com/
' 客服QQ:418322257 E-Mail:qystu@163.com
' 注意:如想得到关于本程序免费的技术支持,
' 必须承诺使用一周后,用平邮回寄“相关文件”文件夹中的“学校机房作业管理系统调查反馈表”表格。
' 作者博客:http://www.qyabc.com/u/qin/Default.aspx
'=========================================================
%>
<!--#include file="inc/config.asp" -->
<!--#include file="Connections/master.asp" -->
<!--#Include file="inc/checksqlIn.Asp"-->
<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open MM_master_STRING
%>
<html>
<head>
<title>学生信息登记表-<%=WebName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function checkform(){
if(document.form1.studentnum.value=="")//判断是否为空
{
alert("胸卡编号是必须要写的!");
document.form1.studentnum.focus();
return false;
}
var strStudentNum
strStudentNum=document.form1.studentnum.value
if(strStudentNum.length<<% =StudentNumDigit %>)//判断字数是否够,注意应该在输入处限制输入的最大字数。
{
alert("胸卡编号应该是<% =StudentNumDigit %>位数!");
document.form1.studentnum.focus();
return false;
}
if(isNaN(strStudentNum))//判断是否由数字组成。
{
alert("胸卡编号应该是由数字组成的吧!");
document.form1.studentnum.focus();
return false;
}
var strstudentname
strstudentname=document.form1.studentname.value
if(strstudentname.length<2)//判断用户名有两个字符。
{
alert("请输入您的真实姓名!");
document.form1.studentname.focus();
return false;
}
if (document.form1.studentname.value.search(/[\u4E00-\u9FA5]/g)==-1)//判断用户名是否为中文。
{
alert("请输入您的真实姓名!");
document.form1.studentname.focus();
return false;
}
if(document.form1.password.value=="")//检查两次输入的密码是否相同。
{
alert("请输入密码!");
document.form1.password.focus();
return false;
}
if (document.form1.password.value != document.form1.confirmpwd.value)
{
alert("两次输入的密码不一样!");
document.form1.confirmpwd.focus();
return false;
}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+'?sec='+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<link rel="SHORTCUT ICON" href="favicon.ico"/>
<link href="<%= SysCss %>" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#F2FBF2" background="../images/head_bg.gif" onLoad="document.form1.studentnum.focus()">
<form action="reg_student_save.asp" method="post" name="form1" onSubmit="return checkform()">
<table width="606" border="1" align="center" cellpadding="5" cellspacing="1" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">
<tr bgcolor="#99CCFF">
<td height="25" align="right" bgcolor="#E0F870"><div align="center"><strong>学生信息登记表</strong></div></td>
<td height="25" align="right"><input type="button" name="Submit2" value="教师登记信息请点这" onClick="top.location='reg_teacher.asp';"></td>
</tr>
<tr>
<td height="25" align="right">所在专业:</td>
<td height="25"><select name="Specia" onChange="MM_jumpMenu('parent',this,0)">
<%
sql = "select DISTINCT Specia from class_list order by Specia asc"
set rs = conn.execute(sql)
if rs.eof or rs.bof then
response.write "<option>-----</option>"
else
while not(rs.eof or rs.bof)
response.write ("<option value='" & rs.Fields.Item("Specia").Value & "'")
if cstr(rs(0)) = request.querystring("sec") then
response.write "selected"
end if
response.write (">" & rs.Fields.Item("Specia").Value & "</option>")
rs.movenext
wend
rs.movefirst
end if
%>
</select></td>
</tr>
<tr>
<td height="25" align="right">所在班级:</td>
<td height="25">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="43%"><select name="MasterClass" id="MasterClass">
<%if rs.eof or rs.bof then
response.write ("<option>--------</option>")
else
if request.querystring("sec") = "" then
temp=rs(0)
else
temp = request.querystring("sec")
end if
subsql = "select MasterClass from class_list where Specia='"&temp&"' order by MasterClass asc"
set subrs = conn.execute(subsql)
if subrs.eof or subrs.bof then
response.write ("<option>-----</option>")
else
while not(subrs.eof or subrs.bof)
response.write ("<option value=" & subrs(0) & ">" & subrs(0) & "</option>")
subrs.movenext
wend
end if
end if
subrs.close
set subrs = nothing
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
</select> </td>
<td width="57%"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" align="right">胸卡编号:</td>
<td height="25"><input name="studentnum" type="text" maxlength="<% =StudentNumDigit %>" id="studentnum">
<font color="#FF0000">*</font> 例如:0205069999</td>
</tr>
<tr>
<td height="25" align="right">真实姓名:</td>
<td width="392" height="25"><input name="studentname" type="text" id="studentname" onKeyUp="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" maxlength="5">
<font color="#FF0000">*</font>
请输入您的中文姓名。</td>
</tr>
<tr>
<td height="25" align="right">性别:</td>
<td height="25"><select name="studentsex" id="studentsex">
<option value="男">男</option>
<option value="女">女</option>
</select></td>
</tr>
<tr>
<td height="25" align="right">进入密码:</td>
<td height="25"><input name="password" type="password" id="password"> <font color="#FF0000"> *</font>
密码主要是用于登录系统。</td>
</tr>
<tr>
<td height="25" align="right">密码确认:</td>
<td height="25"><input name="confirmpwd" type="password" id="confirmpwd">
<font color="#FF0000">*</font> 重复输入一次密码。</td>
</tr>
<tr>
<td height="25" align="right">电子邮箱:</td>
<td height="25"><input name="email" type="text" id="email"> <font color="#FF0000">
</font>如没电子邮箱的,可以不写。</td>
</tr>
<tr align="center">
<td height="25" colspan="2"><div align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left">
<input type="button" name="Submit2" value="返回主页" onClick="top.location='index.asp';">
</div></td>
<td><div align="right">
<input type="submit" Name="Submit" value="提交信息">
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<input name="regip" type="hidden" id="regip" value="<%=Request.ServerVariables("Remote_Addr")%>">
<input name="usersort" type="hidden" id="usersort" value="学生">
</form>
<!--#include file="inc/bot.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -