⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cx_test_danx.asp

📁 是一个电子商务网站的功能介绍
💻 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")
category=request("category")

 


  sql="SELECT tbtk.tmid, tbtk.title,tbtk.category, tbkc.kcid, tbkc.kcm, tbtk.chapter,a,b,c,d,e,f,photo   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 and category=4;"

set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
on error resume next

 %>

<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>成绩查询 | 模拟练习 | <%=rs("kcm")%> | 单项选择题</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>
<%



%><center>
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
  <tr>
    <td width="100%" height="1" 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/cxcj.gif"></td>
  </tr>
  <tr>
    <td width="100%" height="29">当前位置:成绩查询 &gt; <a href="cx_chapter.asp?kcid=<%=rs("kcid")%>"><%=rs("kcm")%></a> &gt; <a href="cx_type.asp?kcid=<%=rs("kcid")%>&chapter=<%=rs("chapter")%>">第<%=rs("chapter")%>章
   </td>
  </tr>
</table></center>
<center><form name="viewdatabase"  ACTION="<%=Myself%>"  method="post">
  <table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#799AE1" width="100%" id="AutoNumber1" height="250">
    <tr  class="trh">
      <td width="41" align="center" bgcolor="#799AE1" height="23">
      <font color="#FFFFFF"><b>序号</b></font></td>
      <td align="center" bgcolor="#799AE1" width="595" height="23">
      <p align="center"><font color="#FFFFFF"><b>单项选择题(共<%        
   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
   %>题)</b></font></td>
    </tr>
    <%  



rs.PageSize =5

Page = CLng(Request("Page"))

If Page < 1 Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
i=page+(page-1)*4
rs.AbsolutePage = Page
For iPage = 1 To rs.PageSize

	 


     sql3="SELECT * FROM  userdata where username='"&username&"' and tmid="&rs("tmid")
   set rs3=server.createobject("adodb.recordset")
   rs3.open sql3,conn,1,1

%>
    <tr class="trh1">
      <td align="center"   height="35" width="41"><%=i%> </td>
      <td align="left" width="595" height="35"><br>试题——<%=htmlencode(rs("title"))%><br>
      <% if len(rs("photo")) > 1 then
            %> <center>
      <img border="0" src="examimage/<%=rs("photo")%>"></center> 
       <br><% end if %>
        <% if rs("a")<>"" then %> &nbsp;  &nbsp; &nbsp; A.<%=rs("a")%><br><%end if%>
      
        <% if rs("b")<>"" then %> &nbsp;  &nbsp; &nbsp; B.<%=rs("b")%><br><%end if%>
        <% if rs("c")<>"" then %>&nbsp;  &nbsp;  &nbsp; C.<%=rs("c")%><br><%end if%>

        <% if rs("d")<>"" then %> &nbsp;  &nbsp; &nbsp; D.<%=rs("d")%><br><%end if%>

        <% if rs("e")<>"" then %> &nbsp;  &nbsp;  &nbsp; E.<%=rs("e")%><br><%end if%>
        <% if rs("f")<>"" then %> &nbsp;  &nbsp;  &nbsp; F.<%=rs("f")%><br><%end if%>
      标准答案: 
     <b>
     <% if trim(rs3("ans"))="A" then %>A.<%=rs("a")%><%end if%>
     <% if trim(rs3("ans"))="B" then %>B.<%=rs("b")%><%end if%>
<% if trim(rs3("ans"))="C" then %>C.<%=rs("c")%><%end if%>
<% if trim(rs3("ans"))="D" then %>D.<%=rs("d")%><%end if%>
<% if trim(rs3("ans"))="E" then %>E.<%=rs("e")%><%end if%>
<% if trim(rs3("ans"))="F" then %>F.<%=rs("f")%><%end if%></b><br>

      您的答案: <b><% if trim(rs3("uans"))="A" then %>A.<%=rs("a")%><%end if%>
      <% if trim(rs3("uans"))="B" then %>B.<%=rs("b")%><%end if%>
<% if trim(rs3("uans"))="C" then %>C.<%=rs("c")%><%end if%>
<% if trim(rs3("uans"))="D" then %>D.<%=rs("d")%><%end if%>
<% if trim(rs3("uans"))="E" then %>E.<%=rs("e")%><%end if%>
<% if trim(rs3("uans"))="F" then %>F.<%=rs("f")%><%end if%></b><br>
      
 <br></td>
    </tr>
    <% 
rs.MoveNext
If rs.EOF Then Exit For
i=i+1
Next
%>
    <tr>
      <td align="center" bgcolor="#FFFFFF" height="39" width="640" colspan="2" bordercolor="#FFFFFF">
      <a href="cx_type.asp?kcid=<%=kcid%>&chapter=<%=chapter%>"><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></td>
      </tr>
   
  </table>
</form>
 </center>
 <center> <form ACTION="<%=Myself%>" METHOD="GET">
    <table style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
      <tr>
        <td width="576">
        <p ALIGN="center"><%If Page <> 1 Then ' 如果不是位于第一页%>
        <a href="<%=Myself%>?Page=1&kcid=<%=kcid%>&chapter=<%=chapter%>">第一页</a>
        <a HREF="<%=Myself%>?Page=<%=(Page-1)%>&kcid=<%=kcid%>&chapter=<%=chapter%>">上一页</a>
        <%                                      
End If                                         
If Page <> rs.PageCount Then ' 如果不是位于最后一页                                         
%> <a HREF="<%=Myself%>?Page=<%=(Page+1)%>&kcid=<%=kcid%>&chapter=<%=chapter%>">下一页</a>
        <a HREF="<%=Myself%>?Page=<%=rs.PageCount%>&kcid=<%=kcid%>&chapter=<%=chapter%>">最后一页</a>
        <% End If %>&nbsp;
        <font SIZE="2">页次:</font><font COLOR="Red" SIZE="2"><%=Page%>/<%=rs.PageCount%></font></p>
        <p> </td>
      </tr>
    </table>
  </form>
 </center>
 
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -