<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: public.tpl.html 25 2011-03-04 07:36:51Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<!--#if($action == 'index' || $action =='detail'){#-->
<div id="container">
<script language="javascript">
$(document).ready(function(){
	$("td.ul_detail").each(function(){
		var obj = $(this).find("span");
		$(this).mouseover(function(){
			obj.css("display","");
			$(this).addClass("alt_bg");
		}).mouseout(function(){
			obj.css("display","none");
			$(this).removeClass("alt_bg");
		});
	});
});
</script>
<div class="mydisk_file_bar">
<div class="l">
<h1>{$L['public_file']}</h1>
<ul>
	<li><a href="javascript:void(0);" onclick="document.location.reload();"><img src="images/reload.gif" border="0" align="absmiddle" />{$L['md_reload']}</a></li>
	<li><a href="{$a_upload_file}" onclick="return hs.htmlExpand(this,{headingText:'{$L['upload_file']}',objectType:'upload',width:650,height:500});"><img src="images/upload_file_icon.gif" border="0" align="absmiddle" />{$L['upload_file']}</a></li>
	<li><a href="{$a_list_detail}"><img src="images/list_icon.gif" border="0" align="absmiddle" />{$L['thumb_view']}</a></li>
</ul>
</div>
<div class="r">
	<div class="tit">{$L['disk_info']}:</div>
	<div class="disk_info" title="{$L['disk_remain']}: {$nav_arr['disk_remain']}% ({$nav_arr['disk_space']})">
	<div style="background:url(images/disk_bar.gif);width:{$nav_arr['disk_fill']}px;">&nbsp;</div>
	</div>
	<div style="color:#666">{$nav_arr['now_space']}/{$nav_arr['max_storage']} (<b>{$nav_arr['disk_percent']}%</b>)</div>
</div>
</div>
<div class="clear"></div>
<form action="{#urr("mydisk","item=public")#}" name="file_form" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="98%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
<!--#
if($id){
	if($pid){
#-->
	<td colspan="6"><img src="images/icon_nav.gif" align="absmiddle" border="0" /><a href="{$a_cate}"><img src="images/folder_open.gif" border="0" align="absmiddle" />{$cate_name}</a> &raquo; 
	<img src="images/folder_open.gif" border="0" align="absmiddle" />{$subcate_name}</td>
<!--#
	}else{
#-->
	<td colspan="6"><img src="images/icon_nav.gif" align="absmiddle" border="0" />
	<img src="images/folder_open.gif" border="0" align="absmiddle" />{$cate_name}</td>
<!--#	
	}
}else{
#-->
	<td colspan="6"><img src="images/icon_nav.gif" align="absmiddle" border="0" />
	<img src="images/tree/base.gif" border="0" align="absmiddle" />{$L['temp_store_space']} <span class="txtgray">({$L['temp_store_space_tips']})</span></td>
<!--#}#-->
</tr>
<!--#if($action =='index'){#-->  
<tr>
	<td width="60%" class="bold"><a href="{$n_url}">{$L['file_name']}{$n_order}</a></td>
	<td align="center" class="bold" width="100"><a href="{$s_url}">{$L['file_size']}{$s_order}</a></td>
	<td align="center" width="150" class="bold"><a href="{$t_url}">{$L['file_upload_time']}{$t_order}</a></td>
	<td align="right" width="50" class="bold">{$L['operation']}</td>
</tr>
<!--#}#-->
<!--# if($action =='detail'){#-->
    <tr>
<!--#
if(count($files_array)){
	foreach($files_array as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
#-->
      <td class="ul_detail" width="25%" valign="top">
	  <li><a href="{$v['a_downfile']}" title="{$L['download']}">{#file_icon($v['file_extension'],'filetype_32')#}</a></li>
		<li><input type="checkbox" name="file_ids[]" id="file_ids" value="{$v['file_id']}" />
		<!--#if($settings['downfile_directly']){#-->
		<a href="{$v['a_downfile']}">{$v['file_name']}</a></li>
		<!--#}else{#-->
		<a href="{$v['a_viewfile']}" target="_blank">{$v['file_name']}</a></li>
		<!--#}#-->
		<!--# if($v['is_image']){#-->
		<li><img src="{$v['file_thumb']}" align="absmiddle" border="0" /></li>
		<!--#}#-->
		<!--#if($v['file_description']){#-->
        <li class="txtgray">{$L['file_description']}：{$v['file_description']}</li>
		<!--#}#-->
        <li class="txtgray">{$L['file_size']}：{$v['file_size']}</li>
        <li class="txtgray">{$L['file_upload_time']}：{$v['file_time']}</li>
        <li><span class="txtgray" style="display:none">{$L['operation']}：<a href="{$v['a_file_modify']}" onclick="return hs.htmlExpand(this,{headingText:'{$L['file_modify']}',objectType: 'iframe'});" title="{$L['modify']}"><img src="images/edit_icon.gif" border="0" align="absmiddle" /></a> <a href="{$v['a_file_delete']}" onclick="return hs.htmlExpand(this,{headingText:'{$L['file_delete']}',objectType: 'iframe',height:200});" title="{$L['delete']}"><img src="images/delete_icon.gif" border="0" align="absmiddle" /></a></span></li>
		</td>
<!--#
	if(($k+1)%4 ==0) { echo "</tr><tr>";}
	}
}	
#-->
    </tr>
<!--#}else{#-->
<!--#
if(count($files_array)){
	foreach($files_array as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
#-->
<tr class="{$color}">
	<td><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']){#-->
		<!--#if($settings['downfile_directly']){#-->
	<a href="{$v['a_downfile']}" id="p_{$k}">{$v['file_name']}</a>&nbsp;<span class="txtgray">{$v['file_description']}</span><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']}" id="p_{$k}" target="_blank" >{$v['file_name']}</a>&nbsp;<span class="txtgray">{$v['file_description']}</span><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{#-->
		<!--#if($settings['downfile_directly']){#-->
		<a href="{$v['a_downfile']}">{$v['file_name']}</a>
		<!--#}else{#-->
		<a href="{$v['a_viewfile']}" target="_blank" >{$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="right">
	<a href="{$v['a_file_modify']}" onclick="return hs.htmlExpand(this,{headingText:'{$L['file_modify']}',objectType: 'iframe'});" title="{$L['modify']}"><img src="images/edit_icon.gif" border="0" align="absmiddle" /></a>
	<a href="{$v['a_file_delete']}" onclick="return hs.htmlExpand(this,{headingText:'{$L['file_delete']}',objectType: 'iframe',height:200});" title="{$L['delete']}"><img src="images/delete_icon.gif" border="0" align="absmiddle" /></a>
	</td>
</tr>
<!--#		
	}
}
#-->
<!--#}#-->
<!--#
if(count($files_array)){
#-->
<!--#if($page_nav){#-->
<tr>
	<td colspan="6">{$page_nav}</td>
</tr>
<!--#}#-->
<tr>
	<td colspan="6" class="td_line"><a href="javascript:void(0);" onclick="reverse_ids(document.file_form.file_ids);">{$L['select_all']}</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="cancel_ids(document.file_form.file_ids);">{$L['select_cancel']}</a>&nbsp;&nbsp;
	<span id="dest_folder" style="display:none">
	<select name="dest_folder">
	<option value="-1" class="txtgreen">{$L['please_select']}</option>
	{$option_folder_4}
	</select>&nbsp;
	</span>

	<span id="public_cate">
	<select name="public_cate" style="width:120px">
	<option value="-1" class="txtgreen">{$L['please_select']}</option>
	{$pub_menu_option}
	</select>&nbsp;
	</span>
	<input type="radio" id="to_folder" name="task" value="to_folder" onclick="chk_folder();"/><label for="to_folder">{$L['my_folder']}</label>&nbsp;
	<input type="radio" id="to_public" name="task" value="to_public" checked="checked" onclick="chk_public();"/><label for="to_public">{$L['public_cate']}</label>&nbsp;
	<input type="radio" id="file_delete" name="task" value="file_delete"/><label for="file_delete"><span class="txtred">{$L['file_delete']}</span></label>&nbsp;
	<input type="submit" class="btn" value="{$L['btn_submit']}" onclick="return confirm('{$L['confirm_op']}');" />
	</td>
</tr>
<!--#
}else{
#-->
<tr>
	<td colspan="6" align="center">{$L['none_file']}</td>
</tr>
<!--#}#-->
</table>
</form>
</div>
<script language="javascript">
function chk_folder(){
	if(getId('to_folder').checked ==true){
		getId('dest_folder').style.display = '';
		getId('public_cate').style.display = 'none';
	}else{
		getId('dest_folder').style.display = 'none';
		getId('public_cate').style.display = '';
	}
}
function chk_public(){
	if(getId('to_public').checked ==true){
		getId('dest_folder').style.display = 'none';
		getId('public_cate').style.display = '';
	}else{
		getId('dest_folder').style.display = '';
		getId('public_cate').style.display = 'none';
	}
}
function dosubmit(o){
	if(checkbox_ids("file_ids[]") != true){
		alert("{$L['please_select_operation_files']}");
		return false;
	}
	if(o.to_folder.checked ==true && o.dest_folder.value ==-1){
		alert("{$L['please_select_dest_folder']}");
		o.dest_folder.focus();
		return false;
	}
	if(o.to_public.checked ==true && o.public_cate.value ==-1){
		alert("{$L['please_select_dest_folder']}");
		o.public_cate.focus();
		return false;
	}
}
</script>
<!--#}elseif($action =='file_modify'){#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=public")#}" method="post" onsubmit="return dosubmit(this);">
<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}" />
<li>{$L['file_name']}({$L['none_extension']}):</li>
<li><input type="text" name="file_name" value="{$file['file_name']}" size="30" maxlength="50" /></li>
<!--#if($settings['open_tag']){#-->
<li>{$L['file_tag']}[{$L['file_tag_tips']}]({$L['optional']}):</li>
<li><input type="text" name="file_tag" value="{$file['file_tag']}" size="30" maxlength="50" /></li>
<!--#}#-->
<li>{$L['file_description']}({$L['optional']}): </li>
<li><textarea name="file_description" style="width:250px; height:80px;">{$file['file_description']}</textarea></li>
<li><input type="submit" class="btn" value="{$L['btn_submit']}" /></li>
</form>
</div>
</div>
<script language="javascript">
function dosubmit(o){
	if(o.file_name.value.strtrim().length <2){
		alert("{$L['file_min_max']}");
		o.file_name.focus();
		return false;
	}

}
</script>
<!--#
}elseif($action =='file_delete'){
#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=public")#}" 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>{$L['delete_file_confirm']}</li>
<li>&nbsp;</li>
<li><input type="submit" class="btn" value="{$L['btn_submit']}" />&nbsp;&nbsp;<input type="button" class="btn" value="{$L['btn_cancel']}" onclick="return self.parent.hs.close();" /></li>
</div>
</form>
</div>
</div>
<!--#}#-->
