%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=4
Const PurviewLevel_Photo=3
%>
<%
dim PhotoID,rsPhoto,sql,FoundErr,ErrMsg,PurviewChecked
dim ClassID,tClass,ClassName,RootID,ParentID,Depth,ParentPath,ClassMaster
dim SkinID,LayoutID,SkinCount,LayoutCount,BrowsePurview,AddPurview
PurviewChecked=False
FoundErr=False
PhotoID=trim(request("PhotoID"))
if PhotoID="" then
FoundErr=True
ErrMsg=ErrMsg & "
请指定要修改的图片ID
"
call WriteErrMsg()
call CloseConn()
response.end
else
PhotoID=CLng(PhotoID)
end if
sql="select * from Photo where PhotoID=" & PhotoID & ""
Set rsPhoto= Server.CreateObject("ADODB.Recordset")
rsPhoto.open sql,conn,1,1
if rsPhoto.bof and rsPhoto.eof then
FoundErr=True
ErrMsg=ErrMsg & "
找不到图片
"
call WriteErrMsg()
else
ClassID=rsPhoto("ClassID")
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,ClassMaster From PhotoClass where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
founderr=True
ErrMsg=ErrMsg & "
找不到指定的栏目
"
else
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
ClassMaster=tClass(5)
end if
if rsPhoto("Editor")=AdminName and rsPhoto("Passed")=False then
PurviewChecked=True
else
if AdminPurview=1 or AdminPurview_Photo<=2 then
PurviewChecked=True
else
PurviewChecked=CheckClassMaster(ClassMaster,AdminName)
if PurviewChecked=False and ParentID>0 then
set tClass=conn.execute("select ClassMaster from PhotoClass where ClassID in (" & ParentPath & ")")
do while not tClass.eof
PurviewChecked=CheckClassMaster(tClass(0),AdminName)
if PurviewChecked=True then exit do
tClass.movenext
loop
end if
end if
if PurviewChecked=False then
FoundErr=True
ErrMsg=ErrMsg & "
对不起,您的权限不够,不能修改此张图片!
"
end if
end if
end if
if FoundErr=True then
call WriteErrMsg()
else
%>
修改图片
<%
end if
rsPhoto.close
set rsPhoto=nothing
call CloseConn()
%>