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

📄 type_2_add.asp

📁 党的知识考试
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->

<%if request("ctype")="types" then
flag=0
for i= 1 to 6 
'if trim(request("t"&i))<>"" and trim(request("cate"&i))="" then
'flag=0
'end if 
if trim(request("t"&i))<>"" and trim(request("txt1"&i))<>"" and trim(request("txt2"&i))<>"" and trim(request("txt3"&i))<>"" and trim(request("txt4"&i))<>"" then
set rss=conn.execute("select * from type1 where 题干='"&trim(request("t"&i))&"'")
if not rss.eof then
%>
<script language=javascript>
alert("已有此试题,请重新录入!");
history.back();
</script>

<%else
sql="insert into type2 (题干,选项1,选项2,选项3,选项4,正确答案) values('"&trim(request("t"&i))&"','"&trim(request("txt1"&i))&"','"&trim(request("txt2"&i))&"','"&trim(request("txt3"&i))&"','"&trim(request("txt4"&i))&"','"&trim(request("cate"&i))&"')"
set rs=conn.execute (sql)
flag=1
end if
end if 
 
next
if flag=1 then 
%>
<script language=javascript>
alert("试题录入成功!");
var now=new Date();
window.navigate("type_2_add.asp?time="+now.getTime());
</script>
<%
else%>
<script language=javascript>
alert("错误:数据不全,或提交为空记录!");
history.back();
</script>
<%
end if 
end if 
%>




<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生党校网上测试系统</title>
<link rel="stylesheet" type="text/css" href="../css.css">
</head>

<body topmargin="0" leftmargin="0">
<p>
<p align="center"><font class=test1>选择题 题库管理</font></p>
<div align="center">
  <center>
   <form name=form1 action="">
  <input type=hidden name=ctype value=types>

  <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600">
    <tr>
      <td align="center" colspan="3">注:可以一次添加6道选择题,答案库只能输入大写A、B、C或D字母</td>
    </tr>
    <tr>
      <td width="50" align="center" bgcolor="#CBEFDC">编号</td>
      <td width="500" align="center" bgcolor="#CBEFDC">题目</td>
      <td width="50" align="center" bgcolor="#CBEFDC">答案</td>
    </tr>
       <%for i=1 to 6
        j=i
   
			if j mod 2 =0 then
				bg="#E9F8F0"
			else 
				bg="#ffffff"
			end if
%>
    <tr bgcolor=<%=bg%>>
      <td align="center" rowspan="3"><%=i%></td>
      <td> <input type="text" name="T<%=i%>" size="65" class="line"></td>
      <td align="center" rowspan="3">
         
          <select size="1" name="cate<%=i%>">
          <option value="A">A</option>
          <option value="B">B</option>
			<option value="C">C</option>
			<option value="D">D</option>

            </select>
           </td>
    </tr>
    <tr bgcolor=<%=bg%>>
      <td> A.<input type="text" name="Txt1<%=i%>" size="20" class="line">&nbsp;&nbsp;&nbsp; 
      B.<input type="text" name="Txt2<%=i%>" size="20" class="line"></td>
    </tr>
    <tr bgcolor=<%=bg%>>
      <td> C.<input type="text" name="Txt3<%=i%>" size="20" class="line">&nbsp;&nbsp;&nbsp; 
      D.<input type="text" name="Txt4<%=i%>" size="20" class="line"></td>
    </tr>
       <%next%>  
  <tr>
      <td colspan="3" align="center">
      <input type="submit" value="提交" name="B1"> <input type="reset" value="重置" name="B2"></td>
    </tr>
    </table>
    </form>

    </table>
  </center>
</div>
</body>

</html>





⌨️ 快捷键说明

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