<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: files.tpl.html 2 2011-05-27 02:59:23Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<!--#
if($action =='index' || $action =='search'){
#-->
<div id="container">
<h1>{$L['file_list']}<!--#sitemap_tag($L['file_list']);#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['public_title_tips']}</span>
</div>
<form name="search_frm" action="{#urr("admincp","")#}" method="get" onsubmit="return dosearch(this);">
<input type="hidden" name="item" value="files" />
<input type="hidden" name="action" value="search" />
<div class="search_box">
<div class="l"><img src="{$admin_tpl_dir}images/it_nav.gif" align="absbottom" />
{$L['view_mode']}: 
<select name="view" id="view" onchange="chg_view();">
<option value="mydisk_file" {#ifselected('mydisk_file',$view,'str');#}>{$L['mydisk_file']}</option>
<option value="mydisk_recycle" {#ifselected('mydisk_recycle',$view,'str');#}>{$L['mydisk_recycle']}</option>
</select>
</div>
<div class="r"><input type="text" name="word" value="{$word}" title="{$L['search_files_tips']}" /> <input type="submit" class="btn" value="{$L['search_files']}" /></div>
</div>
</form>
<div class="clear"></div>
<script language="javascript">
function chg_view(){
	var view = getId('view').value.strtrim();
	document.location.href = '{#urr("admincp","item=files&action=index&view='+view+'")#}';
}
function dosearch(o){
	if(o.word.value.strtrim().length <1){
		o.word.focus();
		return false;
	}
}
</script>
<form name="public_frm" action="{#urr("admincp","item=files")#}" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<!--#
if(count($files_array)){
#-->
<tr>
	<td width="40%" class="bold">{$L['file_name']}</td>
	<td align="center" class="bold" width="150">{$L['username']}</td>
	<td align="center" class="bold">{$L['file_size']}</td>
	<td align="center" width="150" class="bold">{$L['file_upload_time']}</td>
	<td align="right" width="80" class="bold">
	{$L['status']}/{$L['operation']}
	</td>
</tr>
<!--#
	foreach($files_array as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
#-->
<tr class="{$color}">
	<td width="40%"><input type="checkbox" name="file_ids[]" id="file_ids" value="{$v['file_id']}" />&nbsp;<a href="{$v['a_downfile']}" title="{$L['download']}">{#file_icon($v['file_extension'])#}</a>&nbsp;
	<!--#if($v['is_image']){#-->
	<a href="{$v['a_viewfile']}" id="p_{$k}" target="_blank" title="{$v['file_name_all']} {$v['file_size']}">{$v['file_name']}</a><br />
<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="{$v['a_viewfile']}" target="_blank" title="{$v['file_name_all']} {$v['file_size']}">{$v['file_name']}</a>
	<!--#}#-->
	</td>
	<td align="center"><a href="{$v['a_user_view']}">{$v['username']}</a></td>
	<td align="center">{$v['file_size']}</td>
	<td align="center" width="150" class="txtgray">{$v['file_time']}</td>
	<td align="center">
	{$v['status_txt']} / 
	<a href="{$v['a_recycle_delete']}" onclick="return confirm('{$L['recycle_delete_confirm']}');">{$L['delete']}</a>
	</td>
</tr>
<!--#		
	}
	unset($files_array);
#-->
<!--#if($page_nav){#-->
<tr>
	<td colspan="6">{$page_nav}</td>
</tr>
<!--#}#-->
<tr>
	<td colspan="6"><a href="javascript:void(0);" onclick="reverse_ids(document.public_frm.file_ids);">{$L['select_all']}</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="cancel_ids(document.public_frm.file_ids);">{$L['select_cancel']}</a>&nbsp;&nbsp;
	<input type="radio" name="task" value="check_public" checked="checked" />{$L['check_public']}&nbsp;&nbsp;
	<input type="radio" name="task" value="file_to_locked" />{$L['file_to_locked']}&nbsp;&nbsp;
	<input type="radio" name="task" value="file_to_unlocked" />{$L['file_to_unlocked']}&nbsp;&nbsp;
	<input type="radio" name="task" value="delete_file_complete" />{$L['delete_complete']}&nbsp;&nbsp;
	<input type="submit" class="btn" value="{$L['btn_submit']}"/></td>
</tr>
<!--#		
}else{
#-->
<tr>
	<td colspan="6">{$L['file_not_found']}</td>
</tr>
<!--#
}
#-->
</table>
</form>
</div>
</div>
<script language="javascript">
function dosubmit(o){
	if(checkbox_ids("file_ids[]") != true){
		alert("{$L['please_select_operation_files']}");
		return false;
	}
}
</script>
<!--#}#-->