📄 selecttype.asp
字号:
<!--#include file="conn.asp"--> <%
if session("username")="" then
response.redirect "relogin.asp"
end if
username=request.cookies("username")
kcid=request("kcid")
chapter=request("chapter")
sql1="SELECT distinct tbtk.category,tbkc.kcid,tbkc.kcm ,tbtk.chapter FROM tbkc,userdata,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and kao=0 order by category"
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,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>模拟练习 | <%=rs1("kcm")%> | 第<%=rs1("chapter")%>章</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_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]; }
}
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;
}
// -->
</script>
</head>
<body onload="FP_preloadImgs( /*url*/'images/button1B.jpg',/*url*/'images/button1C.jpg',/*url*/'images/button26.gif',/*url*/'images/button28.gif',/*url*/'images/button2B.jpg',/*url*/'images/button2C.jpg',/*url*/'images/button30.jpg',/*url*/'images/button31.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" height="69">
<tr class="trh">
<td height="29" width="30" bgcolor="#799AE1"></td>
<td bgcolor="#799AE1" width="225" height="29">
<p align="center"><font color="#FFFFFF"><b><%=rs1("kcm")%>--模拟练习--第<%=rs1("chapter")%>章</b></font></td>
<td bgcolor="#799AE1" width="91" height="29">
<p align="center"><font color="#FFFFFF"><b>题量</b></font></td>
<td bgcolor="#799AE1" width="116" height="29">
<p align="center"><font color="#FFFFFF"><b>操作</b></font></td>
</tr>
<%
do while not rs1.eof
%>
<tr class="trh1">
<td align="center" height="38" width="30" ><%=i%></td>
<td width="225" height="38">
<p align="center"><%
if rs1("category")=1 then
response.write "名词解释"
end if
if rs1("category")=2 then
response.write "填空题"
end if
if rs1("category")=3 then
response.write "判断题"
end if
if rs1("category")=4 then
response.write "单项选择题"
end if
if rs1("category")=5 then
response.write "多项选择题"
end if
if rs1("category")=6 then
response.write "简答题"
end if
if rs1("category")=7 then
response.write "论述题"
end if
if rs1("category")=8 then
response.write "阅读理解"
end if
%></td>
<td width="91" height="38">
<p align="center"><%
if rs1("category")=1 then
sql_count="SELECT tbtk.tmid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=1 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
response.write rs_count.RecordCount&"题"
end if
if rs1("category")=2 then
sql_count="SELECT tbtk.tmid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=2 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
response.write rs_count.RecordCount&"题"
end if
if rs1("category")=3 then
sql_count="SELECT tbtk.tmid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=3 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
response.write rs_count.RecordCount&"题"
end if
if rs1("category")=4 then
sql_count="SELECT tbtk.tmid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=4 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
response.write rs_count.RecordCount&"题"
end if
if rs1("category")=5 then
sql_count="SELECT tbtk.tmid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=5 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
response.write rs_count.RecordCount&"题"
end if
if rs1("category")=6 then
sql_count="SELECT tbtk.tmid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=6 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
response.write rs_count.RecordCount&"题"
end if
if rs1("category")=7 then
sql_count="SELECT tbtk.tmid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=7 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
response.write rs_count.RecordCount&"题"
end if
if rs1("category")=8 then
sql_count="SELECT tbtk.tmid,userdata.dataid FROM tbkc,userdata ,tbtk where username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and chapter="&chapter&" and category=8 and kao=0"
set rs_count=server.createobject("adodb.recordset")
rs_count.open sql_count,conn,3,2
xiaotino=0
yued_fen=0
do while not rs_count.eof
sql_fen1="SELECT * FROM userdataread where username='"&username&"' and dataid="&rs_count("dataid")&" and tmid="&rs_count("tmid")&" and paperno=0 "
set rs_fen1=server.createobject("adodb.recordset")
rs_fen1.open sql_fen1,conn,3,2
xiaotino=rs_fen1.recordcount+xiaotino
rs_count.movenext
loop
response.write rs_count.recordcount&"大题<br>("&xiaotino&"小题)"
end if
%>
</td>
<td width="116" height="38">
<p align="center"><%
if rs1("category")=1 then
%>
<a href="test_mc.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%>
<%
if rs1("category")=2 then
%>
<a href="test_tk.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%>
<%
if rs1("category")=3 then
%>
<a href="test_pd.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%>
<%
if rs1("category")=4 then
%>
<a href="test_danx.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%>
<%
if rs1("category")=5 then
%>
<a href="test_duox.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%>
<%
if rs1("category")=6 then
%>
<a href="test_wd.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%>
<%
if rs1("category")=7 then
%>
<a href="test_ls.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%>
<%
if rs1("category")=8 then
%>
<a href="test_yued.asp?kcid=<%=rs1("kcid")%>&chapter=<%=rs1("chapter")%>&category=<%=rs1("category")%>">
<%end if%><img border="0" id="img6" src="images/button2F.jpg" height="20" width="100" alt="开始练习" onmouseover="FP_swapImg(1,0,/*id*/'img6',/*url*/'images/button30.jpg')" onmouseout="FP_swapImg(1,0,/*id*/'img6',/*url*/'images/button2F.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img6',/*url*/'images/button31.jpg')" onmouseup="FP_swapImg(1,0,/*id*/'img6',/*url*/'images/button30.jpg')" fp-style="fp-btn: Embossed Capsule 2; fp-font: 宋体; fp-font-style: Bold; fp-font-size: 11; fp-bgcolor: #FFFDE8; fp-proportional: 0" fp-title="开始练习"></a>
</td>
</tr>
<%
rs1.movenext
i=i+1
loop
end if
%>
</table>
</center>
<p align="center"> <span lang="en-us">
<a href="selectchapter.asp?kcid=<%=kcid%>&chapter=<%=chapter%>">
<img border="0" id="img4" src="images/button1E.gif" height="24" width="68" alt="返 回" fp-style="fp-btn: Metal Rectangle 1; fp-font: 宋体; fp-font-style: Bold; fp-font-size: 11; fp-transparent: 1; fp-proportional: 0" fp-title="返 回" onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button26.gif')" onmouseout="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button1E.gif')" onmousedown="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button28.gif')" onmouseup="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button26.gif')"></a>
</span><%
sqlis1="SELECT * from tbistest where username='"&username&"' and kao=0 and kcid="&kcid&" and chapter="&chapter
set rsis1=server.createobject("adodb.recordset")
rsis1.open sqlis1,conn,3,2
if rsis1("istest")=0 then %>
<a href="iamok_lx.asp?kcid=<%=kcid%>&chapter=<%=chapter%>">
<img border="0" id="img3" src="images/button17.jpg" height="24" width="118" alt="本章已经练习完" fp-style="fp-btn: Metal Rectangle 1; fp-font: 宋体; fp-font-style: Bold; fp-font-size: 11; fp-orig: 0" fp-title="本章已经练习完" onmouseover="FP_swapImg(1,0,/*id*/'img3',/*url*/'images/button1B.jpg')" onmouseout="FP_swapImg(1,0,/*id*/'img3',/*url*/'images/button17.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img3',/*url*/'images/button1C.jpg')" onmouseup="FP_swapImg(1,0,/*id*/'img3',/*url*/'images/button1B.jpg')"></a>
<%else%>
<a href="iamno_lx.asp?kcid=<%=kcid%>&chapter=<%=chapter%>">
<img border="0" id="img5" src="images/button2A.jpg" height="24" width="98" alt="重新练习" onmouseover="FP_swapImg(1,0,/*id*/'img5',/*url*/'images/button2B.jpg')" onmouseout="FP_swapImg(1,0,/*id*/'img5',/*url*/'images/button2A.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img5',/*url*/'images/button2C.jpg')" onmouseup="FP_swapImg(1,0,/*id*/'img5',/*url*/'images/button2B.jpg')" fp-style="fp-btn: Metal Rectangle 1; fp-font: 宋体; fp-font-style: Bold; fp-font-size: 11; fp-proportional: 0" fp-title="重新练习"></a>
<%end if%>
<p align="center">
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -