?? 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>
</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
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -