chkadmin.asp
来自「结合了某度和AH的个人主页 功能比较完整」· ASP 代码 · 共 29 行
ASP
29 行
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%dim admin,password
admin=replace(trim(request("admin")),"'","")
password=md5(replace(trim(request("password")),"'",""))
if admin="" or password="" then
response.Write "<center><a href=index.asp><font color=red size=2>对不起,登陆失败,请检查您的登陆名和密码</font></a></center>"
response.end
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from admin where name='"&admin&"' and pass='"&password&"' " ,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("pass") then
session("admin")=trim(rs("name"))
session("flag")=int(rs("flag"))
session.Timeout=20
rs.Close
set rs=nothing
response.Redirect "manage.asp"
else
response.write "<script LANGUAGE='javascript'>alert('对不起,登陆失败!');window.location.reload('javascript:history.go(-1)')</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('对不起,登陆失败!');window.location.reload('javascript:history.go(-1)')</script>"
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?