📄 admincreatepaper1.asp
字号:
<!--#include file="conn.inc"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<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>
<script language="javascript">
function checktotal(){
var myform=document.firstform;
var a=myform.singlecount.value;
var b=myform.singleper.value;
var c=myform.multicount.value;
var d=myform.multiper.value;
var e=myform.judgecount.value;
var f=myform.judgeper.value;
var i=myform.totalper.value;
var j=a*b+c*d+e*f;
if (j!=i){
document.all.tishi.innerText=" 当前卷面总分:"+ j +",卷面总分与设定的不相符,请修改卷面总分或者调整题型分布和分值分布!";
}
else
document.all.tishi.innerText=" 当前卷面总分:"+ j;
}
function submitit(){
var bool=true;
var myform=document.firstform;
var a=myform.singlecount.value;
var b=myform.singleper.value;
var c=myform.multicount.value;
var d=myform.multiper.value;
var e=myform.judgecount.value;
var f=myform.judgeper.value;
var g=myform.paperdifficultyrate.value;
var i=myform.totalper.value;
var j=a*b+c*d+e*f;
if (myform.subject.value==""){
alert("请选择考试科目!");
myform.subject.focus();
return false;
}
if (j!=i){
alert("设定的总分和卷面总分不相符,请修改卷面总分或者调整题型分布和分值分布!");
return false;
}
if (g>j)
{alert("试卷预计平均分大于试卷总分!");
bool=false;
}
if (myform.starttime.value==myform.endtime.value)
{ alert("请修改考试时间!");
return false;
}
sttime = myform.starttime.value;
endtime = myform.endtime.value;
st = sttime.split(" ");
end = endtime.split(" ");
st1 = st[0].split("-")
st2 = st[1].split(":")
end1 = end[0].split("-")
end2 = end[1].split(":")
if (Integer.parseInt(st1[0])>Integer.parseInt(end1[0]) || Integer.parseInt(st1[1])>Integer.parseInt(end1[1]) || Integer.parseInt(st1[2])>Integer.parseInt(end1[2]) || Integer.parseInt(st2[0])>Integer.parseInt(end2[0]) || Integer.parseInt(st2[1])>Integer.parseInt(end2[1]) || Integer.parseInt(st2[2])>Integer.parseInt(end2[2]))
{ alert("da:"+st1[0]+"+"+end1[0]+"+"+st1[1]+"+"+end1[1]+"+"+st1[2]+"+"+end1[2]);
alert("da:"+st2[0]+"+"+end2[0]+"+"+st2[1]+"+"+end2[1]+"+"+st2[2]+"+"+end2[2]);
if (st2[0]>end2[0])
{alert("ajdf;lajf;ajk")
}
alert("开始日期不能大于结束日期!");
return false;
}
return true;
}
</script>
<link rel="stylesheet" type="text/css" href="css.css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body onload="checktotal();">
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
<tr>
<td width="100%">当前位置:<a href="news.asp">系统管理</a> > 生成试卷</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">
<tr>
<td width="80"><img border="0" src="images/1.jpg" width="80" height="30"></td>
<td> </td>
</tr>
</table>
<table width="790" height="331" border="1" cellpadding="0" cellspacing="1" bordercolor="#C0C0C0" id="AutoNumber1" style="border-collapse: collapse">
<form method="POST" action="admincreatepaper1-2.asp" name="firstform" onsubmit="return submitit();">
<tr height="30">
<td style="font-size: 9pt; color: #000000" colspan="4" bgcolor="#E1E1E1">
<p align="center"><font size="3"><b>试卷基本信息</b></font></td>
</tr>
<tr height="20">
<td width="155" style="font-size: 9pt; color: #000000" bgcolor="#EFEFEF">
<p align="center"><b>选择科目</b></td>
<td colspan="3" style="font-size: 9pt; color: #000000">
<select size="1" name="subject">
<option selected>--选择科目--</option>
<% v_UserID=request.Cookies("userid")
randomize
v_PaperID=1+fix(10000*Rnd)
'v_subjectid=request("subject")
session("TempPaperid")=v_PaperID
sql="select * from subject_info where SubID in (select Sub_ID from teacher_subject where Teacher_ID="&v_UserID&")"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
do while not rs.eof
%>
<option value="<%=rs("SubID")%>"><%=rs("SubName")%></option>
<% rs.movenext
loop
rs.close %>
</select>
</td>
</tr>
<tr height="20">
<td colspan="4" style="font-size: 9pt; color: #000000" bgcolor="#E1E1E1">
<p align="center"><b>试卷信息</b></td>
</tr>
<tr height="20">
<td style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF"><b>试卷名称</b></td>
<td colspan="3" style="font-size: 9pt; color: #000000"><input name="papername" type="text" class="inputnormal" id="papername" maxlength="100"></td>
</tr>
<tr height="20">
<td width="155" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
<b>卷面总分(<font color="#FF0000">分</font>)</b></td>
<td style="font-size: 9pt; color: #000000">
<p align="center">
<input type="text" name="totalper" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="this.className='inputnormal'" onfocus="this.className='inputedit';this.select()" value="100"></td>
<td style="font-size: 9pt; color: #000000" colspan="2" id="tishi"> </td>
</tr>
<tr height="20">
<td height="34" align="center" bgcolor="#E1E1E1" style="font-size: 9pt; color: #000000"><p><strong>试卷难度系数(<span class="style1">分</span>)</strong></p>
<p><strong>(预计试卷平均分数)</strong></p></td>
<td style="font-size: 9pt; color: #000000" bgcolor="#FFFFFF"><div align="center">
<input name="paperdifficultyrate" type="text" class="inputnormal" id="paperdifficultyrate" onkeyup="if(isNaN(this.value)) this.value='80';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()" value="80">
</div></td>
<td style="font-size: 9pt; color: #000000" bgcolor="#FFFFFF">
</td>
<td style="font-size: 9pt; color: #000000" bgcolor="#FFFFFF"> </td>
</tr>
<tr height="20">
<td width="155" height="21" align="center" bgcolor="#E1E1E1" style="font-size: 9pt; color: #000000"> </td>
<td style="font-size: 9pt; color: #000000" bgcolor="#E1E1E1">
<p align="center"><b>单选题</b></td>
<td style="font-size: 9pt; color: #000000" bgcolor="#E1E1E1">
<p align="center"><b>多选题</b></td>
<td style="font-size: 9pt; color: #000000" bgcolor="#E1E1E1">
<p align="center"><b>判断题</b></td>
</tr>
<tr height="20">
<td width="155" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
<b>题型分布(<font color="#FF0000">个</font>)</b></td>
<td style="font-size: 9pt; color: #000000" width="187">
<p align="center">
<input type="text" name="singlecount" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()" value="10"></td>
<td style="font-size: 9pt; color: #000000" width="150">
<p align="center">
<input type="text" name="multicount" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='15';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()" value="15"></td>
<td style="font-size: 9pt; color: #000000" width="283">
<p align="center">
<input type="text" name="judgecount" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='10';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()" value="10"></td>
</tr>
<tr height="20">
<td width="155" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
<b>分值分布(<font color="#FF0000">分</font>)</b></td>
<td style="font-size: 9pt; color: #000000" width="187">
<p align="center">
<input name="singleper" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()" value="2"></td>
<td style="font-size: 9pt; color: #000000" width="150">
<p align="center">
<input type="text" name="multiper" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='4';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()" value="4"></td>
<td style="font-size: 9pt; color: #000000" width="283">
<p align="center">
<input type="text" name="judgeper" size="18" class="inputnormal" onkeyup="if(isNaN(this.value)) this.value='2';" onblur="this.className='inputnormal';checktotal();" onfocus="this.className='inputedit';this.select()" value="2"></td>
</tr>
<tr height="20">
<td style="font-size: 9pt; color: #000000" align="center" bgcolor="#E1E1E1" colspan="4">
<b>考试时间设定</b></td>
</tr>
<tr height="20">
<td width="155" style="font-size: 9pt; color: #000000" align="center" bgcolor="#EFEFEF">
<strong>考试时间</strong></td>
<td style="font-size: 9pt; color: #000000" colspan="3">
<p align="center">
<label><span class="style1">请修改考试时间:</span></label>
<input type="text" name="starttime" size="18" class="inputnormal" onblur="javascript:this.className='inputnormal';vbscript:checkstarttime()" onfocus="this.className='inputedit';this.select()" value="<%=now()%>"> 至
<input name="endtime" type="text" class="inputnormal" id="endtime" onFocus="this.className='inputedit';this.select()" onBlur="javascript:this.className='inputnormal';vbscript:checkendtime()" value="<%=now()%>" size="18">
</td>
</tr>
<tr>
<td colspan="5">
<p align="right">
<input type="submit" value="下一步>>" name="B1" class="s02"></td>
</tr>
</form>
</table>
<script language="vbscript" id="clientEventHandlersVBS">
function checkstarttime()
if isDate(firstform.starttime.value)=false then
alert("非法的开始日期格式!")
firstform.starttime.focus()
end if
end function
function checkendtime()
if isDate(firstform.endtime.value)=false then
alert("非法的结束日期格式!")
firstform.endtime.focus()
end if
end function
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -