⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ad_photorecyclebin.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true	
Const PurviewLevel=2
Const CheckChannelID=4
Const PurviewLevel_Photo=1
%>
<!--#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 strAdmin,arrAdmin
dim tClass,ClassName,RootID,ParentID,Depth,ParentPath,Child,ChildID,tID,tChild,ClassMaster
dim ManageType
ManageType=trim(request("ManageType"))
FileName="ad_PhotoRecyclebin.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
else
	ClassID=CLng(ClassID)
end if
if ClassID>0 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)
	end if
end if
strFileName=FileName & "?ClassID=" & ClassID & "&strField=" & strField & "&keyword=" & keyword
if request("page")<>"" then
    currentPage=cint(request("page"))
else
	currentPage=1
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.checked = form.chkAll.checked;
    }
  }
function ConfirmDel()
{
	if(document.myform.Action.value=="ConfirmDel")
	{
		if(confirm("确定要彻底删除选中的图片吗?一旦删除将不能恢复!"))
			return true;
		else
			return false;
	}
	else if(document.myform.Action.value=="ClearRecyclebin")
	{
		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="5" cellspacing="0" 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_PhotoRecyclebin.asp">回收站管理首页</a> | <a href="ad_PhotoDel.asp?Action=ClearRecyclebin" onclick="return confirm('确定要清空回收站吗?一旦清空将无法恢复!');">清空回收站</a> 
      | <a href="ad_PhotoDel.asp?Action=RestoreAll" onclick="return confirm('确定还原回收站中的所有图片?');">还原回收站中的所有图片</a></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=True"
if ClassID>0 then
	if Child>0 then
		ChildID=""
		set tClass=conn.execute("select ClassID from PhotoClass where ParentID=" & ClassID & " or ParentPath like '" & ParentPath & "," & ClassID & ",%'")
		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 strField<>"" then
	if keyword<>"" then
		select case strField
		case "PhotoName"
			sql=sql & " and P.PhotoName like '%" & keyword & "%' "
		case "PhotoIntro"
			sql=sql & " and P.PhotoIntro like '%" & keyword & "%' "
		case "Author"
			sql=sql & " and P.Author like '%" & keyword & "%' "
		case "Editor"
			sql=sql & " and P.Editor like '%" & keyword & "%' "
		case else
			sql=sql & " and P.PhotoName like '%" & keyword & "%' "
		end select
	end if
end if
sql=sql & " order by P.PhotoID desc"

Set rsPhotoList= Server.CreateObject("ADODB.Recordset")
rsPhotoList.open sql,conn,1,1
if rsPhotoList.eof and rsPhotoList.bof then
	totalPut=0
	if Child=0 then
		response.write "<p align='center'><br>没有任何被删除的图片!<br></p>"
	else
		response.write "<p align='center'><br>此栏目的下一级子栏目中没有任何被删除的图片!<br></p>"
	end if
else
   	totalPut=rsPhotoList.recordcount
	if currentpage<1 then
   		currentpage=1
   	end if
   	if (currentpage-1)*MaxPerPage>totalput then
   		if (totalPut mod MaxPerPage)=0 then
     		currentpage= totalPut \ MaxPerPage
	  	else
	      	currentpage= totalPut \ MaxPerPage + 1
   		end if
   	end if
    if currentPage=1 then
       	showContent
       	showpage strFileName,totalput,MaxPerPage,true,true,"张图片"
 	else
     	if (currentPage-1)*MaxPerPage<totalPut then
       	   	rsPhotoList.move  (currentPage-1)*MaxPerPage
       		dim bookmark
           	bookmark=rsPhotoList.bookmark
            showContent
            showpage strFileName,totalput,MaxPerPage,true,true,"张图片"
       	else
	        currentPage=1
           	showContent
          	showpage strFileName,totalput,MaxPerPage,true,true,"张图片"
	    end if
	end if
end if
rsPhotoList.close
set rsPhotoList=nothing  


sub showContent
   	dim PhotoNum
    PhotoNum=0
%>
<table width='100%' border="0" cellpadding="0" cellspacing="0"><tr>
    <form name="myform" method="Post" action="ad_PhotoDel.asp" onsubmit="return ConfirmDel();">
     <td><table class="border" border="0" cellspacing="1" width="100%" cellpadding="0">
          <tr class="title" height="22"> 
            <td height="22" width="30" align="center"><strong>选中</strong></td>
            <td width="25" align="center"  height="22"><strong>ID</strong></td>
            <td width="120" align="center" ><strong>缩略图</strong></td>
            <td align="center" ><strong>图片名称</strong></td>
            <td width="60" align="center" ><strong>图片大小</strong></td>
            <td width="60" align="center" ><strong>下载次数</strong></td>
            <td width="60" align="center" ><strong>图片属性</strong></td>
            <td width="40" align="center" ><strong>已审核</strong></td>
            <td width="100" align="center" ><strong>操作</strong></td>
          </tr>
          <%do while not rsPhotoList.eof%>
          <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'"> 
            <td width="30" align="center"><input name='PhotoID' type='checkbox' onclick="unselectall()" id="PhotoID" value='<%=cstr(rsPhotoList("PhotoID"))%>'></td>
            <td width="25" align="center"><%=rsPhotoList("Photoid")%></td>
            <td width="120" align="center">
              <%response.write "<a href='ad_PhotoShow.asp?PhotoID=" & rsPhotoList("PhotoID") & "'><img src='" & rsPhotoList("PhotoUrl_Thumb") & "' width='120' border='0'></a>"%>
            </td>
            <td> 
              <%
			if rsPhotoList("ClassID")<>ClassID then
				response.write "<a href='" & FileName & "?ClassID=" & rsPhotoList("ClassID") & "'>[" & rsPhotoList("ClassName") & "]</a>&nbsp;"
			end if
			response.write "<a href='ad_PhotoShow.asp?PhotoID=" & rsPhotoList("PhotoID") & "'"
			response.write " title='图片名称:" & rsPhotoList("PhotoName") & vbcrlf & "图片作者:" & rsPhotoList("Author") & vbcrlf & "更新时间:" & rsPhotoList("UpdateTime") & vbcrlf
			response.write "查看次数:" & rsPhotoList("Hits") & vbcrlf & "关 键 字:" & mid(rsPhotoList("Keyword"),2,len(rsPhotoList("Keyword"))-2) & vbcrlf & "推荐等级:"
			if rsPhotoList("Stars")=0 then
				response.write "无"
			else
				response.write string(rsPhotoList("Stars"),"★")
			end if			
			response.write vbcrlf & "下载等级:"	
			if rsPhotoList("PhotoLevel")=9999 then
				response.write "游客"
			elseif  rsPhotoList("PhotoLevel")=999 then
				response.write "注册用户"
			elseif  rsPhotoList("PhotoLevel")=99 then
				response.write "收费用户"
			elseif  rsPhotoList("PhotoLevel")=9 then
				response.write "VIP用户"
			elseif  rsPhotoList("PhotoLevel")=5 then
				response.write "管理员"
			end if
			response.write vbcrlf & "查看点数:" & rsPhotoList("PhotoPoint")
			response.write "'>" & rsPhotoList("PhotoName") & "</a>"
			%>
            </td>
            <td width="60" align="center"><%=rsPhotoList("PhotoSize") & " K"%></td>
            <td width="60" align="center"><%= rsPhotoList("Hits") %></td>
            <td width="60" align="center"> <%
			if rsPhotoList("OnTop")=true then
				response.Write "<font color=blue>顶</font> "
			else
				response.write "&nbsp;&nbsp;&nbsp;"
			end if
			if rsPhotoList("Hits")>=HitsOfHot then
				response.write "<font color=red>热</a> "
			else
				response.write "&nbsp;&nbsp;&nbsp;"
			end if
			if rsPhotoList("Elite")=true then
				response.write "<font color=green>荐</a>"
			else
				response.write "&nbsp;&nbsp;"
			end if
			%> </td>
            <td width="40" align="center"> <%
			if rsPhotoList("Passed")=true then
				response.write "是"
			else
				response.write "否"
			end if%></td>
            <td width="100" align="center"><a href="ad_PhotoDel.asp?Action=ConfirmDel&PhotoID=<%=rsPhotoList("PhotoID")%>" onclick='return ConfirmDel();'>彻底删除</a> 
              <a href="ad_PhotoDel.asp?Action=Restore&PhotoID=<%=rsPhotoList("PhotoID")%>">还原</a></td>
          </tr>
          <%
		PhotoNum=PhotoNum+1
	   	if PhotoNum>=MaxPerPage then exit do
	   	rsPhotoList.movenext
	loop
%>
        </table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
              选中本页显示的所有图片 </td>
    <td><input name="Action" type="hidden" id="Action2" value="ConfirmDel">
              <input name="submit1" type='submit' id="submit1" onClick="document.myform.Action.value='ConfirmDel'" value='彻底删除选定的图片'>
              <input type="submit" name="Submit2" value="清空回收站"  onClick="document.myform.Action.value='ClearRecyclebin'">
              &nbsp;&nbsp;&nbsp;&nbsp; 
              <input name="Submit3" type="submit" id="Submit3"  onClick="document.myform.Action.value='Restore'" value="还原选定的图片">
              <input name="Submit4" type="submit" id="Submit4" onClick="document.myform.Action.value='RestoreAll'" value="还原所有图片"></td>
  </tr>
</table>
</td>
</form></tr></table>
<%
end sub

if ClassID>0 and Child>0 then
%>
<br>
<table width="100%" height="5" border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class='border'>
  <tr height="20" class='tdbg'>
    <td width='150' align="right">【<%response.write "<a href='" & strFileName & "'>" & ClassName & "</a>"%>】子栏目导航:</td>
	<td><%call Admin_ShowChild()%></td></tr>
</table>
<%
end if
%>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="border">
  <tr class="tdbg">
    <td width="80" align="right"><strong>图片搜索:</strong></td>
    <td>
      <%call Admin_ShowSearchForm(FileName,2)%>
    </td>
  </tr>
</table>
</body>
</html>
<%
call CloseConn()
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -