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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? function.asp

?? 學(xué)校在線考試系統(tǒng)
?? ASP
字號:
<%
'公用常量定義
CONST CONST_PURVIEW_ADMIN = 0 '超級管理員權(quán)限值
CONST CONST_PURVIEW_SUBJECT = 1	'維護(hù)試題檔案權(quán)限值
CONST CONST_PURVIEW_STUDENT = 2	'維護(hù)考生檔案權(quán)限值
CONST CONST_PURVIEW_PROJECT = 4	'維護(hù)考試計劃權(quán)限值
CONST CONST_PURVIEW_COURSE = 8	'維護(hù)課程檔案權(quán)限值

'檢測管理員登錄是否有效
function checkAdminLogin()
	dim rsCheckLogin,strSqlCheckLogin
	checkAdminLogin = true
	set rsCheckLogin = server.createobject("ADODB.Recordset")
	strSqlCheckLogin = "select * from admin where adminname='" & request.cookies("aoyi")("adminname") & "'"
	rsCheckLogin.open strSqlCheckLogin,G_CONN,1,1
	if rsCheckLogin.bof and rsCheckLogin.eof then
		checkAdminLogin = false
	end if
	rsCheckLogin.close
	set rsCheckLogin = nothing
end function

'檢測當(dāng)前管理員權(quán)限是否符合指定要求
function checkPurview(intPurview)
	dim rsCheckPurview,strSqlCheckPurview
	checkPurview = false
	set rsCheckPurview = server.createobject("ADODB.Recordset")
	strSqlCheckPurview = "select * from admin where adminname='" & request.cookies("aoyi")("adminname") & "'"
	rsCheckPurview.open strSqlCheckPurview,G_CONN,1,1
	if not rsCheckPurview.bof and not rsCheckPurview.eof then
		if rsCheckPurview("adminpurview") and intPurview <> 0 or rsCheckPurview("adminname") = "admin" then	'把數(shù)據(jù)庫中權(quán)限值與指定權(quán)限值做與運(yùn)算檢測是否包含指定權(quán)限
			checkPurview = true
		end if
	end if
	rsCheckPurview.close
	set rsCheckPurview = nothing
end function

'檢測當(dāng)前考生登錄是否有效
function checkStudentLogin()
	dim rsCheckLogin,strSqlCheckLogin
	checkStudentLogin = true
	set rsCheckLogin = server.createobject("ADODB.Recordset")
	strSqlCheckLogin = "select studentid from student where studenttype=1 and username='" & request.cookies("aoyi")("username") & "'"
	rsCheckLogin.open strSqlCheckLogin,G_CONN,1,1
	if rsCheckLogin.bof and rsCheckLogin.eof then
		checkStudentLogin = false
	end if
	rsCheckLogin.close
	set rsCheckLogin = nothing
end function

'顯示課程選擇列表
sub showCourseList(SelectedID)
	dim rsCourse,strSqlCourse
	
	set rsCourse = server.createobject("ADODB.Recordset")
	strSqlCourse = "select * from course"
	rsCourse.open strSqlCourse,G_CONN,1,1
	response.write "<select name='courseid' style='width:130px;'>" & vbcrlf
	response.write "<option value='0'>---所有課程---</option>"
	while not rsCourse.eof
		response.write "<option "
		if rsCourse("courseid") = SelectedID then
			response.write "selected"
		end if
		response.write " value='" & rsCourse("courseid") & "'>" & rsCourse("coursename") & "</option>" & vbcrlf
		rsCourse.movenext
	wend
	response.write "</select>"
	rsCourse.close
	set rsCourse = nothing
end sub

'顯示錯誤信息
sub showErrMsg(strErrMsg)
%>
	<table align="center" width="500" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
		<tr class="tdtbg">
			<td align="center">
				<font color="#FFFFFF">&nbsp;操&nbsp;作&nbsp;失&nbsp;敗&nbsp;</font>
			</td>
		</tr>
		<tr class="tdbg">
			<td align="center">
				操作沒有成功,可能由于以下原因:<br>
				<%=strErrMsg%>
			</td>
		</tr>
		<tr class="tdbg">
			<td height="30" align="center">
				<input type="button" onClick="history.go(-1);" value="&nbsp;返回上一頁&nbsp;">
			</td>
		</tr>
	</table>	
<%
end sub

'顯示頁面控制
sub showPageCtrl(intMaxPage,intCurPage,strUrl)
	dim I
	if intCurPage > 1 then
		response.write "<a href='" & strUrl & "1'>首頁</a>&nbsp;&nbsp;<a href='" & strUrl & intCurPage - 1 & "'>上一頁</a>&nbsp;&nbsp;"
	else
		response.write "首頁&nbsp;&nbsp;上一頁&nbsp;&nbsp;"
	end if
	response.write "第 <font color='red'>" & intCurPage & "</font>/" & intMaxPage & " 頁&nbsp;&nbsp;"
	if intCurPage < intMaxPage then
		response.write "<a href='" & strUrl & intCurPage + 1 & "'>下一頁</a>&nbsp;&nbsp;<a href='" & strUrl & intMaxPage & "'>尾頁</a>&nbsp;&nbsp;"
	else
		response.write "下一頁&nbsp;&nbsp;尾頁&nbsp;&nbsp;"
	end if
	response.write "跳轉(zhuǎn)到:<select onChange=""window.open('" & strUrl & "' + this.value,'_self');"">"
	for I = 1 to intMaxPage
		response.write "<option value='" & I & "'>第 " & I & " 頁</option>"
	next
	response.write "</select>"
end sub

'生成試卷
function makePaper(intPrjID,intStudentID)
	dim rsPaper,strSqlPaper,rsNew,strSqlNew,intCourseID,intCount,arrTemp,intSSCount,arrSS,intMSCount,arrMS,intBCount,intZGCount,arrB,intCurType,I,J,intPos,blnPass
	G_CONN.execute "delete from prj_process where prjid=" & intPrjID & " and studentid=" & intStudentID
	set rsPaper = server.createobject("ADODB.Recordset")
	strSqlPaper = "select courseid,ss_count,ms_count,b_count,zg_count from project where prjid=" & intPrjID
	rsPaper.open strSqlPaper,G_CONN,1,1
	if not rsPaper.bof and not rsPaper.eof then
		intCourseID = rsPaper("courseid")
		intSSCount = rsPaper("ss_count")
		intMSCount = rsPaper("ms_count")
		intBCount = rsPaper("b_count")
		intZGCount= rsPaper("zg_count")
	else
		rsPaper.close
		set rsPaper = nothing
		makePaper = false
		exit function
	end if
	rsPaper.close
	for intCurType = 1 to 4
		select case intCurType
		case 1
			intCount = intSSCount
		case 2
			intCount = intMSCount
		case 3
			intCount = intBCount
		case 4
		    intCount = intZGCount
		end select
		if intCount > 0 then
			redim arrTemp(intCount)
			strSqlPaper = "select id from subject where type=" & intCurType & " and courseid=" & intCourseID
			rsPaper.open strSqlPaper,G_CONN,1,1
			if rsPaper.recordcount < intCount then	'判斷當(dāng)前題庫內(nèi)試題是否足夠
				rsPaper.close
				set rsPaper = nothing
				makePaper = false
				exit function
			end if
			randomize timer
			intPos = int(rnd() * rsPaper.recordcount)
			arrTemp(1) = intPos
			for I = 2 to intCount
				intPos = int(rnd() * rsPaper.recordcount)
				blnPass = false
				while blnPass = false
					for J = 1 to I - 1
						if intPos = arrTemp(J) then
							exit for
						end if
					next
					if J = I then
						blnPass = true
					else
						'使用線性探測解決沖突問題
						intPos = intPos + 1
						if intPos = rsPaper.recordcount then
							intPos = 0
						end if
					end if
				wend
				arrTemp(I) = intPos
			next
			strSqlNew = "select * from prj_process"
			set rsNew = server.createobject("ADODB.Recordset")
			rsNew.open strSqlNew,G_CONN,1,3
			dim intOrderid
			intOrderid = 1
			for I = 1 to intCount
				rsPaper.move arrTemp(I),1
				rsNew.addnew
				rsNew("prjid") = intPrjID
				rsNew("subid") = rsPaper("id")
				rsNew("studentid") = intStudentID
				rsNew("orderid") = intOrderid
				rsNew.update
				intOrderid = intOrderid + 1
			next
			rsNew.close
			rsPaper.close
		end if
	next
	G_CONN.execute "update prj_student set state=2 where StudentID =" &intStudentID
	G_CONN.execute "update prj_student set starttime=now() where StudentID =" &intStudentID
	set rsPaper = nothing
	makePaper = true
end function

function score(intPrjID,intStudentID)
	dim dtmStartTime,dtmEndTime,intMark,intLimitTime
'首先判斷此試卷能否進(jìn)行打分處理
	if G_CONN.execute("select count(*) as reccount from prj_student where state<>1 and "_
& "prjid=" & intPrjID & " and studentid=" & intStudentID)("reccount") = 0 then
	  score = false
	else
    '取得此考試的限制時間及進(jìn)行考試的開始時間并計算出考試的結(jié)束時間
	  intLimitTime = G_CONN.execute("select limittime from project where prjid=" _
& intPrjID)("limittime")
	  dtmStartTime = G_CONN.execute("select starttime from prj_student where prjid=" _
& intPrjID & " and studentid=" & intStudentID)("starttime")
	  if DateDiff("n",dtmStartTime,Now()) > intLimitTime then
	    dtmEndTime = FormatDatetime(dtmStartTime,2) & " " _
& FormatDatetime(TimeSerial(Hour(dtmStartTime),Minute(dtmStartTime) _
+ intLimitTime,Second(dtmStartTime)),3)
	  else
		dtmEndTime = Now()
	  end if
'計算出考試試卷的得分
	  intMark = G_CONN.execute("select count(*) as recmark from prj_process P_P,subject "_
& "S where P_P.answer=S.answer and P_P.prjid=" & intPrjID & " and P_P.studentid=" _
& intStudentID & " and P_P.subid=S.id and (S.type=1 or S.type=3)")("recmark")
	  intMark = intMark + G_CONN.execute("select count(*)*2 as recmark from prj_process"_
& " P_P,subject S where P_P.answer=S.answer and P_P.prjid=" & intPrjID _
& " and P_P.studentid=" & intStudentID & " and P_P.subid=S.id and S.type=2")("recmark")
'將得分填入考試計劃考生表(prj_student)并修改考試狀態(tài)為已考
	  'G_CONN.execute "update prj_student set state=1,endtime=#" & dtmEndTime _
'& "#,mark=" & intMark & " where prjid=" & intPrjID & " and studentid=" & intStudentID
	  G_CONN.execute "update prj_student set state=1,endtime=#" & dtmEndTime _
& "#,mark=" & intMark & " where studentid=" & intStudentID      '2008年11月15日晚改,基于同一學(xué)生不能同時參加兩次考試考慮。
	  score = true
	end if
end function

'計算出考試試卷單選題的得分
function score1(intPrjID,intStudentID)
	score1 = G_CONN.execute("select count(*)*1 as recmark from prj_process P_P,subject S "_
    & " where P_P.answer=S.answer and P_P.prjid=" & intPrjID & " and P_P.studentid=" _
    & intStudentID & " and P_P.subid=S.id and S.type=1")("recmark")
end function

 '計算出考試試卷多選題的得分
function score2(intPrjID,intStudentID)
	score2 = G_CONN.execute("select count(*)*2 as recmark from prj_process P_P,subject S "_
    & " where P_P.answer=S.answer and P_P.prjid=" & intPrjID & " and P_P.studentid=" _
    & intStudentID & " and P_P.subid=S.id and S.type=2")("recmark")
end function

'計算出考試試卷是非題的得分
function score3(intPrjID,intStudentID)
	score3 =G_CONN.execute("select count(*)*1 as recmark from prj_process P_P,subject S"_
    & " where P_P.answer=S.answer and P_P.prjid=" & intPrjID & " and P_P.studentid="  _
    & intStudentID & " and P_P.subid=S.id and S.type=3")("recmark")
end function

function setscore(intPrjID,intStudentID)
    dim strSqlNew, rsNew, intDanX_score, intDuoX_score, intSF_score
    intDanX_score = score1(intPrjID,intStudentID)
    intDuoX_score = score2(intPrjID,intStudentID)
    intSF_score   = score3(intPrjID,intStudentID)
	strSqlNew = "select * from student_score"
	set rsNew = server.createobject("ADODB.Recordset")
	rsNew.open strSqlNew,G_CONN,1,3
	rsNew.addnew
	rsNew("studentid") = intStudentID
	rsNew("prjid") = intPrjID
	rsNew("DanX_score") = intDanX_score
	rsNew("DuoX_score") = intDuoX_score
	rsNew("SF_score") = intSF_score
	'rsNew("ZG_score") = intZG_score
	rsNew.update
	rsNew.close
end function
%>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清在线观看| 国产精品国产自产拍高清av王其| 婷婷夜色潮精品综合在线| 欧美日韩一区二区三区四区| 亚洲成人在线观看视频| 在线播放视频一区| 久久国产精品无码网站| 精品sm在线观看| 成人午夜看片网址| 亚洲精品免费一二三区| 欧美绝品在线观看成人午夜影视 | 欧美国产在线观看| 成人国产一区二区三区精品| 亚洲视频免费在线| 欧美一级高清大全免费观看| 国产麻豆9l精品三级站| 国产精品免费丝袜| 欧美丝袜丝nylons| 国产乱子轮精品视频| 中文字幕一区二区不卡| 91麻豆精品国产自产在线| 蜜臀a∨国产成人精品| 久久久久88色偷偷免费| 色菇凉天天综合网| 麻豆传媒一区二区三区| 综合久久国产九一剧情麻豆| 欧美精品精品一区| 成人午夜视频网站| 蜜臀久久99精品久久久久宅男| 中文在线资源观看网站视频免费不卡 | av不卡在线播放| 五月婷婷另类国产| 国产精品初高中害羞小美女文 | 91精品国产aⅴ一区二区| 国产乱码精品一区二区三| 一片黄亚洲嫩模| 久久夜色精品一区| 精品视频一区二区不卡| 国产大片一区二区| 视频一区在线播放| 中文字幕一区二区三| 精品sm在线观看| 欧美日本一道本在线视频| 成人伦理片在线| 精品一区二区三区免费毛片爱| 亚洲欧美电影院| 久久精品一区四区| 51午夜精品国产| 色噜噜狠狠色综合中国| 国产成人精品免费网站| 免费成人深夜小野草| 亚洲成av人在线观看| 国产精品欧美一区喷水| 久久综合成人精品亚洲另类欧美| 欧美偷拍一区二区| 色综合欧美在线| 成人av动漫在线| 国产精品资源在线观看| 麻豆成人av在线| 日韩成人伦理电影在线观看| 一区二区三区精品| 一区免费观看视频| 中文字幕在线免费不卡| 国产日本亚洲高清| 精品国产凹凸成av人导航| 欧美一区二区在线视频| 欧美肥妇bbw| 欧美日韩一二三| 欧美午夜一区二区三区免费大片| 成人va在线观看| www.亚洲在线| av中文字幕不卡| 91在线观看高清| 91在线云播放| 色丁香久综合在线久综合在线观看| 99re成人精品视频| 日本韩国一区二区三区| 91精品福利视频| 在线观看免费视频综合| 欧美在线免费观看亚洲| 欧美在线免费观看视频| 欧美日韩国产色站一区二区三区| 91福利国产成人精品照片| 在线一区二区视频| 69堂国产成人免费视频| 欧美刺激午夜性久久久久久久| 日韩一区二区免费电影| 精品国产伦一区二区三区免费| 日韩精品专区在线| 久久久三级国产网站| 中文字幕久久午夜不卡| 亚洲精品乱码久久久久| 三级欧美韩日大片在线看| 裸体在线国模精品偷拍| 成人免费毛片app| 91福利在线看| 欧美一级黄色片| 国产片一区二区| 亚洲精品国产a| 日本视频一区二区| 成人视屏免费看| 欧美天堂亚洲电影院在线播放| 在线播放欧美女士性生活| 2020国产精品自拍| 成人欧美一区二区三区1314| 亚洲一区二区在线免费看| 免费观看一级特黄欧美大片| 国产精品亚洲人在线观看| 99国内精品久久| 日韩欧美在线综合网| 欧美激情在线看| 五月婷婷激情综合| 国产成人精品一区二区三区网站观看 | 亚洲蜜桃精久久久久久久| 日日夜夜一区二区| 豆国产96在线|亚洲| 欧美日韩在线播放一区| 精品国产欧美一区二区| 亚洲日本成人在线观看| 老司机免费视频一区二区三区| 成人18精品视频| 日韩免费高清av| 亚洲免费观看高清完整版在线| 老司机精品视频线观看86| 99国产精品久久| 亚洲精品一区二区三区在线观看 | 美女国产一区二区| 日本久久精品电影| 久久久精品综合| 日韩黄色免费电影| 色综合久久久久久久久久久| 精品国产髙清在线看国产毛片| 一区二区三区四区国产精品| 欧美日韩高清一区二区不卡| 国产精品黄色在线观看| 亚洲国产经典视频| 人妖欧美一区二区| 在线观看网站黄不卡| 欧美国产亚洲另类动漫| 老司机免费视频一区二区三区| 在线这里只有精品| 中文字幕一区二区三区av| 国产精品18久久久久久vr| 欧美二区在线观看| 一区二区在线观看免费| 成人午夜激情视频| 国产人伦精品一区二区| 国产精品一区一区| 久久久久久久久久美女| 久久99精品久久只有精品| 日韩一区二区三区四区五区六区| 一区二区三区日韩精品视频| 成人黄色小视频| 国产精品每日更新在线播放网址| 国产福利91精品| 2023国产精华国产精品| 激情国产一区二区| 精品国产一区二区精华| 麻豆91精品视频| 精品美女在线观看| 奇米精品一区二区三区在线观看一| 欧美亚洲一区二区在线| 一区av在线播放| 欧美视频一区二区三区四区| 亚洲成人自拍网| 欧美日产在线观看| 午夜激情一区二区三区| 4hu四虎永久在线影院成人| 午夜精品国产更新| 欧美二区三区的天堂| 青青青伊人色综合久久| 日韩免费观看高清完整版| 极品少妇一区二区| 久久嫩草精品久久久精品一| 丁香婷婷综合激情五月色| 欧美国产精品一区二区三区| 成人午夜免费视频| 亚洲欧美另类在线| 欧美日韩国产一级二级| 日韩高清一区二区| 久久综合丝袜日本网| 国产69精品一区二区亚洲孕妇| 国产精品白丝在线| 欧美亚洲丝袜传媒另类| 青青草国产成人av片免费| 欧美mv日韩mv国产网站app| 国产精品一级黄| 亚洲欧洲精品天堂一级| 欧美午夜精品理论片a级按摩| 三级在线观看一区二区 | 久久精品国产秦先生| 久久久精品一品道一区| 91在线你懂得| 视频一区视频二区中文字幕| 久久久影视传媒| 色综合久久天天| 日韩黄色免费网站| 国产精品蜜臀在线观看| 欧美系列一区二区| 国产河南妇女毛片精品久久久|