📄 check_fun.asp
字号:
<%
'新版权限检察
call CheckFun()
sub CheckFun()
if FunCode="FFFF" then '任何用户可不登录执行
exit sub
end if
'检察用户是否登录
if session("username")="" then
session("mesg")="请先登录"
response.write "请先登录"
response.end
'call Check_FunErr(session("mesg"))
end if
'检察是否具有该模块的权限
'任何已登录的客户可执行模块
if FunCode="F000" then
exit sub
end if
'需要该订单的本人或其管理员权限
if FunCode="F001" then
if FunID="" then
call Check_FunErr("对不起,ID不能为空")
end if
if mid(session("IsAdmin"),1,1)="Y" then
exit sub
end if
set rst = conn.execute ("select * from " & FunTable &" where ID='" & FunID &"' and (userName='"&session("username")&"' or (username in (select username from [user] where username='"&session("username")&"'))) ")
if rst.eof then
call Check_FunErr("对不起,没有该项业务权限")
end if
rst.close
exit sub
end if
'需要系统管理员权限的模块
if FunCode="F999" then
if left(session("IsAdmin"),1)<>"Y" then
call Check_FunErr("对不起,没有该项业务权限")
end if
exit sub
end if
'普通功能模块
if instr(session("UFunCode"),","&FunCode&",") < 1 then
session("mesg")=session("FunCode")&"对不起,你没有该项业务权限"
call Check_FunErr(session("mesg"))
end if
end sub
sub Check_FunErr (mesg)
%>
<script language='javascript'>
<!--
alert('<%=mesg%>');
history.go(-1);
-->
</script>
<%
response.end
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -