📄 checkadmin.asp
字号:
<%
dim founderror,errormsg,sname,spwd,objrs,StrSQl
founderror=false
sname=session("name")
spwd=session("password")
if sname="" or spwd="" then
Errormsg=Errormsg+"<br>"+"<li>对不起,您还没有登录或以超时!"
founderror=true
else
Set objrs = Server.CreateObject("ADODB.Recordset")
StrSQL = "Select * from admin where name='"&sname&"'"
objrs.open StrSQL,conn,1,1
if objrs.EOF then
Errormsg=Errormsg+"<br>"+"<li>用户名不存在!"
founderror=true
elseif spwd<>objrs("password") 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>
<li>对不起,你不是管理员,请退出!<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
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -