📄 checkuser.asp
字号:
<%
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>
<style type="text/css">
<!--
.style1 {
color: #F2F2F2;
font-weight: bold;
font-size: 36px;
}
-->
</style>
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0>
<br><br>
<table cellpadding=0 cellspacing=0 border=0 width=90% align=center>
<tr>
<td>
<table width=100% border=0 cellpadding=1 cellspacing=0 background="images/backimage.gif">
<tr align="center">
<td width="100%"><span class="style1">遇上麻烦了!</span></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%"> <a href="javascript:history.go(-1)"><font color="#000000">
返回上一页</font></a> <a href="default.asp">重新登陆</a></td>
</tr>
</table> </td></tr></table>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -