resultlist.asp
来自「《动态网页设计基础教程》,胡杰,科学出版社」· ASP 代码 · 共 162 行
ASP
162 行
<!-- #include file="adoconn.asp" -->
<html>
<head>
<link rel="stylesheet" href="comCSS.css" >
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>评分结果显示</title>
<base target="rbottom">
<meta name="Microsoft Border" content="t, default">
</head>
<body ><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<p align="left"> </p>
</td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><!--msnavigation--><td valign="top">
<%
Dim sql
Dim reccount
Dim fieldi,recordi
Dim t1,t2,t3,SubmitFlag
Certificate()
t1=request("D1") & "至" & request("D2")
t2=request("D3")
t3=request("D4")
SubmitFlag=Request.Form("R1")
If SubmitFlag=1 Then
IF t3 = "所有部门" THEN
sql="select * from TscoreView where YeartoYear='" & t1 & "' AND term='" & t2 & "'"
ELSE
sql="select * from TScoreView where YeartoYear='" & t1 & "' AND term='" & t2 & "' AND Tdepartment='" & t3 & "'"
END IF
SQL=SQL+ " ORDER BY tscore DESC"
ElseIf SubmitFlag=2 Then
IF t3 = "所有部门" THEN
sql="select * from SscoreView where YeartoYear='" & t1 & "' AND term='" & t2 & "'"
ELSE
sql="select * from SScoreView where YeartoYear='" & t1 & "' AND term='" & t2 & "' AND Tdepartment='" & t3 & "'"
END IF
SQL=SQL+ " ORDER BY Sscore DESC"
Else
IF t3 = "所有部门" THEN
sql="select TV.Tid,TV.Tname,TV.Tdepartment,TV.Tscore,SV.Sscore,TV.Tscore+SV.Sscore as sumscore from TscoreView TV,SscoreView SV "
sql=sql & "where TV.Tid=SV.Tid and TV.Yeartoyear=SV.Yeartoyear and TV.Term=SV.Term and "
sql=sql & "TV.YeartoYear='" & t1 & "' AND TV.term='" & t2 & "'"
ELSE
sql="select TV.Tid,TV.Tname,TV.Tdepartment,TV.Tscore,SV.Sscore,TV.Tscore+SV.Sscore as sumscore from TscoreView TV,SscoreView SV "
sql=sql & "where TV.Tid=SV.Tid and TV.Yeartoyear=SV.Yeartoyear and TV.Term=SV.Term and "
sql=sql & "TV.YeartoYear='" & t1 & "' AND TV.term='" & t2 & "' AND TV.Tdepartment='" & t3 & "'"
END IF
SQL=SQL+ " ORDER BY sumscore DESC"
End if
Set rs=GetRecordset(sql)
IF not rs.eof then
Reccount=rs.RecordCount
else
%>
<script language="vbscript">
MsgBox "没有评分记录!"
history.back
</script>
<%
END IF
%>
<form method="post">
<table border=0 cellspacing="0" width="588">
<tr>
<td width="584">
<p align="center"><font face="华文行楷" size="4" color="#FF0000"><b><%=(t1&"学年")%><%=("第"&t2&"学期")%><%=(t3)%> 教师评分统计表 </b></font> </p>
</td>
</table>
<div align="left">
<table border="1" width="593">
<tr bgcolor=#ccccc8>
<td width="37" align="center">
<font color="#FF0000">序号</font>
</td>
<td width="97" align="center">
<p align="center"><font color="#000080"><b> 教师编号</b></font>
</td>
<td width="64" align="center">
<p align="center"><font color="#000080"><b>姓名</b></font></p>
</td>
<td width="90" align="center">
<p align="center"><font color="#000080"><b>所在部门</b></font></p>
</td>
<%If submitflag=1 or submitflag=3 then %>
<td width="71" align="center">
<p align="center"><font color="#000080"><b>教师<br>
打分值</b></font></p>
</td>
<%end if%>
<%if submitflag=2 or submitflag=3 then %>
<td width="59" align="center"><font color="#000080"><b>学生<br>
打分值</b></font></td>
<%End if%>
<%if submitflag=3 then %>
<td width="59" align="center"><font color="#000080"><b>总评<br>
分值</b></font></td>
<%End if%>
</tr>
<%for recordi=1 to Reccount
if rs.Eof then Exit for
if recordi mod 2=0 then
color="#ddddd7"
else
color="#eeeeef"
end if
response.write ("<tr bgcolor=" + color +">")
%>
<td width="37" align="left"> <%=recordi%></td>
<td width="97" align="left"><%= rs(0) %></td>
<td width="64" align="left"><% =rs(1) %></td>
<td width="90" align="left"><% =rs(2) %></td>
<td width="71" align="left"><% =left(cstr(rs(3)),5) %></td>
<%If submitflag=3 then %>
<td width="59" align="left"><% =left(cstr(rs(4)),5) %></td>
<td width="59" align="left"><% =left(cstr(rs(5)),5) %></td>
<%end if%>
<%response.write ("</tr>")%>
<% rs.movenext%>
<%next%>
</table>
</div>
<%
Set rs=nothing
Set Adoconn=nothing
%>
[ 记录总数:<%=Reccount%>]
<p><a href="javascript:history.back(2)">返回</a>
</p>
</form>
<!--msnavigation--></td></tr><!--msnavigation--></table></body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?