%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=4
Const PurviewLevel_Photo=3
%>
<%
dim PhotoID,sql,rs,FoundErr,ErrMsg,PurviewChecked,PurviewChecked2
dim ClassID,tClass,ClassName,RootID,ParentID,ParentPath,Depth,ClassMaster,ClassChecker
PhotoID=trim(request("PhotoID"))
FoundErr=False
PurviewChecked=False
PurviewChecked2=False
call main()
if FoundErr=True then
WriteErrMsg()
end if
call CloseConn()
sub main()
if PhotoId="" then
FoundErr=True
ErrMsg=ErrMsg & "
参数不足
"
exit sub
else
PhotoID=Clng(PhotoID)
end if
sql="select * from Photo where Deleted=False and PhotoID=" & PhotoID & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "
找不到文章
"
else
ClassID=rs("ClassID")
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,ClassMaster,ClassChecker 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)
ClassChecker=tClass(6)
end if
set tClass=nothing
end if
if FoundErr=True then
rs.close
set rs=nothing
exit sub
end if
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
PurviewChecked2=CheckClassMaster(ClassChecker,AdminName)
if PurviewChecked2=False and ParentID>0 then
set tClass=conn.execute("select ClassMaster from PhotoClass where ClassID in (" & ParentPath & ")")
do while not tClass.eof
PurviewChecked2=CheckClassMaster(tClass(0),AdminName)
if PurviewChecked2=True then exit do
tClass.movenext
loop
end if
end if
%>
<%=rs("PhotoName")%>
<%
response.write "您现在的位置: 图片管理 >> "
if ParentID>0 then
dim sqlPath,rsPath
sqlPath="select ClassID,ClassName From PhotoClass where ClassID in (" & ParentPath & ") order by Depth"
set rsPath=server.createobject("adodb.recordset")
rsPath.open sqlPath,conn,1,1
do while not rsPath.eof
response.Write "" & rsPath(1) & " >> "
rsPath.movenext
loop
rsPath.close
set rsPath=nothing
end if
response.write "" & ClassName & " >> "
response.write "" & dvhtmlencode(rs("PhotoName")) & ""
%>
图片大小:
<%= rs("PhotoSize") & " K" %>
<%
if FoundErr<>True then
response.write ""
else
response.write ""
end if%>
<%
if FoundErr=True then
response.write ErrMsg
else
response.write "图片地址一" & ""
if rs("PhotoUrl2")<>"" then response.write " 图片地址二" & ""
if rs("PhotoUrl3")<>"" then response.write " 图片地址三" & ""
if rs("PhotoUrl4")<>"" then response.write " 图片地址四" & ""
end if
%>
<%
if (rs("Editor")=AdminName and rs("Passed")=False) or PurviewChecked=True then
response.write "修改 "
response.write "删除 "
end if
if AdminPurview=1 or AdminPurview_Photo<=2 then
response.write "移动 "
end if
if PurviewChecked2=True then
if rs("Passed")=false then
response.write "通过审核 "
Else
response.write "取消审核 "
end if
end if
if PurviewChecked=True then
if rs("OnTop")=false then
response.write "固顶 "
else
response.write "解固 "
end if
if rs("Elite")=false then
response.write "设为推荐"
else
response.write "取消推荐"
end if
end if
%>