?? print_examscore.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>
<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>
【班 級】:
</td>
<td>
【課程名稱】:<%=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 + -