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

📄 dxcl.asp

📁 这是用asp做的一个网上考试题库系统
💻 ASP
字号:
 
<%
Path=left(Request.ServerVariables("PATH_TRANSLATED"),InStrRev(Request.ServerVariables("PATH_TRANSLATED"),"\",-1,1))
Path=Path & "Temp1\"
Set TempFileObject=Server.CreateObject("Scripting.FileSystemObject")
if TempFileObject.FolderExists(Path)=false then
	TempFileObject.CreateFolder(Path)
end if

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = True
Count = Upload.Save(Path)
if Err <> 0 Then
		Response.Write "Error saving the file: " & Err.Description
end if
Upload.SetMaxSize 25000000,false
For Each File in Upload.Files
		if File.OriginalSize>25000000 then
			Response.Write "<p align='left'><font color='red'>系统信息:</font></p>"
			Response.Write "<p align='left'><font color='blue'>您上载的文件太大了!系统能接受的最大文件为25M!</font></p>"
			File.Delete
			Response.Write "<p align='center'><input type='button' onclick='javescript:window.close()' name='n55' value='关闭此窗口'></p>"
			response.end
		end if
Next

'a=Upload.Form("t2")
'a1=Upload.Form("tx")
Session("zsdhu")=Session("zsdh")
Session("zsdmu")=Session("zsdm")
if(Upload.form("KID")<>"") then
   Session("zsdhu")=Upload.Form("KID")
end if  
if(Upload.form("KIDname")<>"") then
   Session("zsdmu")=Upload.Form("KIDname")
end if  

Session("worktype")=Upload.Form ("WorkType")
Session("rzhfl")=Upload.Form ("rzhfl")
Session("ksyq")=Upload.Form ("ksyq")
Session("pjbzh")=Upload.Form ("pjbzh")
Session("tx")=1

Session("nd")=Upload.Form("nd")
Session("qfd")=Upload.Form("qfd")
Session("jyshj")=Upload.Form("jyshj")
Session("jyfsh")=Upload.Form("jyfsh")
Session("chtr")=Upload.Form("chtr")
Session("chtrq")=Upload.Form("chtrq")
Session("shdr")=Upload.Form ("shdr")
Session("shdrq")=Upload.Form ("shdrq")
Session("zwnr")=Upload.Form ("zwnr")

Session("stzwA")=Upload.Form("stwmA")
Session("stzwB")=Upload.Form("stzwB")
Session("stzwC")=Upload.Form("stzwC")
Session("stzwD")=Upload.Form("stzwD")
Session("stzwE")=Upload.Form("stzwE")

Set File = Upload.Files("zwwj")
	If Not File Is Nothing Then 
		FilePath=File.Path
		xxFilePath=FilePath
		FilePath=right(FilePath,len(FilePath)-InstrRev(FilePath,"\",-1,1))
	    'Session("zwwj")=xxFilePath
	    Session("zwwj")=FilePath
	 ' File.delete
	  
	 else
	    Session("zwwj")=""
	end if
Set File = Upload.Files("stwjA")
	If Not File Is Nothing Then 
		FilePath=File.Path
		xxFilePath=FilePath
		FilePath=right(FilePath,len(FilePath)-InstrRev(FilePath,"\",-1,1))
	    Session("stwjA")=FilePath
	    
	 ' File.delete
	 else
	    Session("stwjA")=""
	end if
Set File = Upload.Files("stwjB")
	If Not File Is Nothing Then 
		FilePath=File.Path
		xxFilePath=FilePath
		FilePath=right(FilePath,len(FilePath)-InstrRev(FilePath,"\",-1,1))
	    Session("stwjB")=FilePath
	 ' File.delete
	 else
	    Session("stwjB")=""
	end if
	Set File = Upload.Files("stwjC")
	If Not File Is Nothing Then 
		FilePath=File.Path
		xxFilePath=FilePath
		FilePath=right(FilePath,len(FilePath)-InstrRev(FilePath,"\",-1,1))
	    Session("stwjC")=FilePath
	 ' File.delete
	 else
	    Session("stwjC")=""
	 end if
   Set File = Upload.Files("stwjD")
	If Not File Is Nothing Then 
		FilePath=File.Path
		xxFilePath=FilePath
		FilePath=right(FilePath,len(FilePath)-InstrRev(FilePath,"\",-1,1))
	    Session("stwjD")=FilePath
	 ' File.delete
	 else
	    Session("stwjD")=""
	end if
	Set File = Upload.Files("stwjE")
	If Not File Is Nothing Then 
		FilePath=File.Path
		xxFilePath=FilePath
		FilePath=right(FilePath,len(FilePath)-InstrRev(FilePath,"\",-1,1))
	    Session("stwjE")=FilePath
	 ' File.delete
	 else
	    Session("stwjE")=""
	end if
 Session("answer")=Upload.Form ("stxx")
 Session("dajs")=Upload.Form ("dajs")
'Response.Write "试题内容: "+a2
'Response.Write "<BR>试题答案: "
'Response.Write "<br>试题附件:"+xxFilePath
'Set TempFileObject1=Server.CreateObject("Scripting.FileSystemObject")
 'TempFileObject1.OpenTextFile(xxFilePath)
%>
<script language="JavaScript">

function xg()
{
   parent.history.back ();
}
</script>
<html>
<% if request.QueryString("Added")="" then%>
<form name="form1" action="strk.asp" method="post" >
<%else%>
<form name="form1" action="strk.asp?Added=<%=request.QueryString("Added")%>&BackTo=<%=request.QueryString("BackTo")%>" method="post" >
<%end if%>
  <p>&nbsp; </p>
  <table width="93%" border="0" height="110" cellspacing="0" align="center">
    <tr> 
      <td height="40" width="20%"> 
        <div align="center"></div>
      </td>
      <td height="40" width="54%"> 
        <div align="left"><b><font color="#FF3333">单项选择题</font></b></div>
      </td>
    </tr>
    <tr> 
      <td width="20%" height="27" nowrap> 
        <div align="center"><b><font color="#003333">知识点:</font></b></div>
      </td>
      <td width="54%" height="27">
     <%=Session("zsdmu")%></td>
    </tr>
    <tr> 
      <td width="20%" height="43" nowrap> 
        <div align="center">试题内容:</div>
      </td>
      <%if Session("zwnr")="" then%> 
      <td width="54%" height="43"> 
        <p> 
          <a href="./Temp1/<%=Session("zwwj")%>" target='_blank'>附件</a>
        </p>
      </td>
</tr>
      <%else%>
<td width="54%" height="27"><%=Session("zwnr")%></td> </tr>
    <%end if%> <%if ((Session("zwnr")<>"") and (Session("zwwj")<>"")) then%> 
    <tr> 
      <td width="20%" height="24"> </td>
      <td width="54%" height="24"> 
        <p> 
          <a href="./Temp1/<%=Session("zwwj")%>" target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <%end if%> 
  </table>

  <table width="97%" border="0" height="24">
    <tr>
      <td>
        <hr>
      </td>
    </tr>
  </table>
  <table width="93%" border="0" height="110" cellspacing="0" align="center">
    <%if (Session("stzwA" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="A" >
          A</div>
      </td>
      <td width="54%" height="21"><%=Session("stzwA")%></td>
    </tr>
    <% else%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="A" >
          A</div>
      </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjA")%>"  target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <%end if%> <%if ((Session("stzwA" )<>"")and (Session("stwjA")<>"")) then%> 
    <tr> 
      <td width="20%" nowrap> </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjA")%>"  target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <tr> 
      <td width="20%" nowrap> </td>
      <td width="54%"> </td>
    </tr>
    <%end if%> <%if (Session("stzwB" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="B" >
          B</div>
      </td>
      <td width="54%"><%=Session("stzwB")%></td>
    </tr>
    <% elseif (Session("stwjB" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="B" >
          B</div>
      </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjB")%>"  target='_blank'>附件</a> 
        </p>
      </td>
    </tr>
    <%end if%> <%if ((Session("stzwB" )<>"")and (Session("stwjB")<>"")) then%> 
    <tr> 
      <td width="20%" nowrap> </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjB")%>"  target='_blank'>附件</a> 
        </p>
      </td>
    </tr>
    <tr> 
      <td width="20%" nowrap> </td>
      <td width="54%"> </td>
    </tr>
    <%end if%> <%if (Session("stzwC" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="C" >
          C</div>
      </td>
      <td width="54%"><%=Session("stzwC")%></td>
    </tr>
    <% elseif (Session("stwjC" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="C" >
          C</div>
      </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjC")%>"  target='_blank'>附件</a> 
        </p>
      </td>
    </tr>
    <%end if%> <%if ((Session("stzwC" )<>"")and(Session("stwjC")<>"")) then%> 
    <tr> 
      <td width="20%" nowrap> </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjC")%>"  target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <tr> 
      <td width="20%" nowrap> </td>
      <td width="54%"> </td>
    </tr>
    <%end if%> <%if (Session("stzwD" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="D" >
          D</div>
      </td>
      <td width="54%"><%=Session("stzwD")%></td>
    </tr>
    <% elseif (Session("stwjD" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="D" >
          D</div>
      </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjD")%>"  target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <%end if%> <%if ((Session("stzwD" )<>"")and(Session("stwjD")<>"")) then%> 
    <tr> 
      <td width="20%" nowrap> </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjD")%>"  target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <tr>
      <td width="20%" nowrap> </td>
      <td width="54%"> </td>
    </tr>
    <%end if%> <%if (Session("stzwE" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="E" >
          E</div>
      </td>
      <td width="54%"><%=Session("stzwE")%></td>
    </tr>
    <% elseif (Session("stwjE" )<>"") then%> 
    <tr> 
      <td width="20%" nowrap> 
        <div align="center"> 
          <input type="radio" name="stxx" value="E" >
          E</div>
      </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjE")%>"  target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <%end if%> <%if ((Session("stzwE" )<>"")and(Session("stwjE")<>"")) then%> 
    <tr> 
      <td width="20%"> </td>
      <td width="54%"> 
        <p> 
          <a href="./Temp1/<%=Session("stwjE")%>"  target='_blank'>附件</a>
        </p>
      </td>
    </tr>
    <%end if%> 
  </table>
  <table width="97%" border="0">
    <tr> 
      <td> 
        <hr>
      </td>
    </tr>
  </table>
  <table width="93%" border="0">
    <tr> 
      <td width="33%" nowrap> 
        <div align="center"><b><font color="#FF3333">答案:</font></b></div>
      </td>
      <td width="67%"><%=Session("answer")%></td>
    </tr>
    <tr> 
      <td width="33%" nowrap> 
        <div align="center"><font color="#FF3333">答案解释:</font></div>
      </td>
      <td width="67%"><%=Session("dajs")%></td>
    </tr>
  </table>
  <table width="92%" border="0">
    <tr> 
      <td width="43%" nowrap> 
        <div align="right"> 
          <input type="button" name="xgst" value="修改试题" onClick="xg()">
        </div>
      </td>
      <td width="17%" nowrap> 
        <div align="center"> 
          <input type="submit" name="Submit" value="入库">
        </div>
      </td>
      <td width="40%" nowrap> 
        <input type="submit" name="Submit2" value="取消">
      </td>
    </tr>
  </table>
 
  <p> </p>
  </form>
</html>

⌨️ 快捷键说明

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