📄 selectchapter.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("username")="" then
response.redirect "relogin.asp"
end if
username=request.cookies("username")
kcid=request("kcid")
sql1="SELECT * FROM tbistest where username='"&username&"' and kcid="&kcid
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2
sqlkc="SELECT * FROM tbkc where kcid="&kcid
set rskc=server.createobject("adodb.recordset")
rskc.open sqlkc,conn,3,2
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>模拟练习 <%if not rs1.eof then %>| <%=rskc("kcm")%><%end if%></title>
<link rel="stylesheet" type="text/css" href="css.css">
<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm; for(var n=2; n<args.length; n+=2) {
elm=FP_getObjectByID(args[n]); if(elm) { if(!doc.$imgSwaps)doc.$imgSwaps=new Array();
doc.$imgSwaps[doc.$imgSwaps.length]=elm; elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
// -->
</script>
</head>
<body onload="FP_preloadImgs(/*url*/'images/button9.jpg', /*url*/'images/buttonA.jpg')">
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="100%" height="30" style="border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; border-top-style: solid; border-top-width: 0; border-bottom: 1px solid #000000">
<img border="0" src="images/xzkm.gif"></td>
</tr>
</table>
<%
if rs1.eof then
%><table border="0" cellspacing="0" bordercolor="#111111" width="480" height="35">
<tr>
<td width="100%" height="33">
<p align="center"> 现在您还没有需要参加考试的科目! </td>
</tr>
</table>
<%
else
i=1
%><br>
<center>
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#799AE1" id="AutoNumber2" width="480" >
<tr class="trh">
<td height="25" width="34" bgcolor="#799AE1"></td>
<td bgcolor="#799AE1" width="256" height="25">
<p align="center"><font color="#FFFFFF"><b><%=rskc("kcm")%>--模拟练习</b></font></td>
<td bgcolor="#799AE1" width="182" height="25">
<p align="center"><font color="#FFFFFF"><b>操作</b></font></td>
</tr>
<%
do while not rs1.eof
sql3="SELECT * from tbchapter where kcid="&rs1("kcid")&" and chapter="&rs1("chapter")&" and testopen=1"
set rs3=server.createobject("adodb.recordset")
rs3.open sql3,conn,3,2
if not rs3.eof then
sdate=rs3("sdate")
edate=rs3("edate")
if date>=sdate then
if date<=edate then
%>
<tr class="trh1">
<td align="center" height="29" width="34"><%=i%></td>
<td width="256" height="29">
<p align="center">第<%=rs1("chapter")%>章</td>
<td width="177" height="29">
<p align="center"><%
sql2="SELECT * from tbistest where username='"&username&"' and kao=0 and kcid="&rs1("kcid")&" and chapter="&rs1("chapter")
set rs2=server.createobject("adodb.recordset")
rs2.open sql2,conn,3,2
if rs2("istest")<>1 then
%><a href="selecttype.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>"><img border="0" id="img4" src="images/buttonF.jpg" height="17" width="85" alt="模拟练习" onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button10.jpg')" onmouseout="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/buttonF.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button11.jpg')" onmouseup="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button10.jpg')" fp-style="fp-btn: Chain Column 2; fp-font: 宋体; fp-font-style: Bold; fp-font-size: 11; fp-bgcolor: #FFFDE8; fp-orig: 0" fp-title="模拟练习"></a><%
else
%><a href="selecttype.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>">您已经练习过了,再练习一次</a><%
end if
rs2.close
%></td>
</tr>
<%
i=i+1
end if
end if
end if
rs3.close
rs1.movenext
loop
end if
%>
</table>
</center>
<p align="center"><a href="selectsubject.asp?kcid=<%=kcid%>"><img border="0" id="img2" src="images/button3E.gif" height="22" width="70" alt="返 回" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'images/button40.gif')" onmouseout="FP_swapImg(1,0,/*id*/'img2',/*url*/'images/button3E.gif')" onmousedown="FP_swapImg(1,0,/*id*/'img2',/*url*/'images/button42.gif')" onmouseup="FP_swapImg(1,0,/*id*/'img2',/*url*/'images/button40.gif')" fp-style="fp-btn: Metal Rectangle 1; fp-font: 宋体; fp-font-style: Bold; fp-font-size: 11; fp-transparent: 1; fp-proportional: 0; fp-orig: 0" fp-title="返 回"></a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -