📄 scoreinputstep2.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="CheckLogin.asp"-->
<!--#include file="Connections/StudentConn.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Dim strSheetName
strSheetName = Request("sheetName")
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_StudentConn_STRING
Recordset1.Source = "SELECT Top 1 * FROM " & strSheetName
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = Request("SheetName")
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_StudentConn_STRING
Recordset2.Source = "SELECT * FROM TestName WHERE SheetName = '" + Replace(Recordset2__MMColParam, "'", "''") + "'"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
<!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;
}
}
document.form1.action="ScoreInput"+document.form1.InputType.options.value+".asp";
return true;
}
</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="90%" border=0>
<tr>
<td valign=top height="278" width="120" align="center"> <b><font color="#0066cc"><br>
<br>
<font size="5">录<br>
入<br>
学<br>
生<br>
成<br>
绩</font></font></b></td>
<td>
<form Name="form1" onSubmit="return check()" action="ScoreInput1.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"> <%=(Recordset2.Fields.Item("TestName").Value)%> <input name="SheetName" type="hidden" id="SheetName" value="<% =strSheetName %>"></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"> <table border="0" cellspacing="5" cellpadding="0">
<tr>
<%
For i = 5 to Recordset1.Fields.Count - 1
Response.write "<td width='80'><input Name='chkbox' type='checkbox' value='" & Recordset1.Fields(i).Name & "'>" & Recordset1.Fields(i).Name & "</td>"
if (i+1-5)>0 and ((i+1-5) mod 5 =0) then response.write "</tr><tr>"
next
%>
</tr>
</table></td>
</tr>
<tr>
<td width="100" align="right">请选择录入方式:</td>
<td colspan="2"><select name="InputType" id="InputType">
<option value="1" selected>单条记录方式</option>
<option value="2">列表方式</option>
</select></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 + -