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

📄 modpaper.asp

📁 这是用asp做的一个网上考试题库系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
   if request("back")<>"" then
     response.redirect "../teacherroom.asp"
  end if   

   Set objConn = Server.CreateObject ("ADODB.Connection")
   strConnection = "Data Source = ks;"
   strConnection = strConnection & "User ID =lili;Password=;"
   objConn.Open strConnection
   set objRS = CreateObject("ADODB.Recordset") 
   if  request.form("type")<>"" then
       sql="select * from TestPaper where PaperID="&request("mark")
  else
       sql="select * from TestPaper where PaperID="&request.QueryString("PaperID")
  end if
  objRS.open sql,objConn
 id=objRS("Papertype")
 objRS.Close
%>

<html>

<head>
<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>修改试卷</title>
</head>
<%if id=2 then%>
<%
  if  request.form("type")<>"" then
       sql="select * from TestPaper where PaperID="&request("mark")
       sql1="Select * from RandomPara where PaperID="&request("mark")
    
  else
       sql="select * from TestPaper where PaperID="&request.QueryString("ID")
       sql1="Select * from RandomPara where PaperID="&Request.QueryString("ID")
    
  end if
  objRS.open sql,objConn
  Session("Title")=objRS("PaperHeader")
  Session("TotalMark")=objRS("TotalMark")
 Session("TotalTime")=objRS("TotalTime")
 Session("csjr")=objRS("Author")
 Session("dxfs")=objRS("selectvalue")
 Session("dufs")=objRS("multivalue")
 Session("tkfs")=objRS("tkvalue")
  Session("pdfs")=objRS("pdvalue")
  Session("fxfs")=objRS("fxvalue")
      
%>

 
<script language="JavaScript">

 
 function checkform()
{
   if((document.all.form1.Title.value=="")||(document.all.form1.TotalMark .value =="")||(document.form1.TotalTime.value==""))
   alert("请检查试卷属性是否填好");
    
   else if ((document.all.form1.zd.value=="")||(document.all.form1.lh.value=="")||(document.all.form1.yy.value=="")||(document.all.form1.pj.value=="")||(document.all.form1.zh.value=="")||(document.all.form1.fx.value==""))
        alert("请检查认知分布是否填好");
  else if (document.all.form1.csjr.value==""||document.all.form1.csjtime.value==""||document.all.form1.ssjr.value==""||document.all.form1.ssjtime.value=="")
         alert("请检查试卷情况是否填好");
 else document.form1.submit()
}
 
</script>
 
<%if request.QueryString("ID")<>"" then%>
    <form method=post  action="sjhl.asp?ID=<%=request.QueryString("ID")%>" name=form1 >
<%else%>
<form method=post  action="sjhl.asp?ID=<%=request("mark")%>" name=form1 >
<%end if%>
  <div align="center"></div>
<table width="85%" border="0" height="389" bordercolorlight="#C0C0C0" align="center">
  <tr bgcolor="#FFCCCC"> 
    <td height="148" width="22%"> 
      <div align="center"> 
        <table width="100%" border="0" align="left">
          <tr> 
            <td height="35"> 
              <div align="center">试卷属性</div>
            </td>
          </tr>
          <tr> 
            <td height="80"> 
              <script>
var messages=new Array()
messages[0]="<font   color=#008080>试卷标识输入您定义的试卷名称</font>"
messages[1]="<font    color=#008080>难度、区分度请用一位小数表示</font>"
messages[2]="<font   color=#008080>试卷总分表示此试卷的满分</font>"
messages[3]="<font  color=#008080>试卷用时表示此考试的最大时间</font>"
 
var scrollerwidth=110
var scrollerheight=60
var scrollerbgcolor='#FFCCCC'
//下面的代码不要改动
if (messages.length>1)
i=2
else
i=0
function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",3000)
setTimeout("move2(document.main.document.second)",3000)
return}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",100)}
else{
tlayer.top=scrollerheight
tlayer.document.write(messages[i])
tlayer.document.close()
if (i==messages.length-1)
i=0
else
i++}}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",3000)
setTimeout("move1(document.main.document.first)",3000)
return}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",100)}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++}}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",3000)
setTimeout("move4(second2)",3000)
return}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("move3(tdiv)",100)}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++}}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",3000)
setTimeout("move3(first2)",3000)
return}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("move4(second2)",100)}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++}}
function startscroll(){
if (document.all){
move3(first2)
second2.style.top=scrollerheight}
else if (document.layers){
move1(document.main.document.first)
document.main.document.second.top=scrollerheight+5
document.main.document.second.visibility='show'}}
window.onload=startscroll
</script>
              <script language="JavaScript1.2">
if (document.all){
document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0">')
document.write(messages[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</span>')
}
</script>
              <ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgcolor=&{scrollerbgcolor}; left="-45" top="55"> 
              <layer id="first" left=19 top=2 width=&{scrollerwidth};> 
              <script language="JavaScript1.2">
if (document.layers)
document.write(messages[0])
</script>
              </layer>
              <layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide> 
              <script language="JavaScript1.2">
if (document.layers)
document.write(messages[1])
</script>
              </layer>
              </ilayer>
              <div align="center"></div>
            </td>
          </tr>
        </table>
      </div>
    </td>
    <td height="148" width="78%"> 
      <table width="100%" border="1" height="108" cellspacing="0">
        <tr> 
          <td width="25%" bgcolor="#FFFFFF"> 
            <div align="center">试卷标识</div>
          </td>
          <td width="75%" bgcolor="#FFFFFF"> 
            <div align="left"> 
           
                   <input type="text" name="Title" value="<%=objRS("PaperHeader")%>">
            
            </div>
          </td>
        </tr>
         <%  Set objRS1= Server.CreateObject ("ADODB.Recordset")
       Set objRS1.ActiveConnection = objConn
        objRS1.open sql1 
        dim ndlist(5)
        ndlist(1)=objRS1("nd1")
        ndlist(2)=objRS1("nd2")
        ndlist(3)=objRS1("nd3")
        ndlist(4)=objRS1("nd4")
        ndlist(5)=objRS1("nd5")
        dim RzArray(6)
        RzArray(0)=objRS1("Know")
        RzArray(1)= objRS1("Grasp")
        RzArray(2)=objRS1("Applicate")
        RzArray(3)= objRS1("Evaluate")
        RzArray(4)=objRS1("Synthetize")
        RzArray(5)=objRS1("Analyse")
        Session("Rzlist")=RzArray
        dim TxCount(5) 
        TxCount(1)= objRS1("dxCount")
        TxCount(2)= objRS1("duCount")
        TxCount(3)= objRS1("tkCount")
        TxCount(4)= objRS1("pdCount")
        TxCount(5)= objRS1("fxCount")
        Session("Txlist")= TxCount
     
        Session("ssjr")= objRS1("Checkman")
        Session("ssjtime")=objRS1("Checktime")
        %>
      
              <tr> 
            <td width="25%" height="70" bgcolor="#FFFFFF"> 
              <div align="center">试卷难度分布</div>
            </td>
            <td width="75%" height="70" bgcolor="#FFFFFF"> 
              <div align="left">
                <table width="101%" border="1" height="70" align="center">
                  <tr> 
                    <td width="20%"> 
                      <div align="center">难</div>
                    </td>
                    <td width="22%"> 
                      <div align="center">较难</div>
                    </td>
                    <td width="20%"> 
                      <div align="center">中</div>
                    </td>
                    <td width="19%"> 
                      <div align="center">较易</div>
                    </td>
                    <td width="19%"> 
                      <div align="center">易</div>
                    </td>
                  </tr>
                  <tr> 
                    <td width="20%" nowrap> 
                      <input type="text" name="n" size="4" value=<%=ndlist(1)%>>
                      分 </td>
                    <td width="20%" nowrap> 
                      <input type="text" name="jn" size="4" value=<%=ndlist(2)%>>
                      分 </td>
                    <td width="20%" nowrap> 
                      <input type="text" name="z" size="4" value=<%=ndlist(3)%>>
                      分 </td>
                    <td width="20%" nowrap> 
                      <input type="text" name="jy" size="4" value=<%=ndlist(4)%>>
                      分 </td>
                    <td width="20%" nowrap> 
                      <input type="text" name="y" size="4"value=<%=ndlist(5)%>>
                      分 </td>
                  </tr>
                </table>
              </div>
              <div align="center"></div>
            </td>
          </tr>
     <tr> 
          <td width="25%" height="30" bgcolor="#FFFFFF"> 
            <div align="center">试卷总分</div>
          </td>
          <td width="75%" height="30" bgcolor="#FFFFFF"> 
            
               <input type="text" name="TotalMark" size="10" value="<%=objRS("TotalMark")%>">
 
            分 </td>
        </tr>
        <tr> 
          <td width="25%" height="2" bgcolor="#FFFFFF"> 
            <div align="center">试卷用时</div>
          </td>
          <td width="75%" height="2" bgcolor="#FFFFFF"> 
      
               <input type="text" name="TotalTime" size="10" value="<%=objRS("TotalTime")%>">
        
            分钟 </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr bgcolor="#CCCCFF"> 
    <td width="22%" height="190"> 
      <div align="center">试题分布</div>
    </td>
    <td width="78%" height="190"> 
      <table width="100%" border="1" cellspacing="0">
        <tr> 

⌨️ 快捷键说明

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