📄 testadd.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<script language=javascript>
function btnadd()
{
if ((document.form1.pd.value!="") && (document.form1.pds.value==""))
{alert("数据不全,请重新输入!");
document.form1.pds.focus();
return false;}
if ((document.form1.xz.value!="") && (document.form1.xzs.value==""))
{alert("数据不全,请重新输入!");
document.form1.xzs.focus();
return false;}
if ((document.form1.tk.value!="") && (document.form1.tks.value==""))
{alert("数据不全,请重新输入!");
document.form1.tks.focus();
return false;}
document.form1.ctype.value="add";
document.form1.submit();
}
function btngiveup()
{
var now=new Date();
window.navigate("test.asp?time="+now.getTime())
}
</script>
<%
set rs=conn.execute("select * from test order by examinationid desc")
flag=0
if request("ctype")="add" then
if trim(request("tk"))="" or trim(request("xz"))="" or trim(request("pd"))="" then
%>
<script language=javascript>
alert("数据不全,请重新录入");
history.back();
</script>
<%
else
sqlin="insert into test (selectid,selectscore,rightorwrongid,rightorwrongscore,fillingid,fillingscore,setupdata) values("&trim(request("xz"))&","&trim(request("xzs"))&","&trim(request("pd"))&","&trim(request("pds"))&","&trim(request("tk"))&","&trim(request("tks"))&","&date()&")"
set rss=conn.execute(sqlin)
%>
<script language=javascript>
alert("试题类录入成功!");
var now=new Date();
window.navigate("test.asp?time="+now.getTime());
</script>
<%end if
end if %>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 6.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 face="隶书" size="6" >试卷管理理</font></p>
<div align="center">
<center>
<form name=form1 action="">
<input type="hidden" name="ctype" >
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="400">
<tr>
<td align="center" colspan="3"> (最新一期)考卷设置</td>
</tr>
<tr>
<td align="center" bgcolor="#000099"><font color="#FFFFFF">编号</font></td>
<td align="center" bgcolor="#000099"><font color="#FFFFFF">数目</font></td>
<td align="center" bgcolor="#000099"><font color="#FFFFFF">分数</font></td>
</tr>
<tr>
<td align="center">判断题</td>
<td align="center"> <input type="text" name="pd" size="5" class="line" ></td>
<td align="center">
<input type="text" name="pds" size="5" class="line" ></td>
</tr>
<tr>
<td align="center" bgcolor="#EFEFF7">选择题</td>
<td bgcolor="#EFEFF7" align="center">
<input type="text" name="xz" size="5" class="line"></td>
<td align="center" bgcolor="#EFEFF7">
<input type="text" name="xzs" size="5" class="line"></td>
</tr>
<tr>
<td align="center">填空题</td>
<td align="center"> <input type="text" name="tk" size="5" class="line"></td>
<td align="center">
<input type="text" name="tks" size="5" class="line"></td>
</tr>
<tr>
<td colspan="3" align="center">
考试时间 <input type="text" name="ttime" size="5" value="120"> 分钟</td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="button" value="增加" name="B1" onclick="btnadd()" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF">
<input type="button" value="放弃" name="B3" onclick="btngiveup()" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF">
<input type="reset" value="重置" name="B2" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF"></td>
</tr>
</table> </form>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="400">
<%while not rs.eof %>
<tr>
<td>◆ 第 <%=rs("examinationid")%> 期(判断题 <%=rs("rightorwrongid")%> 道/ <%=rs("rightorwrongscore")%> 分,选择题 <%=rs("selectid")%> 道/ <%=rs("selectscore")%> 分,填空题 <%=rs("fillingid")%> 道/ <%=rs("fillingscore")%> 分)</td>
</tr>
<%rs.movenext
wend%>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -