all_1.asp
来自「managerc.zip」· ASP 代码 · 共 93 行
ASP
93 行
<!--#include file="conn.asp"-->
<%
if session("user")="" then
response.write "您无此权限"
response.end
end if
'------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------
%>
<%
dim testno,subject,user_class
testno=trim(request("testno"))
subject=trim(request("subject"))
user_class=trim(request("user_class"))
set rs=server.createobject("adodb.recordset")
if user_class="all" then
sql="select * from ach where testno='"&testno&"' and subject='"&subject&"'"
else
sql="select * from ach where user_class='"&user_class&"' and testno='"&testno&"' and subject='"&subject&"'"
end if
rs.open sql,conn,1,1
if not rs.eof then
levelz=rs.recordcount
else
response.write "暂无相关记录"
response.end
end if
rs.close
set rs1=server.createobject("adodb.recordset")
if user_class="all" then
sql1="select * from ach where ach>=60 and testno='"&testno&"' and subject='"&subject&"'"
else
sql1="select * from ach where user_class='"&user_class&"' and ach>=60 and testno='"&testno&"' and subject='"&subject&"'"
end if
rs1.open sql1,conn,1,1
if not rs1.eof then
level1=rs1.recordcount
else
level1=0
end if
rs1.close
level2=levelz-level1
level3=level1/levelz*100
%>
<html>
<head>
<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>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div align="center">
<center>
<table border="1" width="400" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td width="386" colspan="2">您所查的为:<%=testno%>的<%=subject%>科目<% if user_class="all" then%>全部班级<%else%><%=user_class%><%end if%>合格率情况</td>
</tr>
<tr>
<td width="117" align="right">考试总人数为:</td>
<td width="257"><%=levelz%></td>
</tr>
<tr>
<td width="117" align="right">及格人数为:</td>
<td width="257"><%=level1%></td>
</tr>
<tr>
<td width="117" align="right">不及格人数为:</td>
<td width="257"><%=level2%></td>
</tr>
<tr>
<td width="117" align="right">及格率为:</td>
<td width="257"><%=level3%>%</td>
</tr>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?