📄 scoreinput1.asp
字号:
}
</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>
<TBODY>
<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 width=120 valign=top><b><font color="#FF0000"><br>
<br>
<br>
<br>
考试名称:</font></b><br> <br> <%=(Recordset2.Fields.Item("TestName").Value)%><br> <font color="#FF0000"><b><br>
</b></font><font color="#FF0000"><b>查询条件:<br>
<br>
</b></font>
<%
if Request("StudentNum")<>"" then
response.write "学号中含有“" & strStudentNum & "”"
elseif strName<>"" then
response.write "姓名中含有“" & strName & "”"
else
if strClass<>"" then strClass=strClass & "班"
response.write "高" & strGrade+1 & "级" & strClass
end if
%>
</td>
<td align="center" valign="top">
<form Name="form1" action="<%=MM_editAction%>" method="POST">
<br>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tr>
<td align=center background="images/bt-001.gif" height=18><font color="#0066cc" size="5"><b>录入学生成绩<font size="3">(单条记录方式)</font></b></font></td>
</tr>
<tr>
<td bgcolor=#3399ff height=1></td>
</tr>
</table>
<table border="1" align="center" cellpadding="0" cellspacing=3 bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF" bgcolor="#E1FAFB">
<tr align="left">
<td height="44" colspan="4"> <table border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="left" rowspan="2"><b><font color="#FF0000">未录入成绩<br>
的学生名单</font></b> </td>
<td align="center">学号:
姓名: </td>
</tr>
<tr>
<td> <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %> <select Name="StudentNum" onChange="SetScore()">
<%
i = 0
While (NOT Recordset1.EOF)
Recordset5__MMColParam = CStr(Recordset1.Fields.Item("StudentNum").Value)
set Recordset5 = Server.CreateObject("ADODB.Recordset")
Recordset5.ActiveConnection = MM_StudentConn_STRING
Recordset5.Source = "SELECT StudentNum," & request("chkbox") & " FROM " & strSheetName & " WHERE StudentNum = '" + Replace(Recordset5__MMColParam, "'", "''") + "'"
Recordset5.CursorType = 0
Recordset5.CursorLocation = 2
Recordset5.LockType = 3
Recordset5.Open()
Recordset5_numRows = 0
if recordset5.bof or recordset5.eof then
i = i + 1
response.Write "<option value='" & Recordset1.Fields.Item("StudentNum").Value & "' selected>" & Recordset1.Fields.Item("StudentNum").Value & " " & Recordset1.Fields.Item("Name").Value & "</option>"
else
strTemp = CStr(Request("chkbox"))
InsertFlag=False
if instr(strTemp,",")>0 then
dim ArrSubject
ArrSubject = split(strTemp,",")
OptionValue=Recordset5.Fields.Item("StudentNum").Value
For j = LBound(ArrSubject) To UBound(ArrSubject)
if IsNull(Recordset5.Fields.Item(Trim(ArrSubject(j))).Value) or Recordset5.Fields.Item(Trim(ArrSubject(j))).Value=0 then
OptionValue=OptionValue & "," & Trim(ArrSubject(j)) & ".value=0"
InsertFlag=True
else
OptionValue=OptionValue & "," & Trim(ArrSubject(j)) & ".value=" & Recordset5.Fields.Item(Trim(ArrSubject(j))).Value
end if
next
if InsertFlag=True then
i = i + 1
response.Write "<option value='" & OptionValue & "' selected>" & Recordset1.Fields.Item("StudentNum").Value & " " & Recordset1.Fields.Item("Name").Value & "</option>"
end if
else
if IsNull(Recordset5.Fields.Item(strTemp).Value) or Recordset5.Fields.Item(strTemp).Value=0 then
i = i + 1
response.Write "<option value='" & Recordset1.Fields.Item("StudentNum").Value & "," & strTemp & ".value=0' selected>" & Recordset1.Fields.Item("StudentNum").Value & " " & Recordset1.Fields.Item("Name").Value & "</option>"
end if
end if
end if
Recordset5.Close()
Recordset1.MoveNext()
Wend
if i = 0 then
response.Write "<option value=''>全部成绩都已经录入</option>"
end if
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
</select> <% else %>
找不到学生,请先在学生信息管理中录入相应的学生信息!
<% end if %>
</td>
</tr>
</table></td>
</tr>
<% if i>0 then %>
<tr align="center">
<td width='60' height="30"><b>科目</b></td>
<td width="100" height="30" align="center" valign='middle'><b>成绩</b></td>
<td width='60' height="30" align="center" valign='middle'><b>科目</b></td>
<td width="100" height="30" align="center" valign='middle'><b>成绩</b></td>
</tr>
<tr valign='middle'>
<%
intRows=0
strTemp = Request("chkbox")
if instr(strTemp,",")>0 then
ArrSubject = split(strTemp,",")
For i = LBound(ArrSubject) To UBound(ArrSubject)
response.write "<td width='60' height='25' align=right>" & Trim(ArrSubject(i)) & ":</td>"
response.write "<td height='25' align=left valign='middle'><input type='text' maxlength=4 size=10 Name='" & Trim(ArrSubject(i)) & "'></td>"
intRows=intRows+1
if intRows Mod 2 = 0 then
response.write "</tr>"
response.write "<tr valign='middle'>"
end if
next
else
response.write "<td width='60' height='25' align=right>" & strTemp & ":</td>"
response.write "<td height='25' align=left valign='middle'> <input type='text' maxlength=4 size=10 Name='" & strTemp & "'></td>"
end if
%>
</tr>
<% end if %>
</table>
<br>
<% if i>0 then
strSubject = replace(replace(Request("chkbox"),",","|value|") & "|value"," ","")
%>
<input type="hidden" Name="EditType" value="Update">
<input type="hidden" Name="Subject" value="<% =strSubject %>">
<input type="submit" Name="Submit2" value="保存当前学生成绩并录入下一个学生的成绩">
</form>
<script language="JavaScript" type="text/JavaScript">
SetScore()
</script>
<% end if %>
</td>
</tr>
</table>
<b><font color="#FF0000">已经录入成绩的学生:</font></b>
<% If Not Recordset3.EOF Or Not Recordset3.BOF Then %>
<table cellspacing=0 width="100%" border=1 cellpadding="0" bordercolor="#FFCC00">
<tr align="center" valign="middle" bordercolor="#FFCC00">
<td height="28"><font color="#000000">学 号</font></td>
<td height="28"><font color="#000000">姓 名</font></td>
<%
for i=5 to Recordset3.Fields.Count-1
Response.Write "<td height='28'><font color='#000000'>" & Recordset3.Fields.Item(i).Name & "</font></td>"
next
%>
<td height="28"><font color="#000000">操作</font></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset3.EOF))
%>
<%
Recordset4__MMColParam = CStr(Recordset3.Fields.Item("StudentNum").Value)
set Recordset4 = Server.CreateObject("ADODB.Recordset")
Recordset4.ActiveConnection = MM_StudentConn_STRING
Recordset4.Source = "SELECT StudentNum, Name FROM StudentInfo WHERE StudentNum = '" + Replace(Recordset4__MMColParam, "'", "''") + "'"
Recordset4.CursorType = 0
Recordset4.CursorLocation = 2
Recordset4.LockType = 3
Recordset4.Open()
Recordset4_numRows = 0
if not recordset4.bof or not recordset4.eof then
strName=cstr(Recordset4.Fields.Item("Name").Value)
if strName="" then strName=" "
else
strName=" "
end if
%>
<tr align="center" valign="middle">
<td height="20"><%=(Recordset3.Fields.Item("StudentNum").Value)%></td>
<td height="20"><%=strName%></td>
<%
for i=5 to Recordset3.Fields.Count-1
tmpScore=Recordset3.Fields.Item(i).Value
if IsNull(tmpScore) then tmpScore=" "
Response.Write "<td height='20'>" & tmpScore & "</td>"
next
%>
<td height="20"><A HREF="ScoreModify.asp?sheetName=<%=strSheetName%>&StudentNum=<%=(Recordset3.Fields.Item("StudentNum").Value)%>">修改</A>
<A HREF="ScoreDel.asp?sheetName=<%=strSheetName%>&StudentNum=<%=(Recordset3.Fields.Item("StudentNum").Value)%>">删除</A></td>
</tr>
<%
Recordset4.Close()
%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset3.MoveNext()
Wend
%>
<tbody>
</tbody>
</table>
<br>
<% else %>
<br>
<br>
<br>
还没有录入任何学生的成绩!<br>
<br>
<br>
<% end if %>
</TD>
</TR>
</TBODY>
</TABLE>
<!--#include file="CopyRight.asp"-->
</BODY>
</HTML>
<%
Recordset1.Close()
%>
<%
Recordset2.Close()
%>
<%
Recordset3.Close()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -