<html>
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>云网互动影视6.0--影片回收站管理</title>
<LINK href="css/css.css" type=text/css rel=stylesheet>
</head>
<BODY leftMargin=0 topMargin=0 scroll=yes MARGINHEIGHT="0" MARGINWIDTH="0">
<script language="JavaScript" type="text/javascript" src="YWNT_TMS_inc/YWNT_TMS_Common.js"></script>
<!--#include file="../Conn.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Function.asp" -->
<!--#include file="YWNT_TMS_inc/YWNT_TMS_Page.asp" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
Call CheckLogin("Recycling")
sub AllResumption()
	Conn.execute("Update YWNT_TMS_Movie set MovieRecovery=0 where MovieRecovery=1")
	Call AddLog("恢复回收站影片",3)
	call Admin_ShowErr("<li>全部回收站影片恢复成功！</li>","Admin_Recycling.asp",1)
end sub
sub AllDel()
	Set Rs = server.CreateObject(YWNT_TMS_RS)
	sql="select * from YWNT_TMS_Movie where MovieRecovery=1"
	Rs.open sql,conn,1,1
	do while not Rs.eof
	Call DeleteFile(CollectionMoive("MoviePic",RS("ID")))
	IF GetConfig("WebHtmlMode")<>"asp" Then
	Call DeleteFile(GetConfig("HtmlDIr")&"Movie_"&RS("ID")&"."&GetConfig("WebHtmlMode"))
	END IF
	call DelMovieUrl(Rs("ID"))
	conn.execute "delete from YWNT_TMS_UsersCollection WHERE CollectionMoiveID ="&RS("ID")&""
	conn.execute "delete from YWNT_TMS_Comments WHERE CommentsMovieID ="&RS("ID")&""
	Rs.movenext
	loop
	Rs.close
	set Rs=nothing
	conn.execute "delete from YWNT_TMS_Movie WHERE MovieRecovery=1"
	Call AddLog("清空回收站影片",3)
	call Admin_ShowErr("<li>全部回收站影片删除成功！</li>","Admin_Recycling.asp",1)
end sub
sub Resumption()
	Conn.execute("Update YWNT_TMS_Movie set MovieRecovery=0 where ID in ("&NoSqlHack(Request("ID"))&")")
	Call AddLog("批量恢复回收站影片",3)
	call Admin_ShowErr("<li>影片恢复成功！</li>","Admin_Recycling.asp",1)
end sub
sub Del()
	Set Rs = server.CreateObject(YWNT_TMS_RS)
	sql="select * from YWNT_TMS_Movie where ID in ("&NoSqlHack(Request("ID"))&")"
	Rs.open sql,conn,1,1
	do while not Rs.eof
	Call DeleteFile(CollectionMoive("MoviePic",RS("ID")))
	IF GetConfig("WebHtmlMode")<>"asp" Then
	Call DeleteFile(GetConfig("HtmlDIr")&"Movie_"&RS("ID")&"."&GetConfig("WebHtmlMode"))
	END IF
	Rs.movenext
	loop
	Rs.close
	set Rs=nothing
	Call DelMovieUrl(NoSqlHack(Request("ID")))
	conn.execute "delete from YWNT_TMS_Movie WHERE ID in ("&NoSqlHack(Request("ID"))&")"
	conn.execute "delete from YWNT_TMS_UsersCollection WHERE CollectionMoiveID in ("&NoSqlHack(Request("ID"))&")"
	conn.execute "delete from YWNT_TMS_Comments WHERE CommentsMovieID in ("&NoSqlHack(Request("ID"))&")"
	Call AddLog("批量删除回收站影片",3)
	call Admin_ShowErr("<li>影片删除成功！</li>","Admin_Recycling.asp",1)
end sub
%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td align="center" class=xingmu>影片回收站管理</td>
    </tr>
    <tr>
      <td class="hback"><a href="Admin_Recycling.asp">影片回收站管理首页</a> | <a href="Admin_Recycling.asp?Action=AllResumption">恢复所有影片</a> | <a href="Admin_Recycling.asp?Action=AllDel">清空回收站</a></td>
    </tr>
  </tbody>
</table>
<% Action=Trim(request("Action"))
Select Case Action
Case "AllResumption"
	call AllResumption()
Case "AllDel"
	call AllDel()
Case "Resumption"
	call Resumption()
Case "Del"
	call Del()
Case else
	call List()
End Select
sub List()
Dim int_RPP
	int_RPP=GetConfig("PageNumber") '设置每页显示数目%>
<table class=table cellspacing=1 cellpadding=3 width="98%" align=center border=0>
  <tbody>
    <tr>
      <td width="5%" align="center" class=xingmu>ID</td>
      <td align="center" class=xingmu>影片名称</td>
      <td colspan="2" align="center" class=xingmu>操作</td>
    </tr>
	<form name="forms" action="Admin_Recycling.asp" method="post">
	<%  Set Rs = server.CreateObject(YWNT_TMS_RS)
		sql="Select ID,SeverID,TypeID,MovieName,MovieActor,MovieRegion,MovieLook,MovieDown from YWNT_TMS_Movie where MovieHide=0 and MovieAudit=1 "
			sql=sql&"And MovieRecovery=1 Order by ID desc"
		Rs.open sql,Conn,1,1
	if Rs.eof then
	   Response.Write"<TR  class=""hback""><TD colspan=""4"" class=""hback"" height=""40"">没有记录。</TD></TR>"
	else
		Rs.PageSize=int_RPP
		cPageNo=NoSqlHack(Request.QueryString("Page"))
		If cPageNo="" Then cPageNo = 1
		If not isnumeric(cPageNo) Then cPageNo = 1
		cPageNo = Clng(cPageNo)
		If cPageNo>Rs.PageCount Then cPageNo=Rs.PageCount 
		If cPageNo<=0 Then cPageNo=1
		Rs.AbsolutePage=cPageNo 
	for i=1 to int_RPP
	 if Rs.eof Then exit For %>
    <tr>
      <td height=32 align="center" class="hback"><%=RS("ID")%></td>
      <td height=32 class="hback"><img src="images/movie.gif" width="16" height="16" align="absbottom"><%=RS("MovieName")%></td>
      <td width="10%" align="center" class="hback"><A href="Admin_Recycling.asp?Action=Resumption&ID=<%=RS("ID")%>">恢复</A>｜<A href="Admin_Recycling.asp?Action=Del&ID=<%=RS("ID")%>">删除</A></td>
      <td width="3%" align="center" class="hback"><input name="ID" type="checkbox" id="ID" value="<% = RS("ID")%>"></td>
    </tr>
	<%Rs.MoveNext
	next 
	end if%>
    <tr>
      <td height=32 colspan="3" align="right" class="hback"><input type="submit" name="Submit4" value="批量恢复" onClick="document.forms.Action.value='Resumption';forms.submit();">
      <input type="submit" name="Submit42" value="批量删除" onClick="document.forms.Action.value='Del';forms.submit();"></td>
      <td align="center" class="hback"><input name="Action" type="hidden" id="Action">
	<input type="checkbox" name="chkall" value="checkbox" onClick="CheckAll(document.forms.chkall.checked);"></td>
    </tr>
	</form>
    <tr align="right">
      <td height=32 colspan="4" class="hback"><% response.Write fPageCount(Rs,cPageNo) %></td>
    </tr>
  </tbody>
</table>
<%end sub
call connclose()%>
</BODY></HTML>
