📄 ad_softproperty.asp
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=3
Const PurviewLevel_Soft=3
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="ad_ChkPurview.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ad_code_soft.asp"-->
<%
dim SoftID,Action,sqlProperty,rsProperty,FoundErr,ErrMsg,PurviewChecked
dim ClassID,tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,ChildID,tID,tChild,ClassMaster
SoftID=trim(request("SoftID"))
Action=Trim(Request("Action"))
FoundErr=False
if SoftId="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请先选定软件!</li>"
end if
if Action="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
end if
if FoundErr=False then
call SetProperty()
end if
if FoundErr=False then
call CloseConn()
response.Redirect ComeUrl
else
call CloseConn()
call WriteErrMsg()
end if
sub SetProperty()
if instr(SoftID,",")>0 then
SoftID=replace(SoftID," ","")
sqlProperty="select * from Soft where SoftID in (" & SoftID & ")"
else
SoftID=Clng(SoftID)
sqlProperty="select * from Soft where SoftID=" & SoftID
end if
Set rsProperty= Server.CreateObject("ADODB.Recordset")
rsProperty.open sqlProperty,conn,1,3
do while not rsProperty.eof
PurviewChecked=False
ClassID=rsProperty("ClassID")
if AdminPurview=1 or AdminPurview_Soft<=2 then
PurviewChecked=True
else
if Action="SetPassed" or Action="CancelPassed" then
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassChecker From SoftClass where ClassID=" & ClassID)
else
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster From SoftClass where ClassID=" & ClassID)
end if
if tClass.bof and tClass.eof then
founderr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
else
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
Child=tClass(5)
ClassMaster=tClass(6)
PurviewChecked=CheckClassMaster(tClass(6),AdminName)
if PurviewChecked=False and ParentID>0 then
if Action="SetPassed" or Action="CancelPassed" then
set tClass=conn.execute("select ClassChecker from SoftClass where ClassID in (" & ParentPath & ")")
else
set tClass=conn.execute("select ClassMaster from SoftClass where ClassID in (" & ParentPath & ")")
end if
do while not tClass.eof
PurviewChecked=CheckClassMaster(tClass(0),AdminName)
if PurviewChecked=True then exit do
tClass.movenext
loop
end if
end if
end if
if PurviewChecked=False then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>对 " & rsProperty("SoftID") & " 没有操作权限!</li>"
else
select case Action
case "SetOnTop"
rsProperty("OnTop") = True
case "CancelOnTop"
rsProperty("OnTop") = False
case "SetElite"
rsProperty("Elite") = True
case "CancelElite"
rsProperty("Elite") = False
case "SetPassed"
rsProperty("Passed") =True
'conn.execute("update [User] set SoftChecked=SoftChecked+1 where UserName='" & rsProperty("Editor") & "'")
case "CancelPassed"
rsProPerty("Passed") =False
'conn.execute("update [User] set SoftChecked=SoftChecked-1 where UserName='" & rsProperty("Editor") & "'")
end select
rsProperty.update
end if
rsProperty.movenext
loop
rsProperty.close
set rsProperty=nothing
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -