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

📄 test_pd.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,tbtk.level,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=3;"

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")%> | 第<%=rs("chapter")%>章 | 判断题</title>
<link rel="stylesheet" type="text/css" href="css.css">
</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="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/kslx.gif"></td>
  </tr>
  <tr>
    <td width="100%">当前位置:练习阶段 &gt; <a href="selectchapter.asp?kcid=<%=rs("kcid")%>"><%=rs("kcm")%></a> &gt; <a href="selecttype.asp?kcid=<%=rs("kcid")%>&chapter=<%=rs("chapter")%>">第<%=rs("chapter")%>章
   </td>
  </tr>
</table></center>
<center>
<%  if Request.ServerVariables("http_method")="POST" then
 
     response.write "<font color=red>本页答案已经提交,如要修改,请再次提交!</font>"
  end if   

%><form name="viewdatabase"  ACTION="<%=Myself%>"  method="post">
  <table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#799AE1" width="100%" id="AutoNumber1" height="165">
    <tr class="trh">
      <td width="48" align="center" bgcolor="#799AE1" height="21">
      <font color="#FFFFFF"><b>序号</b></font></td>
      <td align="center" bgcolor="#799AE1" width="588" height="21">
      <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=3 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

	text1="text"&rs("tmid")

  if Request.ServerVariables("http_method")="POST" then
     sql2="SELECT * FROM  userdata where username='"&username&"' and tmid="&rs("tmid")
   set rs2=server.createobject("adodb.recordset")
   rs2.open sql2,conn,3,2
  
 
   text2=request(""&text1&"")

  rs2("uans")=text2
  rs2.update
 
  end if   


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

%>
    <tr  class="trh1">
      <td align="center"   height="35" width="48"><%=i%> </td>
      <td align="left" width="588" height="35"><br>&nbsp;  &nbsp;  <%=htmlencode(rs("title"))%>——(难度:<%
    if  rs("level")=1  then 
    response.write "容易"
    end if 
     if  rs("level")=2 then 
    response.write "中等"
    end if 
      
      if  rs("level")=3 then 
    response.write "较难"
    end if  
       if  rs("level")=4  then 
    response.write "最难"
    end if 
      %>)<br><% if len(rs("photo")) > 1 then
            %> <center>
      <img border="0" src="examimage/<%=rs("photo")%>"></center> 
       <br><% end if %>
       答:
     &nbsp;<input type="radio" value="Y"  <%if rs3("uans")="Y" then%>checked <%end if %> name="<%=text1%>"  onblur="this.className='radio'" onfocus="this.className='inputedit';this.select()" class="radio">正确&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input type="radio" value="N"  <%if rs3("uans")="N" then%>checked <%end if %> name="<%=text1%>" onblur="this.className='radio'" onfocus="this.className='inputedit';this.select()" class="radio">错误

  <br><br></td>
    </tr>
    <% 
rs.MoveNext
If rs.EOF Then Exit For
i=i+1
Next
%>
    <tr>
      <td align="center" bgcolor="#FFFFFF" height="32" width="640" colspan="2" bordercolor="#FFFFFF">
      <input class="s02" type="submit" value="提交" name="B1" style="float: middle"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      </span>  <INPUT class="s02" onclick="window.location='selecttype.asp?kcid=<%=kcid%>&chapter=<%=chapter%>'" type=button value=返回 name=close></td>
      </tr>
    <caption></caption>
  </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 + -