📄 queselect.asp
字号:
<!-- #include file="conn/conn.asp" -->
<%
'取用户名
id=request.cookies("username")
set rs=server.createobject("adodb.recordset")
sql="select * from student where id='"&trim(id)&"'"
rs.open sql,conn,1,1
sname=trim(rs("name"))
rs.close
set rs=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>红豆在线考试系统 - 试卷选择</title>
<style type="text/css">
<!--
body {
background-color: #0099FF;
}
-->
</style></head>
<body>
<p><H1 align="center">试卷选择</H1></p>
<form method="POST" name="f_sel" action="">
<table align="center" width="80%">
<tr><td><p>您的姓名:
<%=sname%>
</p></td>
<td align="right"><input type="button" name="chang" value="个人信息及成绩查询" onclick="window.open('student.asp');return false;"></td></tr>
<tr><td> <p> </p></td></tr>
<tr><td>
<p>选择专业:
<%set rstype=createobject("adodb.recordset")
sql="select * from profession order by id"
rstype.Open sql,conn,1,1%>
<select name="pro">
<option value="">请选择</option>
<%do while not rstype.EOF%>
<option value="<%=rstype("name")%>"><%=rstype("name")%></option>
<%
rstype.MoveNext
loop
set rstype=nothing
%>
</select>
<input name="ok" type="submit" value="确定"></p>
</td></tr>
</table>
</form>
<%
pname=trim(request.form("pro"))
if pname="" then
%><font color="#993300"> <%response.write "请先选择试卷所属专业"%></font><%
else
set rsexam=createobject("adodb.recordset")
sql="select * from exam where pname='"&pname&"' and fabu=1 order by ename"
rsexam.Open sql,conn,1,1
%>
<table align="center" width="80%" border="1">
<tr>
<td colspan="7"><p align="center"><b><font size=+2 color="#0000FF"><%response.write examname%></font></b></p></td>
</tr>
<tr>
<td width="25%">课程</td>
<td width="10%">试题编号</td>
<td width="35%">试题名称</td>
<td width="10%">加入时间</td>
<td width="10%">出题者</td>
<td width="5%">发布</td>
<td width="5%">进入</td>
</tr>
<tr>
<%
do while not rsexam.EOF
'以下动态显示试卷
%>
<td><%=trim(rsexam("ename"))%></td>
<td><%=trim(rsexam("eid"))%></td>
<td><%=trim(rsexam("text"))%></td>
<td><%=trim(rsexam("addtime"))%></td>
<td><%=trim(rsexam("adduser"))%></td>
<td><%=trim(rsexam("fabu"))%></td>
<td>
<input type="button" name="Submit4" value="考试" onclick="window.open('examstart.asp?ename=<%=trim(rsexam("ename"))%>&eid=<%=trim(rsexam("eid"))%>&text=<%=trim(rsexam("text"))%>','intr','menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=1,resizable=0,width=900,height=680,top=0,left=50');return false;">
</td>
</tr>
<%
rsexam.MoveNext
loop
set rsexam=nothing
end if
%>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -