📄 ad_photomanage.asp
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
Const PurviewLevel=2
Const CheckChannelID=4
Const PurviewLevel_Photo=3
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="ad_ChkPurview.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ad_code_Photo.asp"-->
<%
dim strFileName,FileName
const MaxPerPage=20
dim totalPut,CurrentPage,TotalPages
dim i,j
dim keyword,strField
dim sql,rsPhotoList
dim ClassID
dim PurviewChecked
dim strAdmin,arrAdmin
dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,ChildID,tID,tChild,ClassMaster
dim SkinID,LayoutID,BrowsePurview,AddPurview
dim ManageType
ManageType=trim(request("ManageType"))
PurviewChecked=false
FileName="ad_PhotoManage.asp"
ClassID=Trim(request("ClassID"))
keyword=trim(request("keyword"))
if keyword<>"" then
keyword=ReplaceBadChar(keyword)
end if
strField=trim(request("Field"))
if ClassID="" then
ClassID=0
if strField="" and AdminPurview=2 and AdminPurview_Photo=3 and ManageType<>"MyPhoto" then
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster,ClassID From PhotoClass where ClassMaster like '%" & AdminName & "%'")
do while not tClass.eof
if CheckClassMaster(tClass(6),AdminName)=true then
ClassName=tClass(0)
RootID=tClass(1)
ParentID=tClass(2)
Depth=tClass(3)
ParentPath=tClass(4)
Child=tClass(5)
ClassMaster=tClass(6)
ClassID=tClass(7)
PurviewChecked=True
exit do
end if
tClass.movenext
loop
end if
else
ClassID=CLng(ClassID)
end if
if ClassID>0 and PurviewChecked=False then
set tClass=conn.execute("select ClassName,RootID,ParentID,Depth,ParentPath,Child,ClassMaster From PhotoClass where ClassID=" & ClassID)
if tClass.bof and tClass.eof then
founderr=True
ErrMsg=ErrMsg & "<br><li>找不到指定的栏目</li>"
Call WriteErrMsg()
response.end
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
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
end if
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
if ManageType="MyPhoto" then
FileName=FileName & "?ManageType=" & ManageType
strFileName=FileName & "&ClassID=" & ClassID & "&strField=" & strField & "&keyword=" & keyword
else
strFileName=FileName & "?ClassID=" & ClassID & "&strField=" & strField & "&keyword=" & keyword
end if
%>
<html>
<head>
<title>图片管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="MicroPhoto FrontPage 3.0">
<link rel="stylesheet" type="text/css" href="ad_Style.css">
<SCRIPT language=javascript>
function unselectall()
{
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll"&&e.disabled==false)
e.checked = form.chkAll.checked;
}
}
function ConfirmDel()
{
if(document.myform.Action.value=="Del")
{
document.myform.action="ad_PhotoDel.asp";
if(confirm("确定要删除选中的图片吗?本操作将把选中的图片移到回收站中。必要时您可从回收站中恢复!"))
return true;
else
return false;
}
else
{
document.myform.action="ad_PhotoMove.asp";
if(document.myform.TargetClassID.value=="")
{
alert("不能将图片移动到含有子栏目的栏目或外部栏目中!");
return false;
}
if(confirm("确定要将选中的图片移动到指定的栏目吗?"))
return true;
else
return false;
}
}
</SCRIPT>
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="topbg">
<td height="22" colspan="2" align="center"><strong>图 片 管 理</strong></td>
</tr>
<tr class="tdbg">
<td width="70" height="30" ><strong>管理导航:</strong></td>
<td><a href="ad_PhotoManage.asp">图片管理首页</a> | <a href="ad_PhotoAdd.asp">添加图片</a> | <a href="ad_PhotoCheck.asp">审核图片</a> |
<%if AdminPurview=1 or AdminPurview_Photo=1 then %><a href="ad_PhotoRecyclebin.asp">图片回收站管理</a> | <a href="ad_PhotoComment.asp">图片评论管理</a><%end if%>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="title">
<td height="22"><%call Admin_ShowRootClass()%></td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22"><%call Admin_ShowPath("图片管理")%></td>
<td width="200" height="22" align="right">
<select name='JumpClass' id="JumpClass" onchange="if(this.options[this.selectedIndex].value!=''){location='<%=FileName & "?ClassID="%>'+this.options[this.selectedIndex].value;}">
<option value='' selected>跳转栏目至…</option>
<%call admin_ShowClass_Option(2,0)%>
</select>
</td>
</tr>
</table>
<%
sql="select P.PhotoID,P.ClassID,C.ClassName,P.PhotoName,P.Keyword,P.Author,P.UpdateTime,P.Editor,P.Hits,P.PhotoUrl_Thumb,P.PhotoSize,P.OnTop,P.Elite,P.Passed,P.Stars,P.PhotoLevel,P.PhotoPoint from Photo P"
sql=sql & " inner join PhotoClass C on P.ClassID=C.ClassID where P.Deleted=False"
if ClassID>0 then
if Child>0 then
ChildID=""
if Depth<=0 then
set tClass=conn.execute("select ClassID from PhotoClass where ParentID=" & ClassID & " or ParentPath like '" & ClassID & ",%'")
else
set tClass=conn.execute("select ClassID from PhotoClass where ParentID=" & ClassID & " or ParentPath like '" & ParentPath & "," & ClassID & ",%'")
end if
do while not tClass.eof
if ChildID="" then
ChildID=tClass(0)
else
ChildID=ChildID & "," & tClass(0)
end if
tClass.movenext
loop
sql=sql & " and P.ClassID in (" & ChildID & ")"
else
sql=sql & " and P.ClassID=" & ClassID
end if
end if
if ManageType="MyPhoto" then
sql=sql & " and P.Editor='" & AdminName & "' "
else
if keyword<>"" then
select case strField
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -