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

📄 paper.asp

📁 在根目录下存放着系统登陆以及实现用户功能的网页文件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
%>
  <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
    <tr>
      <td width="100%" bgcolor="#EFEFEF" height="20">&nbsp;&nbsp;<b><%=i%>、<%=rs("question")%></b></td>
    </tr>
    <%
  if rs("text1")<>"" then
  %>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="NO<%=rs("id")%>" value="A">A、<%=rs("text1")%></td>
    </tr>
    <%
  end if
  %> <%
  if rs("text2")<>"" then
  %>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="NO<%=rs("id")%>" value="B">B、<%=rs("text2")%></td>
    </tr>
    <%
  end if
  %> <%
  if rs("text3")<>"" then
  %>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="NO<%=rs("id")%>" value="C">C、<%=rs("text3")%></td>
    </tr>
    <%
  end if
  %> <%
  if rs("text4")<>"" then
  %>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="NO<%=rs("id")%>" value="D">D、<%=rs("text4")%></td>
    </tr>
    <%
  end if
  %> <%
  if rs("text5")<>"" then
  %>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="NO<%=rs("id")%>" value="E">E、<%=rs("text5")%></td>
    </tr>
    <%
  end if
  %> <%
  if rs("text6")<>"" then
  %>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="NO<%=rs("id")%>" value="F">F、<%=rs("text6")%></td>
    </tr>
    <%
  end if
  %>
  </table>
  <%
j=j+1
rs.movenext
end if
next
rs.close

set rs=nothing
%>
  <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
    <tr>
      <td width="100%" height="25"><b><font color="#000080" size="3">三、判断题(每题<%=judgeper%>分,共<%=judgecount%>题)</font></b></td>
    </tr>
  </table>
  <%
randomize
for i=1 to judgecount
sql="select * from exam_database where mark=0 and subject='"& subject &"' and type='判断题'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
count=rs.recordcount
temp=fix(count*rnd)
if not rs.eof then
rs.move temp
rs("mark")=1
%>
  <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
    <tr>
      <td width="100%" bgcolor="#EFEFEF" height="20">&nbsp;&nbsp;<b><%=i%>、<%=rs("question")%></b></td>
    </tr>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="NO<%=rs("id")%>" value="y">正确</td>
    </tr>
    <tr>
      <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="NO<%=rs("id")%>" value="n">不正确</td>
    </tr>
  </table>
  <%
j=j+1
rs.movenext
end if
next
rs.close
response.cookies("downloadok")="y"
%>
  <p align="center"> </p>
  <p align="center"> </p>
  <p align="center"> </p>
  <p align="center"> </p>
  <p align="center"> </p>
  <input type="hidden" name="testid" value="<%=request("testid")%>" size="20">
  <input type="hidden" name="subject" value="<%=subject%>" size="20">
  <input type="hidden" name="singlecount" value="<%=singlecount%>" size="20">
  <input type="hidden" name="singleper" value="<%=singleper%>" size="20">
  <input type="hidden" name="multicount" value="<%=multicount%>" size="20">
  <input type="hidden" name="multiper" value="<%=multiper%>" size="20">
  <input type="hidden" name="judgecount" value="<%=judgecount%>" size="20">
  <input type="hidden" name="judgeper" value="<%=judgeper%>" size="20">
  <input type="hidden" name="subjectid" value="<%=request("id")%>" size="20">
  <input type="hidden" name="starttime" value="<%=time()%>" size="20">
  <input type="hidden" name="endtime" value="<%=dateadd("h",testtime,time())%>" size="20">
  <input type="hidden" name="testtime" value="<%=testtime%>" size="20">
  <!-- PersistentLayer-->
  <div id="persistMenu" style="position: absolute; height:150px; width:230px; left:360px; top:1px;z-index: 100; visibility: hidden" class="blueborder">
    <table border="1" cellspacing="0" style="border-collapse: collapse; border-width: 1" bordercolor="#111111" width="230" id="AutoNumber1" class="outborder" cellpadding="0" height="20">
      <tr>
        <td>
        <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="160" id="AutoNumber5" height="20">
          <tr>
            <td width="20"><font color="#FFFFFF">
            <img border="0" src="file:///E:/cadre2002/exam/images/timer.gif" width="15" height="15"></font></td>
            <td><b><font color="#FFCC00">计时器</font></b></td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
    <table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="230" id="AutoNumber2" class="outborder" cellpadding="0">
      <tr>
        <td>
        <div align="center">
          <center>
          <table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber3">
            <tr>
              <td height="30">
              <p align="center"><font color="#FFFFFF">开始时间</font></td>
              <td>
              <input type="text" name="mystarttime" size="20" class="inputborder" readonly></td>
            </tr>
            <tr>
              <td height="30">
              <p align="center"><font color="#FFFFFF">结束时间</font></td>
              <td>
              <input type="text" name="myendtime" size="20" class="inputborder" readonly></td>
            </tr>
            <tr>
              <td height="30">
              <p align="center"><font color="#FFFFFF">剩余时间</font></td>
              <td>
              <input type="text" name="lefttime" size="20" class="inputborder" readonly></td>
            </tr>
          </table>
          </center>
        </div>
        </td>
      </tr>
    </table>
    <table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="230" id="AutoNumber4" class="outborder" height="30">
      <tr>
        <td width="100%">
        <p align="center">
        <input type="submit" value="我要交卷" name="B3" class="s02"></td>
      </tr>
    </table>
  </div>
  <!--End PersistentLayer-->
</form>
<script language="javascript">
alert("确定开始考试并启动计时器!");
MM_showHideLayers('persistMenu','','show');
ScrollMenu();
document.all.mystarttime.value=document.all.starttime.value;
document.all.myendtime.value=document.all.endtime.value;
var myh=document.all.testtime.value-1;
var mym=59;
var mys=60;
function lefttime(){
mys--;
  if (mys<0)
  {
    mys=59;
    mym--;
  }
  if (mym<0)
  {
    mym=59;
    myh--;
    if (myh<0)
    {
    alert("考试时间到,确定查看成绩!");
    testform.submit();
    }
  }
document.all.lefttime.value=myh+":"+mym+":"+mys;
setTimeout("lefttime(myh)",1000);
} 
lefttime();
function submitit(){
if (confirm("未到交卷时间,您确定要提前交卷么?")) 
  return true; 
else 
  return false; 
} 
</script>
<%
sql="select * from exam_database where mark=1"
rs.open sql,conn,3,2
do while not rs.eof
  rs("mark")=0
  rs.update
rs.movenext
loop
else
%>
<p></p>
<p align="center"><b><font face="Wingdings" size="7" color="#FF0000">I</font></b>发生致命 
错误!因为您刷新了此页。</p>
<p align="center">请【<a href="relogin.asp">重新登录</a>】参加考试。</p>
<p align="center">如果上述错误发生超过三次,系统将取消您的考试资格,!</p>
<%
end if
%>
</body>
</html>

⌨️ 快捷键说明

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