📄 chuti.asp
字号:
<!--#include file="conn.asp"-->
<script language=javascript>
function btnadd()
{
window.navigate("chuti_add.asp");
}
function btnedit()
{
if ((document.form1.pd.value=="") || (document.form1.xz.value=="") || (document.form1.tk.value==""))
{alert("你提交的为空记录!");
document.form1.pd.focus();
return false;}
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="edit";
document.form1.submit();
}
</script>
<%flag=0
flags=0
sqlfind="select * from shiti order by id desc"
set rss=conn.execute(sqlfind)
if rss.eof then
flag=1
title="<font color=red> 暂无 </font>"
else
set rs=conn.execute("select * from shiti order by id desc")
title="第 <font color=red> "&rs("id")&" </font> 期"
end if
if trim(request("ctype"))="edit" then
if request("c1")="on" then
flags=1
sqledit="update shiti set tiankong="&trim(request("pd"))&",tk_fenshu="&trim(request("pds"))&",setupdata='"&date()&"' where id="&rs("id")
set rsedit=conn.execute(sqledit)
end if
if request("c2")="on" then
flags=1
sqledit="update shiti set xuanze="&trim(request("xz"))&",xz_fenshu="&trim(request("xzs"))&",setupdata='"&date()&"' where id="&rs("id")
set rsedit=conn.execute(sqledit)
end if
if request("c3")="on" then
flags=1
sqledit="update shiti set wenda="&trim(request("tk"))&",wenda_fenshu="&trim(request("tks"))&",setupdata='"&date()&"' where id="&rs("id")
set rsedit=conn.execute(sqledit)
end if
sqledit="update shiti set setupdata='"&date()&"' where id="&rs("id")
set rsedit=conn.execute(sqledit)
flags=1
if flags=1 then
%>
<script language=javascript>
alert ("修改成功!");
now=new Date();
window.navigate("chuti.asp?time="+now.getTime());
</script>
<%else%>
<script language=javascript>
alert ("请选择要修改项!");
</script>
<%end if
end if %>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>考试系统-出题</title>
</head>
<body bgcolor="#CCCCCC">
<!--#include file="top2.html"-->
<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="782" align="center">
<tr>
<td align="center" colspan="4"><%=title%> 考卷设置(最新一期的)</td>
</tr>
<tr>
<td align="center" bgcolor="#000080"><font color="#FFFFFF">编号</font></td>
<td align="center" bgcolor="#000080"><font color="#FFFFFF">数目</font></td>
<td align="center" bgcolor="#000080"><font color="#FFFFFF">分数</font></td>
<td align="center" bgcolor="#000080"><font color="#FFFFFF">修改</font></td>
</tr>
<%if flag=1 then%>
<tr>
<td align=center colspan="4"><font color=red>暂无考卷设置信息</font></td></tr>
<%else%>
<tr>
<td align="center">填空题</td>
<td align="center"> <input type="text" name="pd" size="5" class="line" value=<%=rs("tiankong")%>></td>
<td align="center">
<input type="text" name="pds" size="5" class="line" value=<%=rs("tk_fenshu")%>></td>
<td align="center">
<input type="checkbox" name="C1" value="on"></td>
</tr>
<tr>
<td align="center" bgcolor="#EFEFF7">选择题</td>
<td bgcolor="#EFEFF7" align="center">
<input type="text" name="xz" size="5" class="line" value=<%=rs("xuanze")%>></td>
<td align="center" bgcolor="#EFEFF7">
<input type="text" name="xzs" size="5" class="line" value=<%=rs("xz_fenshu")%>></td>
<td align="center" bgcolor="#EFEFF7">
<input type="checkbox" name="C2" value="on"></td>
</tr>
<tr>
<td align="center">问答题</td>
<td align="center">
<input type="text" name="tk" size="5" class="line" value="<%=rs("wenda")%>"></td>
<td align="center">
<input type="text" name="tks" size="5" class="line" value=<%=rs("wenda_fenshu")%>></td>
<td align="center">
<input type="checkbox" name="C3" value="on"></td>
</tr>
<tr>
<td colspan="4" align="center">
</td>
</tr>
<%end if %>
<tr>
<td colspan="4" align="center">
<input type="button" value="增加" name="B1" onclick="btnadd()" style="width: 60; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF">
<%if flag=0 then%>
<input type="button" value="修改" name="B1" onclick="btnedit()" 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">
<%end if %></td>
</tr>
</table>
</form>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="782" align="center">
<%while not rss.eof %>
<tr>
<td>◆ 第 <%=rss("id")%> 期(填空题 <%=rss("tiankong")%> 道/ <%=rss("tk_fenshu")%> 分,选择题 <%=rss("xuanze")%> 道/ <%=rss("xz_fenshu")%> 分,问答题 <%=rss("wenda")%> 道/ <%=rss("wenda_fenshu")%> 分)</td>
</tr>
<%rss.movenext
wend%>
</table>
</center>
</div>
<!--#include file="end.html"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -