<%@ Language=VBScript %>
<%
if Request.ServerVariables("http_method")="POST" then
if Request.Form("submit")="进入1" then
'学生进入网络考场的处理
set conn=server.CreateObject("adodb.connection")
conn.ConnectionString="dsn=testsys"
'连接并打开数据库
conn.open
strsql="select * from studentinfo where stid='" & Request.Form("stid") & "' and stname='" & Request.Form("stname") & "'"
set mrs=conn.Execute(strsql)
if not mrs.bof and not mrs.eof then
'如果数据库中存在该学生的记录进入网络考场
'并用session属性存储学生的姓名与学号
session("stid")=Request.Form("stid")
session("stname")=Request.Form("stname")
Response.Redirect "stselectsub.asp"
set mrs=nothing
else
'如果数据库中不存在该学生的信息,显示的页面仍为logon.asp,并提示信息
Response.Write "学生姓名与学号输入错误!!"
end if
conn.Close
网络考场(1)(转)logon.asp
时间: 2024-12-27 22:20:18
网络考场(1)(转)logon.asp的相关文章
网络考场(4)(转)smessage.asp
<%@ Language=VBScript %><%'计算考试已过时间gotime=hour(now())*60+minute(now())-hour(session("starttime"))*60-minute(session("starttime"))'计算考试剩余时间lefttime=session("testtime")-gotime%><HTML><HEAD><META http-
网络考场(6)(转)stselectsub.asp
select|网络 <%@ Language=VBScript %><%if Request.Form("selsub")<>"" then'如果选择了考科目,则进入考试界面 marray=split(Request.Form("selsub"),",") '保存考试科目的教师编号 session("teachid")=trim(marray(0)) '
网络考场(2)(转)screatefrm1.asp
<%@ Language=VBScript %><html><head><title>网络考场</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><frameset rows="*" cols="120,509*" borde
网络考场(13)(转)testtop.asp
网络 <%@ Language=VBScript %><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY><P align=center><STRONG><FONT color=crimson face=幼圆 size=4>网络考场:<
网络考场(7)(转)taddquestion.asp
网络 <%@ Language=VBScript %><%if Request.ServerVariables("http_method")="POST" then if Request.Form("submit")="加入" then '处理加入试题请求 set mrs=server.CreateObject("adodb.recordset")
网络考场(16)(转)tselectsub.asp
select|网络 <%@ Language=VBScript %><%Response.Buffer=true%><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY bgColor=Azure><%if Request.QueryString("a
网络考场(10)(转)tcreatefrm2.asp
网络 <%@ Language=VBScript %><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><frameset rows="*" cols="120,
网络考场(8)(转)taddstudent.asp
网络 <%@ Language=VBScript %><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY><%if Request.ServerVariables("http_method")="POST" and Request.
网络考场(15)(转)tselcourse.asp
网络 <%@ Language=VBScript %><HTML><HEAD><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"></HEAD><BODY><P align=center><FONT color=crimson face=幼圆 size=4><STRONG>选择要查看的课程&