verification.asp

来自「这是一个用ASP写的在线考试系统.特别一点 就是考试试卷有两种考法,一种为系统」· ASP 代码 · 共 46 行

ASP
46
字号

<!--#include file="safe.asp" -->

<!--#include file="conn2.asp"-->
<%
selectTryT=trim(request("selectTry"))
'response.Write(selectTryT)
'response.End()
'on error resume next
Session("stuFlag")=0
stu_numT=trim(request("stu_numT"))
'rsTs_submit为提交0,1,2
loginSql="select * from Verification where STU_NUM='"&stu_numT&"'"
'loginSql="select * from Verification"
'response.Write(loginSql)
'response.End()
set rsT=Conn.execute(loginSql)
if rsT.eof then
	Session("onlinehelp")="没有这样的学号!"
	response.redirect("loginWrong.asp")
end if

Session("NumT_Stu")=rsT("STU_NUM")
Session("NameT_Stu")=rsT("STU_NAME")
loginFlag=rsT("STU_LOGIN")
submitFlag=rsT("STU_SUBMIT")
'response.Write(loginFlag&submitFlag)
'response.End()
if loginFlag="0" and submitFlag="0" then
	updateSql="update verification set STU_LOGIN='1'  where STU_NUM='"&stu_numT&"'"
	set rsT=Conn.execute(updateSql)
	stuIP=request.servervariables("remote_addr")
	updateSql="update verification set STU_IPADD='"&stuIP&"' where STU_NUM='"&stu_numT&"'"
	set rsT=Conn.execute(updateSql)
	Session("stuFlag")	=1	
	Session("selectTryId")=selectTryT
	server.Transfer("agreement.asp")
else
	Session("onlinehelp")="你可能已登录或已提交!"
	response.redirect("listScore.asp")
end if

conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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