网站后台为后 帐号检查代码 问题求助
Microsoft JET Database Engine ���� '80040e21' �ֶ�̫С�����ܽ�����Ҫ���ӵ����ݵ����������Ų�����ճ�����ٵ����ݡ�
/ameav/CheckLogin.asp���� 75
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<HTML xmlns="http://www.
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2006-2010 - />
<META NAME="Author" CONTENT="" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>检查管理登录</TITLE>
</HEAD>
<!--#include file="../Include/Const.asp"-->
<!--#include file="../Include/ConnSiteData.asp"-->
<!--#include file="../Include/Md5.asp"-->
<BODY>
<%
dim LoginName,LoginPassword,AdminName,Password,AdminPurview,Working,UserName,rs,sql
LoginName=trim(request.form("LoginName"))
LoginPassword=Md5(request.form("LoginPassword"))
set rs = server.createobject("adodb.recordset")
sql="select * from Ameav_Admin where AdminName='"&LoginName&"'"
rs.open sql,conn,1,3
if rs.eof then
response.write "<script language=javascript> alert('管理员名称不正确,请重新输入。');location.replace('AdminLogin.asp');</script>"
response.end
else
AdminName=rs("AdminName")
Password=rs("Password")
AdminPurview=rs("AdminPurview")
Working=rs("Working")
UserName=rs("UserName")
end if
if LoginPassword<>Password then
response.write "<script language=javascript> alert('管理员密码不正确,请重新输入。');location.replace('AdminLogin.asp');</script>"
response.end
end if
if session("CheckCode")<>request("CheckCode") then
response.write "<script language=javascript> alert('您输入验证码错误,请返回重新登录!');location.replace('AdminLogin.asp');</script>"
response.end
end if
if not Working then
response.write "<script language=javascript> alert('不能登录,此管理员帐号已被锁定。');location.replace('AdminLogin.asp');</script>"
response.end
end if
if LoginName=AdminName and LoginPassword=Password then
rs("LastLoginTime")=now()
rs("LastLoginIP")=Request.ServerVariables("Remote_Addr")
rs.update
session("AdminName")=AdminName
session("UserName")=UserName
session("AdminPurview")=AdminPurview
session("LoginSystem")="Succeed"
'session.timeout=30
rs.close
set rs=nothing
'==================================
dim LoginIP,LoginTime,LoginSoft
LoginIP=Request.ServerVariables("Remote_Addr")
LoginSoft=Request.ServerVariables("Http_USER_AGENT")
LoginTime=now()
'====================================
set rs = server.createobject("adodb.recordset")
sql="select * from Ameav_AdminLog"
rs.open sql,conn,1,3
rs.addnew
rs("AdminName")=AdminName
rs("UserName")=UserName
rs("LoginIP")=LoginIP
rs("LoginSoft")=LoginSoft
rs("LoginTime")=LoginTime
rs.update
rs.close
set rs=nothing
'========================================
response.redirect "main.asp"
response.end
end if
%>
</BODY>
</HTML>