<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: recycle.tpl.php 64 2016-07-30 14:01:18Z along $
#
#	Copyright (C) 2008-2016 PHPDisk Team. All Rights Reserved.
#
##
#-->
<?php !defined('IN_PHPDISK') && exit('[PHPDisk] Access Denied!'); ?>
<!--#
if($action =='files'){
#-->
<script type="text/javascript">
$(document).ready(function(){
	$("#cb_select_all").click(function(){
		 $("input[name='fl_sel_ids[]']").each(function(){
		 	if($(this).attr("checked")){
				$(this).attr("checked",false);
			}else{
				$(this).attr("checked",true);
			}
		 });
	});
	$("#cb_select_cancel").click(function(){
		 $("input[name='fl_sel_ids[]']").attr("checked",false);
	});
});
</script>
<div id="container">
<h1><?=__('file_list')?></h1>
<div class="tips_box_p">
<div class="tips_box">
<b><?=__('tips')?>: </b><img class="img_light" src="images/light.gif" align="absmiddle"> <span class="txtgray"><?=__('file_recycle_tips')?></span>
</div>
</div>
<form action="{#urr("mydisk","item=recycle")#}" name="file_form" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="menu" value="recycle" />
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="98%" cellpadding="0" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="60%" class="bold"><?=__('file_name')?></td>
	<td align="center" width="80" class="bold"><?=__('file_size')?></td>
	<td align="center" width="150" class="bold"><?=__('file_time')?></td>
	<td align="center" width="80" class="bold"><?=__('operation')?></td>
</tr>
<!--#
if(count($folders_array)){
	foreach($folders_array as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
#-->
<tr class="{$color}">
	<td width="60%"><input type="checkbox" disabled="disabled" />&nbsp;<a href="javascript:;" onclick="abox('{$v['a_viewfolder']}','<?=__('view_folder')?>',440,320);"><img src="images/folder.gif" border="0" align="absmiddle" />&nbsp;{$v['folder_name']}</a> {$v['total']}</td>
	<td align="center">{$v['folder_size']}</td>
	<td align="center" class="txtgray">{$v['folder_time']}</td>
	<td align="center">
	<a href="javascript:;" onclick="abox('{$v['a_restore']}','<?=__('restore_folder')?>',400,200);" title="<?=__('restore_folder')?>"><img src="images/restore_icon.gif" border="0" align="absmiddle" /></a>&nbsp;
	<a href="javascript:;" onclick="abox('{$v['a_delete_complete']}','<?=__('delete_folder')?>',400,200);" title="<?=__('delete_folder')?>"><img src="images/delete_icon.gif" border="0" align="absmiddle" /></a>
	</td>
</tr>

<!--#		
	}
	unset($folders_array);	
}
#-->
<!--#
if(count($files_array)){
	foreach($files_array as $k => $v){
		$color = ((count($folders_array)+$k)%2 ==0) ? 'color1' :'color4';
#-->
<tr class="{$color}">
	<td width="40%"><input type="checkbox" name="fl_sel_ids[]" id="sel_ids" value="{$v['file_id']}" />&nbsp;
	<!--#if($v['is_image']){#-->
	<a href="javascript:;" onclick="abox('{$v['a_viewfile']}','下载文件',650,450);" id="p_{$k}">{#file_icon($v['file_extension'])#} {$v['file_name']}</a>
<div id="c_{$k}" class="menu_thumb"><img src="{$v['file_thumb']}" /></div>
<script type="text/javascript">on_menu('p_{$k}','c_{$k}','x','','');</script>
	<!--#}else{#-->
	<a href="javascript:;" onclick="abox('{$v['a_viewfile']}','下载文件',650,450);">{#file_icon($v['file_extension'])#} {$v['file_name']}</a> <span class="txtgray">{$v['file_description']}</span>
	<!--#}#-->
	</td>
	<td align="center">{$v['file_size']}</td>
	<td align="center" class="txtgray">{$v['file_time']}</td>
	<td align="center">
	<a href="javascript:;" onclick="abox('{$v['a_restore']}','<?=__('restore_file')?>',400,200);" title="<?=__('restore_file')?>"><img src="images/restore_icon.gif" border="0" align="absmiddle" /></a>&nbsp;
	<a href="javascript:;" onclick="abox('{$v['a_delete_complete']}','<?=__('delete_file')?>',400,200);" title="<?=__('delete_file')?>"><img src="images/delete_icon.gif" border="0" align="absmiddle" /></a>
	</td>
</tr>

<!--#		
	}
	unset($files_array);	
}
#-->
<!--#if($recycle_empty){#-->
<tr class="color4">
	<td align="center" colspan="6" class="td_line"><?=__('recycle_is_empty')?></td>
</tr>
<!--#}else{#-->
<!--#if($page_nav){#-->
<tr>
	<td colspan="6">{$page_nav}</td>
</tr>
<!--#}#-->
<tr>
	<td colspan="6" class="td_line"><input type="button" class="btn_gray" id="cb_select_all" value="<?=__('select_all')?>"/>&nbsp;
<input type="button" class="btn_gray" id="cb_select_cancel" value="<?=__('select_cancel')?>" />&nbsp;
	<input type="radio" name="task" value="restore_recycle" id="rr" /><label for="rr">还原文件</label>&nbsp;
	<input type="radio" name="task" value="delete_complete_recycle" id="dcr" checked="checked" /><label for="dcr"><span class="txtred"><?=__('delete_complete')?></span></label>&nbsp;
	<input type="submit" class="btn_green" value="<?=__('btn_submit')?>" onclick="return confirm('<?=__('confirm_op')?>');" />
	</td>
</tr>
<!--#}#-->
</table>
</form>
</div>
<script type="text/javascript">
function dosubmit(o){
	if((checkbox_ids("fl_sel_ids[]") != true) && (checkbox_ids("fd_sel_ids[]") != true)){
		atips("<?=__('please_select_operation_files')?>");
		return false;
	}
}
</script>
<!--#}elseif($action == 'show_files'){#-->
<div id="container">
<div class="box_style">
<!--#
if(count($files_array)){
#-->
<div class="file_box">
<li class="f14"><?=__('file_list')?>:</li>
<!--#
	foreach($files_array as $v){
#-->
<li><a href="javascript:;" onclick="abox('{$v['a_viewfile']}','下载文件',650,450);">{#file_icon($v['file_extension'])#}&nbsp;{$v['file_name']}</a> ({$v['file_size']})</li>
<!--#
	}
	unset($files_array);
#-->
<li>&nbsp;</li>
</div>
<!--#	
}else{
#-->
<br /><br />
<div align="center"><img src="images/light.gif" border="0" align="absmiddle">&nbsp;<span class="txtgreen">此文件夹没有文件</span></div>
<br /><br />
<!--#
}
#-->
<br />
</div>
</div>
<!--#}elseif($action == 'folder_delete_complete'){#-->
<div id="container">
<form action="{#urr("mydisk","item=recycle")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<div class="box_style">
<!--#
if(count($files_array)){
#-->
<div class="file_box">
<li class="f14"><?=__('file_list')?>:</li>
<!--#
	foreach($files_array as $v){
#-->
<li><a href="javascript:;" onclick="abox('{$v['a_viewfile']}','下载文件',650,450);">{#file_icon($v['file_extension'])#}&nbsp;{$v['file_name']}</a> ({$v['file_size']})</li>
<!--#
	}
	unset($files_array);
#-->
<li>&nbsp;</li>
</div>
<!--#	
}else{
#-->
<br /><br />
<div align="center"><img src="images/light.gif" border="0" align="absmiddle">&nbsp;<span class="txtgreen">此文件夹没有文件</span></div>
<br /><br />
<!--#
}
#-->
<br />
<div align="center"><input type="submit" class="btn_green" value="<?=__('btn_delete_complete')?>" /></div>
</div>
</form>
</div>

<!--#}elseif($action == 'file_delete_complete'){#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=recycle")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="file_id" value="{$file_id}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<div class="cfm_info">
<li>{#file_icon($file_extension)#}&nbsp;<span class="txtgreen">{$file_name}</span></li>
<li><?=__('delete_file_complete_confirm')?></li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_delete_complete')?>" /></li>
</div>
</form>
</div>
</div>

<!--#}elseif($action == 'folder_restore'){#-->
<div id="container">
<form action="{#urr("mydisk","item=recycle")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<div class="box_style">
<!--#
if(count($files_array)){
#-->
<div class="file_box">
<li class="f14"><?=__('file_list')?>:</li>
<!--#
	foreach($files_array as $v){
#-->
<li><a href="javascript:;" onclick="abox('{$v['a_viewfile']}','下载文件',650,450);">{#file_icon($v['file_extension'])#}&nbsp;{$v['file_name']}</a> ({$v['file_size']})</li>
<!--#
	}
	unset($files_array);
#-->
<li>&nbsp;</li>
</div>
<!--#	
}else{
#-->
<br /><br />
<div align="center"><img src="images/light.gif" border="0" align="absmiddle">&nbsp;<span class="txtgreen">此文件夹没有文件</span></div>
<br /><br />
<!--#
}
#-->
<br />
<div align="center"><input type="submit" class="btn_green" value="<?=__('btn_restore')?>" /></div>
</div>
</form>
</div>

<!--#}elseif($action == 'file_restore'){#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=recycle")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="file_id" value="{$file_id}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<div class="cfm_info">
<li>{#file_icon($file_extension)#}&nbsp;<span class="txtgreen">{$file_name}</span></li>
<li><?=__('file_restore_confirm')?></li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_restore')?>" /></li>
</div>
</form>
</div>
</div>
<!--#}elseif($action == 'restore_all'){#-->
<div id="container">
<h1><?=__('file_list')?></h1>
<div class="tips_box">
<b><?=__('tips')?>: </b><img class="img_light" src="images/light.gif" align="absmiddle"> <span class="txtgray"><?=__('file_recycle_tips')?></span>
</div>
<div>
<br />
<form name="frm" action="{#urr("mydisk","item=recycle")#}" method="post">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="task" value="{$action}"/>
<input type="hidden" name="formhash" value="{$formhash}" />
<li><?=__('folder')?>: <b class="txtblue">{$folder_num}</b> , <?=__('file')?>: <b class="txtgreen">{$file_num}</b> , <?=__('size')?>: <b>{$all_size}</b></li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_restore_all')?>" onclick="return confirm('<?=__('confirm_op')?>');" {$disabled}/>&nbsp;<input type="button" class="btn_gray" value="<?=__('btn_back')?>" onclick="go('{#urr("mydisk","item=recycle&menu=recycle&action=files")#}');" /></li>
<li>&nbsp;</li>
</form>
<br />
<br />

</div>
</div>
</div>

<!--#}elseif($action =='delete_all'){#-->
<div id="container">
<h1><?=__('file_list')?></h1>
<div class="tips_box">
<b><?=__('tips')?>: </b><img class="img_light" src="images/light.gif" align="absmiddle"> <span class="txtgray"><?=__('file_recycle_tips')?></span>
</div>
<div>
<br />
<form name="frm" action="{#urr("mydisk","item=recycle")#}" method="post">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="task" value="{$action}"/>
<input type="hidden" name="formhash" value="{$formhash}" />
<li><?=__('folder')?>: <b class="txtblue">{$folder_num}</b> , <?=__('file')?>: <b class="txtgreen">{$file_num}</b> , <?=__('size')?>: <b>{$all_size}</b></li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_empty_all')?>" onclick="return confirm('<?=__('confirm_op')?>');" {$disabled}/>&nbsp;<input type="button" class="btn_gray" value="<?=__('btn_back')?>" onclick="go('{#urr("mydisk","item=recycle&menu=recycle&action=files")#}');" /></li>
<li>&nbsp;</li>
</form>
<br />
<br />

</div>
</div>
</div>
<!--#}#-->