亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? admin_subject.asp

?? 學校在線考試系統
?? ASP
?? 第 1 頁 / 共 2 頁
字號:
		if IsNumeric(Trim(request.form("answer5"))) = true then
			intAnswer = intAnswer + CLng(Trim(request.form("answer5")))
		end if
		if IsNumeric(Trim(request.form("answer6"))) = true then
			intAnswer = intAnswer + CLng(Trim(request.form("answer6")))
		end if
		if intAnswer < 1 or intAnswer > 63 then
			strErr = strErr & "<li>答案選擇錯誤!</li>"
		end if
	else
       if intType = 4 then   '主觀題
	      intAnswer = 0
	      strAnswer = Trim(request.form("strAnswer"))
	   else
		  intAnswer = CLng(Trim(request.form("answer")))	   
	   end if
		if intAnswer <> 1 and intAnswer <> 0 then
			strErr = strErr & "<li>答案選擇錯誤!</li>"
		end if
	end if
	
	if strErr <> "" then
		call closeConn()
		showErrMsg(strErr)
		response.write "</body></html>"
		exit sub
	end if
	set rsSubject = server.createobject("ADODB.Recordset")
	strSqlSubject = "select * from subject where id=0"
	rsSubject.open strSqlSubject,G_CONN,1,3
	rsSubject.addnew
	rsSubject("content") = strContent
	rsSubject("type") = intType
	rsSubject("option1") = strOption1
	rsSubject("option2") = strOption2
	rsSubject("option3") = strOption3
	rsSubject("option4") = strOption4
	rsSubject("option5") = strOption5
	rsSubject("option6") = strOption6
	rsSubject("answer") = intAnswer
	rsSubject("courseid") = intCourseID
	rsSubject("answer2") = server.HTMLEncode(strAnswer)   '主觀題參考答案
	rsSubject.update
	rsSubject.close
	set rsSubject = nothing
	call closeConn()
	if request.form("iscontinue") = "1" then
		response.redirect "admin_subject.asp?action=add"
	else
		response.redirect "admin_subject.asp"
	end if
end sub

sub modify()	'修改試題界面
	dim rsSubject,strSqlSubject,intSubjectID,strErr
	
	strErr = ""
	intSubjectID = CLng(Trim(request.querystring("subjectid")))
	set rsSubject = server.createobject("ADODB.Recordset")
	strSqlSubject = "select * from subject where id=" & intSubjectID
	rsSubject.open strSqlSubject,G_CONN,1,1
	if rsSubject.bof or rsSubject.eof then
		strErr = "<li>試題ID不存在!</li>"
	end if
	if strErr <> "" then
	end if
%>
<form name="frmModify" action="admin_subject.asp" method="post">
<input name="action" type="hidden" value="savemodify">
<input name="subjectid" type="hidden" value="<%=intSubjectID%>">
<table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
	<tr class="tdtbg">
		<td colspan="2" align="center"> 修 改 試 題 </td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">所屬課程:</td>
		<td>
			<%call showCourseList(rsSubject("courseid"))%>
		</td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">試題類型:</td>
		<td>
			<input name="type" onClick="chkup(1);" type="radio" <%if rsSubject("type")=1 then Response.Write "checked"%> value="1"> 單選題&nbsp;&nbsp;
			<input name="type" onClick="chkup(2);" type="radio" <%if rsSubject("type")=2 then Response.Write "checked"%> value="2"> 多選題&nbsp;&nbsp;
			<input name="type" onClick="chkup(3);" type="radio" <%if rsSubject("type")=3 then Response.Write "checked"%> value="3"> 是非題&nbsp;&nbsp;
			<input name="type" onClick="chkup(4);" type="radio" <%if rsSubject("type")=4 then Response.Write "checked"%> value="4"> 主觀題&nbsp;&nbsp;
		</td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">試題內容:</td>
		<td>
			<textarea name="content" class="text" cols="50" rows="6"><%=rsSubject("content")%></textarea>
		</td>
	</tr>
	</table>

   
   
   <%
   if rsSubject("type")=1 or rsSubject("type")=2 then 
      strnone =""
   else
      strnone ="none"
   end if
   %>
    <div name="divAnswer1" id="divAnswer1" style="display:<%=strnone%>;">
    <table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">	
	<tr class="tdbg">
		<td width="130" align="right">可選項1:</td>
		<td>
			<input name="option1" type="text" class="text" size="50" maxlength="128" value="<%=rsSubject("option1")%>">
		</td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">可選項2:</td>
		<td>
			<input name="option2" type="text" class="text" size="50" maxlength="128" value="<%=rsSubject("option2")%>">
		</td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">可選項3:</td>
		<td>
			<input name="option3" type="text" class="text" size="50" maxlength="128" value="<%=rsSubject("option3")%>">
		</td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">可選項4:</td>
		<td>
			<input name="option4" type="text" class="text" size="50" maxlength="128" value="<%=rsSubject("option4")%>">
		</td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">可選項5:</td>
		<td>
			<input name="option5" type="text" class="text" size="50" maxlength="128" value="<%=rsSubject("option5")%>">
		</td>
	</tr>
	<tr class="tdbg">
		<td width="130" align="right">可選項6:</td>
		<td>
			<input name="option6" type="text" class="text" size="50" maxlength="128" value="<%=rsSubject("option6")%>">
		</td>
	</tr>
	</table>
   </div>	
   
   <%
   dim strnone
   if rsSubject("type")=3 then 
      strnone =""
   else
      strnone ="none"
   end if
   %>
    <div name="divAnswer2" id="divAnswer2" style="display:<%=strnone%>;">
    <table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">	
	<tr class="tdbg">
		<td width="130" align="right">正確答案:</td>
		<td>
			<input name="answer" type="radio" <%if rsSubject("type")=3 and rsSubject("answer")=1 then Response.Write "checked"%> value="1">是&nbsp;&nbsp;
			<input name="answer" type="radio" <%if rsSubject("type")=3 and rsSubject("answer")=0 then Response.Write "checked"%> value="0">否<br>
		</td>
	</tr>
	</table>
   </div>
   
   <%
   if rsSubject("type")=1 or rsSubject("type")=2 then 
      strnone =""
   else
      strnone ="none"
   end if
   %>
    <div name="divAnswer3" id="divAnswer3" style="display:<%=strnone%>;">
    <table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">	
	<tr class="tdbg">
		<td width="130" align="right">正確答案:</td>
		<td>

			<input name="answer1" type="checkbox" <%if rsSubject("type") < 3 and ((rsSubject("answer") and 1) > 0) then Response.Write "checked"%> value="1"> 選項1&nbsp;&nbsp;
			<input name="answer2" type="checkbox" <%if rsSubject("type") < 3 and ((rsSubject("answer") and 2) > 0) then Response.Write "checked"%> value="2"> 選項2&nbsp;&nbsp;
			<input name="answer3" type="checkbox" <%if rsSubject("type") < 3 and ((rsSubject("answer") and 4) > 0) then Response.Write "checked"%> value="4"> 選項3&nbsp;&nbsp;
			<input name="answer4" type="checkbox" <%if rsSubject("type") < 3 and ((rsSubject("answer") and 8) > 0) then Response.Write "checked"%> value="8"> 選項4&nbsp;&nbsp;
			<input name="answer5" type="checkbox" <%if rsSubject("type") < 3 and ((rsSubject("answer") and 16) > 0) then Response.Write "checked"%> value="16"> 選項5&nbsp;&nbsp;
			<input name="answer6" type="checkbox" <%if rsSubject("type") < 3 and ((rsSubject("answer") and 32) > 0) then Response.Write "checked"%> value="32"> 選項6
		</td>
	</tr>
	</table>
   </div>

   
   <%
   if rsSubject("type")=4 then 
      strnone =""
   else
      strnone ="none"
   end if
   %>
    <div name="divAnswer4" id="divAnswer4" style="display:<%=strnone%>;">
    <table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">	
	<tr class="tdbg">
		<td width="130" align="right">參考答案:</td>
		<td>
			<textarea name="strAnswer" class="text" cols="50" rows="6"><%=rsSubject("answer2")%></textarea>
		</td>
	</tr>	
	</table>
   </div>	
   
    <table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
	<tr class="tdbg">
		<td height="30" colspan="2" align="center">
			<input type="submit" value="&nbsp;保&nbsp;&nbsp;存&nbsp;">&nbsp;&nbsp;
		</td>
	</tr>
</table>
</form>
<script language="JAVAScript">

function chkup(chkinx)
{
 //frmAdd.answer10.style.display="none";
  switch(chkinx)
  {
  case 1:   //單選題
   divAnswer1.style.display="";
   divAnswer2.style.display="none";
   divAnswer3.style.display="";
   divAnswer4.style.display="none";
      break;
  case 2:   //多選題
   divAnswer1.style.display="";
   divAnswer2.style.display="none";
   divAnswer3.style.display="";
   divAnswer4.style.display="none";
      break;
  case 3:  //是非題
   divAnswer1.style.display="none";
   divAnswer2.style.display="";
   divAnswer3.style.display="none";
   divAnswer4.style.display="none";
      break;
  case 4:  //主觀題
   divAnswer1.style.display="none";
   divAnswer2.style.display="none";
   divAnswer3.style.display="none";
   divAnswer4.style.display="";
      break;
  }

}
</script>
<%
end sub

sub saveModify()	'保存修改結果
	dim rsSubject,strSqlSubject,strErr
	dim strContent,intType,intAnswer,intCourseID,intSubjectID,strAnswer
	dim strOption1,strOption2,strOption3,strOption4,strOption5,strOption6
	
	strErr = ""
	if IsNumeric(Trim(Request.Form("subjectid"))) = false then
		strErr = "<li>試題ID錯誤!</li>"
	else
		intSubjectID = CLng(Trim(Request.Form("subjectid")))
	end if
	strContent = Trim(request.form("content"))
	if strContent = "" then
		strErr = "<li>題目內容為空!</li>"
	end if
	intType = CLng(Trim(request.form("type")))
	if intType < 1 or intType > 4 then
		strErr = strErr & "<li>題目類型選擇錯誤!</li>"
	end if
	
	intCourseID = CLng(Trim(request.form("courseid")))
	if G_CONN.execute("select count(*) as reccount from course where courseid=" & intCourseID)("reccount") = "" then
		strErr = strErr & "<li>課程選擇錯誤!</li>"
	end if
	strOption1 = Trim(request.form("option1"))
	strOption2 = Trim(request.form("option2"))
	strOption3 = Trim(request.form("option3"))
	strOption4 = Trim(request.form("option4"))
	strOption5 = Trim(request.form("option5"))
	strOption6 = Trim(request.form("option6"))
	
	if intType = 4 then   '主觀題
	   strOption1 = 1
	   strOption2 = 1
	   strOption3 = 1
	   strOption4 = 1
	   strOption5 = 1
	   strOption6 = 1
	end if
	
	if strOption1 & strOption2 & strOption3 & strOption4 & strOption5 & strOption6 = "" then
		strErr = strErr & "<li>至少要填寫一個選項內容!</li>"
	end if
	
	if intType < 3 then
		if IsNumeric(Trim(request.form("answer1"))) = true then
			intAnswer = CLng(Trim(request.form("answer1")))
		end if
		if IsNumeric(Trim(request.form("answer2"))) = true then
			intAnswer = intAnswer + CLng(Trim(request.form("answer2")))
		end if
		if IsNumeric(Trim(request.form("answer3"))) = true then
			intAnswer = intAnswer + CLng(Trim(request.form("answer3")))
		end if
		if IsNumeric(Trim(request.form("answer4"))) = true then
			intAnswer = intAnswer + CLng(Trim(request.form("answer4")))
		end if
		if IsNumeric(Trim(request.form("answer5"))) = true then
			intAnswer = intAnswer + CLng(Trim(request.form("answer5")))
		end if
		if IsNumeric(Trim(request.form("answer6"))) = true then
			intAnswer = intAnswer + CLng(Trim(request.form("answer6")))
		end if
		if intAnswer < 1 or intAnswer > 63 then
			strErr = strErr & "<li>答案選擇錯誤!</li>"
		end if
	else
       if intType = 4 then   '主觀題
	      intAnswer = 0
	      strAnswer = Trim(request.form("strAnswer"))
	   else
		  intAnswer = CLng(Trim(request.form("answer")))	   
	   end if
		  if intAnswer <> 1 and intAnswer <> 0 then
			 strErr = strErr & "<li>答案選擇錯誤!</li>"
		  end if
	end if
	
	if strErr <> "" then
		call closeConn()
		showErrMsg(strErr)
		response.write "</body></html>"
		exit sub
	end if
	set rsSubject = server.createobject("ADODB.Recordset")
	strSqlSubject = "select * from subject where id=" & intSubjectID
	rsSubject.open strSqlSubject,G_CONN,1,3
	if rsSubject.bof and rsSubject.eof then
		strErr = "<li>此試題不存在!</li>"
		showErrMsg(strErr)
		rsSubject.close
		set rsSubject = nothing
	end if
	rsSubject("content") = strContent
	rsSubject("type") = intType
	rsSubject("option1") =strOption1
	rsSubject("option2") = strOption2
	rsSubject("option3") = strOption3
	rsSubject("option4") = strOption4
	rsSubject("option5") = strOption5
	rsSubject("option6") = strOption6
	rsSubject("answer") = intAnswer
	rsSubject("courseid") = intCourseID
    rsSubject("answer2") = strAnswer   '主觀題參考答案
	rsSubject.update
	rsSubject.close
	set rsSubject = nothing
	call closeConn()
	response.redirect "admin_subject.asp"
end sub

sub del()	'刪除試題
	dim strSubjectID,strErr
	
	strSubjectID = Trim(request.querystring("subjectid"))
	if strSubjectID = "" then
		strSubjectID = Trim(request.form("subjectid"))
	end if
	if strSubjectID = "" then
		strErr = "<li>請選擇要刪除的試題!</li>"
		showErrMsg(strErr)
		response.write "</body></html>"
		call closeConn()
		exit sub
	end if
	if G_CONN.execute("select count(*) as reccount from prj_process where subid in (" & strSubjectID & ")")("reccount") > 0 then
		strErr = "<li>此試題正在使用中,不能被刪除!</li>"
		call closeConn()
		showErrMsg(strErr)
		response.write "</body></html>"
		exit sub
	end if
	G_CONN.execute "delete from subject where id in (" & strSubjectID & ")"
	call closeConn()
	response.redirect "admin_subject.asp"
end sub
%>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久久久久久夜| 欧美成人一区二区三区片免费 | 欧美网站一区二区| 色综合视频在线观看| eeuss鲁一区二区三区| 成人网在线免费视频| 成人激情黄色小说| 色综合亚洲欧洲| 欧美午夜精品一区二区三区| 欧美性大战久久| 日韩一卡二卡三卡国产欧美| 欧美变态tickle挠乳网站| 国产亚洲欧美一区在线观看| 欧美激情一区二区| 亚洲精品免费在线播放| 午夜精品视频一区| 国产一区中文字幕| eeuss鲁一区二区三区| 欧美揉bbbbb揉bbbbb| 日韩精品一区二区三区四区视频 | 正在播放亚洲一区| 欧美va亚洲va在线观看蝴蝶网| 久久婷婷成人综合色| 亚洲日韩欧美一区二区在线| 午夜精品123| 国精产品一区一区三区mba桃花 | 欧美人妇做爰xxxⅹ性高电影| 欧美日免费三级在线| 欧美成人乱码一区二区三区| 亚洲国产精品精华液2区45| 亚洲自拍偷拍综合| 国产一区欧美二区| 91成人国产精品| wwww国产精品欧美| 一区二区在线观看不卡| 国内一区二区视频| 欧美性生活一区| 国产午夜精品久久| 日韩专区在线视频| av中文字幕在线不卡| 精品国产一区二区三区av性色| 国产精品久久久久久久久免费丝袜 | 免费成人在线观看| 成人国产精品免费观看| 日韩女同互慰一区二区| 一区二区在线免费| 高清成人在线观看| 日韩一区二区三区视频| 亚洲情趣在线观看| 国产精品一线二线三线| 88在线观看91蜜桃国自产| 中文字幕在线免费不卡| 国产麻豆精品一区二区| 3atv一区二区三区| 亚洲一区二区av在线| 懂色av一区二区三区免费看| 日韩三级中文字幕| 亚洲高清不卡在线| 在线观看欧美日本| 中文字幕在线不卡视频| 成人黄色软件下载| 久久精品亚洲乱码伦伦中文 | 日韩视频免费观看高清完整版在线观看 | 日韩不卡一二三区| 日本丶国产丶欧美色综合| 国产精品国产自产拍高清av| 国产凹凸在线观看一区二区| 2019国产精品| 久久精品国产精品亚洲精品| 91精品国产综合久久福利软件| 亚洲国产中文字幕在线视频综合| 99精品视频在线播放观看| 国产精品欧美一区喷水| 成人美女视频在线看| 中文字幕亚洲视频| 色88888久久久久久影院按摩 | 免费成人在线网站| 精品理论电影在线观看| 久久国产综合精品| 亚洲国产精品高清| 91玉足脚交白嫩脚丫在线播放| 成人免费在线播放视频| 色综合久久综合网欧美综合网 | 91麻豆精品91久久久久久清纯 | 亚洲图片欧美一区| 91精品国模一区二区三区| 看国产成人h片视频| 精品国产乱码久久久久久图片| 九色综合狠狠综合久久| 久久久99精品免费观看| 91亚洲永久精品| 午夜精品福利在线| 精品福利视频一区二区三区| 国产福利一区二区三区视频在线 | 欧美韩日一区二区三区四区| 91亚洲精品久久久蜜桃| 午夜a成v人精品| 精品va天堂亚洲国产| 成人免费视频一区| 亚洲一卡二卡三卡四卡无卡久久| 欧美一区二区国产| 国产馆精品极品| 亚洲小少妇裸体bbw| 日韩三级在线免费观看| 97se亚洲国产综合自在线| 亚洲成年人影院| 国产午夜精品久久久久久免费视| 色偷偷成人一区二区三区91| 日韩不卡免费视频| 国产精品久久午夜| 欧美日韩国产一区| 国产成人午夜精品5599 | 日韩西西人体444www| 成人性生交大片免费看视频在线 | eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩午夜电影av| 91亚洲资源网| 国产一区视频导航| 日韩av不卡在线观看| 日韩理论片中文av| 欧美tickling挠脚心丨vk| 91蜜桃视频在线| 国产精品一二三| 日本在线观看不卡视频| 亚洲欧洲综合另类| 亚洲国产精品成人综合| 日韩免费高清电影| 色欧美88888久久久久久影院| 国产在线精品一区在线观看麻豆| 亚洲最快最全在线视频| 亚洲国产成人午夜在线一区| 日韩免费性生活视频播放| 精品视频在线视频| 91浏览器在线视频| 99精品一区二区三区| 黄网站免费久久| 蜜臀久久99精品久久久久久9| 亚洲一区视频在线观看视频| 亚洲男女一区二区三区| 国产精品久久久久久福利一牛影视| 欧美mv日韩mv| 亚洲精品一区二区三区精华液 | 国产日韩欧美高清在线| 精品国产制服丝袜高跟| 欧美一区二区在线不卡| 欧美日韩在线观看一区二区 | 有码一区二区三区| 中文字幕一区二区三区av| 国产精品区一区二区三区| 国产亚洲一区二区在线观看| 精品国产青草久久久久福利| 欧美电影免费提供在线观看| 日韩精品中午字幕| 国产亚洲美州欧州综合国| 久久精品男人天堂av| 中文字幕一区三区| 亚洲欧美日韩中文播放| 亚洲黄色录像片| 午夜亚洲福利老司机| 蜜桃av一区二区| 韩国理伦片一区二区三区在线播放| 久久99精品国产麻豆不卡| 国产一区二区在线影院| aaa亚洲精品一二三区| 91偷拍与自偷拍精品| 欧美精品欧美精品系列| 欧美一级日韩一级| 26uuu精品一区二区在线观看| 久久久亚洲精华液精华液精华液| 欧美激情综合在线| 一区二区三区四区视频精品免费| 一区二区三区免费在线观看| 日本美女一区二区| 国产激情一区二区三区四区| 91免费观看国产| 911精品国产一区二区在线| 欧美变态凌虐bdsm| 日韩美女啊v在线免费观看| 天天综合日日夜夜精品| 国产精品影视在线观看| 色av成人天堂桃色av| 日韩视频在线你懂得| 成人欧美一区二区三区视频网页| 一卡二卡欧美日韩| 国产一区高清在线| 欧美日韩一区二区在线视频| 欧美精品一区二区在线播放 | 免费观看日韩电影| www.欧美精品一二区| 欧美老肥妇做.爰bbww视频| 久久久久久久久久久久久夜| 亚洲综合精品久久| 国产精品一区二区视频| 欧美亚日韩国产aⅴ精品中极品| 精品处破学生在线二十三| 亚洲制服丝袜av| 国产91精品入口| 日韩一卡二卡三卡国产欧美| 亚洲精品免费电影| 国产不卡一区视频|