<%
dim founderror,errormsg,susername,suserpwd,objrs,StrSQl
founderror=false
susername=session("studentname")
suserpwd=session("studentpassword")
if susername="" or suserpwd="" then
	Errormsg=Errormsg+"<br>"+"<li>对不起，您还没有登录或以超时!"
	founderror=true
else
	Set objrs = Server.CreateObject("ADODB.Recordset")
	StrSQL = "Select * from student where studentname='"&susername&"'"
	objrs.open StrSQL,conn,1,1
	if objrs.EOF then
		Errormsg=Errormsg+"<br>"+"<li>用户名不存在!"
		founderror=true
	elseif suserpwd<>objrs("studentpassword") then
		Errormsg=Errormsg+"<br>"+"<li>密码错误!"
		founderror=true
	end if
	objrs.close
	set objrs=nothing
end if
if founderror=true then
	call disperrs()
	response.end
end if
sub disperrs()
%>
<html><head>
<title>网上考试系统——错误提示</title>
<link rel=stylesheet type=text/css href=txl.css>
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0>


<br><br>
    <table cellpadding=0 cellspacing=0 border=0 width=90% bgcolor="#0099cc" align=center>
        <tr>
            <td>
                <table cellpadding=5 cellspacing=1 border=0 width=100%>
    <tr align="center"> 
      <td width="100%" bgcolor="#99ccff"><font color="#000000"><b>错误信息</b></font></td>
    </tr>
    <tr> 
          <td width="100%"><font color="#000000">
            <b>产生错误的原因可能是：</b><br><br>
           <%=errormsg%><br>
              <br></font>
      </td>
    </tr>
    <tr align="center"> 
      <td width="100%" bgcolor="#99ccff">
<a href="javascript:history.go(-1)"><font color="#000000"> << 返回上一页</font></a>
      </td>
    </tr>  
    </table>   </td></tr></table>
<%
end sub
%>