adm_addquestion.asp

来自「教学在线系统」· ASP 代码 · 共 135 行

ASP
135
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../conndb/conn.asp"-->
<%
getsel_profession = replace(trim(request("sel_profession")),"'","")
getsel_lesson = replace(trim(request("sel_lesson")),"'","")
if(getsel_profession = "" or getsel_lesson = "")then
response.write("<center><font color='red' style='font-size:9pt;'>请选择专业或课程!</font></center>")
response.end()
end if
sql_1 = "select * from Tab_profession where ID = "&getsel_profession
sql_2 = "select * from Tab_Lesson where ID = "&getsel_lesson
set rs_1 = conn.Execute(sql_1)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加考试题目</title>
</head>
<style>
td{font-size:9pt;}
input.wid0{border:1px solid;}
input.wid1{width:200;border:1px solid;}
input.wid2{width:150;border:1px solid;}
</style>
<script language="javascript" src="../js/js.js"></script>
<body topmargin=0 leftmargin=0>


<br>
 	<table cellspacing=0 cellpadding=0 width=70% height="20" align=center style="border:1px solid;border-color:black;">
		<tr>
			<td width="17%" align=right nowrap>&nbsp;
			</td>
			<td width="14%" align=right nowrap>所选专业:</td>
			<td width="20%" align=center nowrap><font color="red">
			<%
			response.Write(rs_1("Name"))
			rs_1.close
			set rs_1 = nothing
			%></font>
			</td>
			<td width="15%" align=right nowrap>
			所选课程:
			</td>
			<td width="16%" align=center nowrap><font color="red">
			<%
			set rs_2 = conn.Execute(sql_2)
			response.Write(rs_2("Name"))
			rs_2.close
			set rs_2 = nothing
			%></font>
			</td>
		    <td width="18%" align=center nowrap>&nbsp;</td>
		</tr>
	</table>
<form name="addques" method="post" action="tre_/tre_adm_AddQuestion.asp">
<table width=100%  border=0 align=center cellpadding=0 cellspacing=0>
<tr>
<td colspan=2 align=center height="27"><font color="red">添 加 选 择 题</font></td>
</tr>
<tr>
<td width="40%" height="27" align=right>考试题目:</td>
<td width="60%" height="27"><input class="wid1" type="text" name="subject">
  <font color="red">*</font></td>
</tr>
<tr>
<td height="27" align=right>考试类型:</td>
<td height="27">
<% getname = replace(trim(request("name")),"'","")%>
<select name="ques_type" style="width:100;border:1px solid;" onChange="danorduo(addques.ques_type.value,<%=getsel_profession%>,<%=getsel_lesson%>)">
<option value="单选题" <%if(instr(getname,"单选题") > 0)then%>selected<%end if%>>单选题</option>
<option value="多选题" <%if(instr(getname,"多选题") > 0)then%>selected<%end if%>>多选题</option>
</select>
</td>
</tr>
<tr>
<td height="27" align=right>选 项A:</td>
<td height="27"><input class="wid2" type="text" name="A">
  <font color="red"> *</font></td>
</tr>
<tr>
<td height="27" align=right>选 项B:</td>
<td height="27"><input class="wid2" type="text" name="B">
  <font color="red"> *</font></td>
</tr>
<tr>
<td height="27" align=right>选 项C:</td>
<td height="27"><input class="wid2" type="text" name="C">
  <font color="red"> *</font></td>
</tr>
<tr>
<td  height="27" align=right>选 项D:</td>
<td height="27"><input class="wid2" type="text" name="D">
  <font color="red"> *</font></td>
</tr>
<tr>
<td height="27" align=right>正确答案:</td>
<td height="27">
<%

if(instr(getname,"单选题") > 0 or getname = "")then
%>
<select name="ques_answer_dan" style="width:50;border:1px solid;">
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
</select>
<%
else
%>
A:<input type="checkbox" name="ques_answer_duo" value="A">
B:<input type="checkbox" name="ques_answer_duo" value="B">
C:<input type="checkbox" name="ques_answer_duo" value="C">
D:<input type="checkbox" name="ques_answer_duo" value="D">
<%
end if
%>
</td>
</tr>
<tr>
<td  height="27" align=right>注 释:</td>
<td height="27"><input class="wid2" type="text" name="note"></td>
</tr>
<tr>
<td height="27" colspan="2" align=center>
<input type="submit" name="submit" value="添加" style="height:17"  class="wid0">&nbsp;|&nbsp;<input type="reset" name="reset" value="重置" style="height:17" class="wid0">
<input type="hidden" name="hid_proid" value="<%=getsel_profession%>"><input type="hidden" name="hid_lessid" value="<%=getsel_lesson%>">
</td>
</tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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