Statement <%
N=0
Adminid=request ("Adminid")
Password=request ("password")
If adminid= "" then%>
<script language=vbscript>
MsgBox "ERROR: Please enter administrator username!" "
Location.href = "Javascript:history.back ()"
</script>
<%elseif password= "" then%>
<script language=vbscript>
MsgBox "Error: Please enter your password!" "
Location.href = "Javascript:history.back ()"
</script>
<%end if%>
<!--#include file= "connect.asp"-->
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<%
Timeout value for ' session.timeout=10 ' Session object
' On Error Resume Next
Set conn = Server.CreateObject ("ADODB. Connection ")
Conn. Open "Driver={microsoft Access Driver (*.mdb)}; Dbq= "& Server.MapPath (" Examination.mdb ")
Set rs = Server.CreateObject ("ADODB.") Recordset ")
%>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<%rs. Open "Select * from admin where adminid= '" &adminID& "", Conn, 3,3%>
<% if Rs.bof or rs.eof then%>
<script language=vbscript>
MsgBox "ERROR: The username does not exist, please make sure you are an administrator!" "
Location.href = "Javascript:history.back ()"
</script>
<% ElseIf rs ("password") <>password then%>
<% If RS ("Landing times") >3 then%>
<script language=vbscript>
MsgBox error: Too many logons! The system will shut down! "
Location.href= "Javascript:window.close ()"
</script>
<% Else%>
<script language=vbscript>
MsgBox "<% =rs (" Login Times ")%> error: This password is incorrect, please make sure you are the administrator! "
Location.href = "Javascript:history.back ()"
</script>
<%
RS ("Landing times") =rs ("Landing times") +1
Rs.update
End If
Else
RS ("Landing times") =0
Rs.update
Session ("Logstatus") =1 ' Log login status
Response.Redirect "Admin.asp"
End If
Conn.close
Set rs=nothing
%>