📄 check.asp
字号:
<!--#include file="purviewID.asp"-->
<%
if session("admin_ID")="" or session("admin_username") ="" then
Response.write "<script language='javaScript'>top.location.href='login.asp';</script>"
response.End()
end if
'管理员帐号、ID检查
function chk_manager()
dim sql,rs,flag
sql= "select id from [admin] where [username]='" & session("admin_username") & "' and [ID]=" & session("admin_ID")
set rs = Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
if rs.EOF then
flag=true
end if
rs.close
set rs=nothing
if flag then
conn.close
set conn=nothing
Response.write "<script language='javaScript'>top.location.href='login.asp';</script>"
response.End()
end if
end function
'管理员权限检查
Function purview_chk(purview_ID)
dim flag
flag=true
if session("admin_sa") then
flag=false
elseif InStr(session("admin_flag"),purview_ID)>0 then
flag=false
end if
if flag then
conn.close
set conn=nothing
response.Redirect("inc/error.htm")
response.End()
end if
End Function
'目录树显示检查
Function tschk(purview_ID)
dim flag
if session("admin_sa") then
flag=true
elseif InStr(session("admin_flag"),purview_ID)>0 then
flag=true
end if
tschk = flag
End Function
'产品添加检查
function product_limit()
dim rs
set rs=conn.execute("select count(*) from product")
product_limit=rs(0)
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -