📄 admin.asp
字号:
<!--#include file="../inc/conn.asp"-->
<%
if Request.Cookies("name")="" or Request.Cookies("pwd")="" or Request.Cookies("flag")="" then
Response.write"<script>alert('对不起,您还没有登录或登录超时,请重新登录!');top.location.href='login.asp'</script>"
response.End
end if
set rs2=Server.CreateObject("adodb.recordset")
sql2="select * from manage_user where username='"&Request.Cookies("name")&"' and lock=0"
rs2.open sql2,conn,1,1
if rs2.eof and rs2.bof then
Response.Cookies("name")=""
Response.Cookies("pwd")=""
Response.Cookies("time")=""
Response.Cookies("flag")=""
response.redirect("../error.asp?error=other")
response.End
end if
function chk_admin_login(chk_flag)
if cint(Request.Cookies("flag")) < chk_flag then
response.Write("<script>alert('对不起,您没有权限执行此操作!');location.href='javascript:history.back()'</script>")
response.End()
end if
end function
if request("action")="loginout" then
response.buffer=true
response.expires=0
Response.Cookies("name")=""
Response.Cookies("pwd")=""
Response.Cookies("time")=""
Response.Cookies("flag")=""
Response.write "<script>alert('已经成功退出!');top.location.href='login.asp'</script>"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -