⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 print_examscore.asp

📁 学校在线考试系统
💻 ASP
字号:
<%
option explicit
Response.expires=-1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","no-store"
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>考生成绩管理</title>
<link href="admin.css" rel="stylesheet" type="text/css">
<style>
body {
	font-size:12px;
}
</style>
</head>



<body>
<table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
	<tr class="tdbg">
		<td>
			&nbsp;&nbsp;&nbsp;<a href="#" style="color:#00F;font-size:12px" onClick="window.print();">【打印本页】</a>
		</td>
	</tr>
</table>
<br>
<%
dim strKc
strKc = trim(Request.QueryString("strkc"))

if checkAdminLogin() = false then	'进行管理员登录验证
	response.redirect "admin_login.asp"
end if
if checkPurview(CONST_PURVIEW_PROJECT) = false then
	response.write "<center><font size=4>你没有进行此操作的权限,请与系统管理员联系!</font></center>"
	response.write "</body></html>"
	response.end
end if

dim rsScore,strSqlScore,intMaxPage,I,intMaxPerPage,intCurPage,intCurRec,intCourseID
%>




	<%
	intMaxPerPage = 18 '定义每页显示多少条题目
	if IsNumeric(Trim(request.querystring("page"))) = true then
		intCurPage = CLng(Trim(request.querystring("page")))
	else
		intCurPage = 1
	end if
	if IsNumeric(Trim(request.querystring("courseid"))) = true then
		intCourseID = CLng(Trim(request.querystring("courseid")))
	else
		intCourseID = 0
	end if

	set rsScore = server.createobject("ADODB.Recordset")
	strSqlScore = "select SC.*,S.studentname,S.username,C.coursename from student_score SC,student S,project P,course C where SC.studentid=S.studentid and  SC.prjid=P.prjid and P.courseid=C.courseid"
	
	if intCourseID > 0 then
		strSqlScore = strSqlScore & " and C.courseid=" & intCourseID
	end if
    if strKc <> "" then
		strSqlScore = strSqlScore & " and C.coursename=" & strKc
	end if

	strSqlScore = strSqlScore & " order by username desc"
	rsScore.open strSqlScore, G_CONN, 1, 1
	rsScore.pagesize = intMaxPerPage
	if intCurPage < 1 then
		intCurPage = 1
	elseif intCurPage > rsScore.pagecount then
		intCurPage = rsScore.pagecount
	end if
	intMaxPage = rsScore.pagecount
	if not rsScore.eof and not rsScore.bof then
		rsScore.absolutepage = intCurPage
	end if
	if rsScore.bof or rsScore.eof then
		response.write "<tr class='tdbg'><td colspan='9' align='center'>没有学生成绩</td></tr>"
	end if
	intCurRec = 1
%>
	
	<table width="90%" align="center" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
	<tr>
		<td>
			&nbsp;&nbsp;&nbsp;【班    级】:
		</td>
		<td>
			&nbsp;&nbsp;&nbsp;【课程名称】:<%=rsScore("coursename")%>
		</td>
	</tr>
</table>

<table width="90%" align="center" border="0" cellspacing="2" cellpadding="1">
	<tr class='tdbg'>
		<td width="10%" align="center"> <B>考生学号</B></td>	
		<td width="10%" align="center"> <B>考生姓名</B></td>	
		<td width="15%" align="center"> <B>单选题得分</B> </td>
		<td width="15%" align="center"> <B>多选题得分</B> </td>
		<td width="15%" align="center"> <B>是非题得分</B> </td>
		<td width="15%" align="center"> <B>主观题得分</B> </td>
		<td width="20%" align="center"><B> 成绩</B> </td>
	</tr>
	
	
	
<%	
	dim intTotalScore
	intTotalScore = 0
	while not rsScore.eof and intCurRec <= intMaxPerPage
		response.write "<tr class='tdbg'>"
		response.write "<td align='center'>" & rsScore("username") & "</td>"
		response.write "<td align='center'>" & rsScore("studentname") & "</td>"
		response.write "<td align='center'>" & rsScore("DanX_score") & "</td>"
		response.write "<td align='center'>" & rsScore("DuoX_score") & "</td>"
		response.write "<td align='center'>" & rsScore("SF_score") & "</td>"
		response.write "<td align='center'>" & rsScore("ZG_score") & "</td>"
		intTotalScore = rsScore("DanX_score") + rsScore("DuoX_score") + rsScore("SF_score") + rsScore("ZG_score")
		response.write "<td align='center'>" & intTotalScore
		response.write "</td></tr>"
		rsScore.movenext
		intCurRec = intCurRec + 1
	wend
	rsScore.close
	set rsScore = nothing
	call closeConn()
	%>
</table>
</body>
</html>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -