📄 admin_checkmana.asp
字号:
<%if session("username")="" or session("userkey")="" then
response.redirect "../../"
end if%>
<%
Path=Request.ServerVariables("PATH_INFO")
Num=len(path)-instrRev(Path,"/")
FileName=lcase(right(path,Num))
Name=session("Name")
PassWord=session("PassWord")
Userid=session("Userid")
if name="" then Response.redirect"../login.asp"
set CheckUser = server.createobject("adodb.recordset")
' sql = "select purview,Class,SetClass,SetTemplet,SetFile,SetRecycle from admin where UserName='"&Name&"' and password='"&PassWord&"'"
sql = "select purview,SystemSet,Class,setauditing from users where UserName='"&Name&"' and password='"&PassWord&"'"
CheckUser.open sql,conn,1,1
Purview=CheckUser("purview")
select case Purview
case "总编辑"
Call CheckPurview
case "录入员"
Call ClassPurview
Call CheckPurview
end select
Sub CheckPurview()
select case FileName
case "admin_classmanage.asp","admin_classsave.asp","admin_classmodify.asp","admin_classgo.asp"
if instr(1,SystemSet,"Category")=0 then
Call Wran("栏目管理")
end if
case "admin_templetmanage.asp","admin_templetmodify.asp","admin_templetGo.asp","admin_temptoindex.asp"
if instr(1,SystemSet,"Category")=0 then
Call Wran("模板(FSO)管理")
end if
case "admin_picmanage.asp"
Call Wran("图片管理")
case "setup.asp"
Call Wran("参数设置")
case "admin_log.asp"
Call Wran("日志管理")
case "admin_map.asp"
Call Wran("FSO网站地图管理")
case "admin_delall.asp"
Call Wran("FSO删除全部HTM管理")
case "admin_jsmanage.asp"
Call Wran("(JS管理)你没有权限")
case "admin_special.asp"
Call Wran("专题管理")
case "admin_backupdatabase.asp"
Call Wran("数据备份")
case "register.asp"
Call Wran("输入注册号")
case "admin_ann.asp"
Call wran("公告管理")
case "admin_classorder.asp"
call wran("大类排序")
case "admin_totemplet.asp"
call wran("捆绑模板")
case "admin_daohangjs.asp"
call wran("生成导航条")
case "admin_jsadd.asp"
call wran("JS添加")
end select
End Sub
Sub ClassPurview()
SmallClassCN=trim(request.querystring("SmallClassCN"))
if request.querystring("newsID")<>"" then
set rs=conn.execute("select SmallClassCN from News where NewsID="&request.querystring("newsID")&"")
if not rs.eof then SmallClassCN=rs("SmallClassCN")
rs.close
set rs=nothing
end if
if SmallClassCN="" then SmallClassCN=request.form("SmallClassCN")
ClassCot=split(CheckUser("Class"),",")
FondError=true
for i=0 to Ubound(ClassCot)
if SmallClassCN=trim(ClassCot(i)) then
FondError=false
exit for
end if
next
if FondError=true then
if SmallClassCN<>"" then
Call Wran("操作"&SmallClassCN&"")
else
Call CheckPurview
end if
end if
End Sub
Sub CheckAuditing
select case Purview
case "总编辑"
if instr(1,SystemSet,"Auditing")=0 then Call Wran("没有审核新闻"):response.end
case "录入员"
if auditing=false then Call Wran("没有审核新闻"):response.end
end select
End Sub
Sub CheckAD
select case Purview
case "总编辑"
if instr(1,SystemSet,"AdsManage")=0 then Call Wran("广告管理"):response.end
case "录入员"
Call Wran("广告管理")
response.end
end select
End Sub
Sub AuditingStat
select case Purview
case "总编辑"
if instr(1,SystemSet,"Auditing")=0 then response.write "Class=InputStyle Disabled"
case "录入员"
if auditing=false then response.write "Class=InputStyle Disabled"
end select
End Sub
Sub Wran(content)
CheckUser.close
set CheckUser=nothing
response.redirect"err.asp?msg="&content&""
response.end
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -