📄 scorequerystep2_2.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/StudentConn.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_StudentConn_STRING
Recordset1.Source = "SELECT * FROM TestName ORDER BY ID DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>学生成绩查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<link href="home.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function check()
{
var total=0;
var intmax=document.form1.chkbox.length;
if(intmax>1){
for(var idx=0;idx<intmax;idx++){
if(eval("document.form1.chkbox[" + idx + "].checked")==true){
total+=1;
}
}
if(total==0){
alert("您未选择任何考试!");
document.form1.chkbox[0].focus();
return false;
}
}
else{
if(document.form1.chkbox.checked==false){
alert("您未选择任何考试!");
document.form1.chkbox.focus();
return false;
}
}
}
</script>
</HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<!--#include file="Top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TR>
<TD vAlign=top width=46 background=images/p_left_2.gif></TD>
<TD width=20> </TD>
<TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<tr>
<td height=30 width="20%"><img src="images/friendsite.GIF" width="19" height="19">
<a href="ScoreInputStep1.asp">录入学生成绩</a></td>
<td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19">
<a href="ScoreQueryStep1.asp">查询学生成绩</a></td>
<td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19">
<a href="ScoreModifyDel.asp">修改/删除学生成绩</a></td>
<td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19">
<a href="ScoreOrder.asp">计算总分与排名</a></td>
<td height=30 width="20%"><img src="images/friendsite.gif" width="19" height="19"><a href="TargetManage.asp">目标分管理</a></td>
</tr>
</TABLE>
<table cellspacing=0 cellpadding=0 width="95%" border=0>
<tr>
<td valign=top height="278" width="100" align="center"> <b><font color="#0066cc"><br>
<br>
<font size="5">查<br>
询<br>
学<br>
生<br>
成<br>
绩</font></font></b></td>
<td width="504">
<form Name="form1" onSubmit="return check()" action="ScoreQuery1_2.asp" method="post">
<br>
<br>
第二步、请输入查询条件并选择科目:<br>
<br>
<table width="100%" border="1" align="center" cellpadding="5" cellspacing="1" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF" bgcolor="#E1FAFB">
<tr>
<td width="100" align="right">科目名称:</td>
<td colspan="2"><%=Request("Subject")%>
<input name="Subject" type="hidden" id="Subject" value="<% =Request("Subject")%>">
</td>
</tr>
<tr>
<td width="100">请输入查询条件:<br>
<br>
(可从学号或班级两种查询方法任选其一进行查询)</td>
<td nowrap>学号:
<input type="text" Name="StudentNum" maxlength="8" size="18">
<br> <br>
班级:
<select name="Grade"> <option value="0" selected>高一级</option> <option value="1">高二级</option> <option value="2">高三级</option> </select> <select Name="ClassSelect">
<option value="01">1班</option>
<option value="02">2班</option>
<option value="03">3班</option>
<option value="04">4班</option>
<option value="05">5班</option>
<option value="06">6班</option>
<option value="07">7班</option>
<option value="08">8班</option>
<option value="09">9班</option>
<option value="10">10班</option>
<option value="11">11班</option>
<option value="12">12班</option>
<option value="All" selected>全级</option>
</select> </td>
<td><b><font color="#0066cc">注:</font></b><br>
1 、若输入了学号,则优先按学号进行查询。 <br> <font color="#FF0000">2、支持模糊查询!</font><br>
例如:<br> 在学号查询框中输入2001,则查询结果为学号中包含“2001”的学生</td>
</tr>
<tr>
<td width="100" align="right">请选择要查询成绩的考试:</td>
<td colspan="2"> <%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
strSheetName=Recordset1.Fields.Item("SheetName").Value
Set rsTestName = Server.CreateObject("ADODB.Recordset")
rsTestName.ActiveConnection = MM_StudentConn_STRING
rsTestName.Source = "SELECT Top 1 * FROM " & strSheetName
rsTestName.CursorType = 0
rsTestName.CursorLocation = 2
rsTestName.LockType = 1
rsTestName.Open()
rsTestName_numRows = 0
ExistFlag=False
for k=0 to rsTestName.fields.count-1
if rsTestName.fields.item(k).name=CStr(Request("Subject")) then ExistFlag=True
next
if ExistFlag=True then
Response.Write "<input name='chkbox' type='checkbox' value='" & Recordset1.Fields.Item("SheetName").Value & "'>"
Response.Write Recordset1.Fields.Item("TestName").Value & "<br>"
end if
rsTestName.Close
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%> </td>
</tr>
<tr align="center">
<td height="43" colspan="3"><input type="submit" Name="Submit" value="下一步"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
<!--#include file="CopyRight.asp"-->
</BODY>
</HTML>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -