<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: files.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=='ftp_upload'){#-->
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td colspan="2" class="txtgray">使用您对应的FTP帐号密码等，通过FTP软件客户端(CuteFTP,FlashFXP,LeapFTP,FileZilla)进行文件上传与下载，<br />FTP上传的文件可以通过下面的 FTP文件入库 功能直接发布到网盘上。</td>
</tr>
<!--#if($msg){#-->
<tr>
	<td colspan="2" class="f14 txtred">{$msg}</td>
</tr>
<!--#}else{#-->
<tr>
	<td width="20%">FTP主机:</td>
	<td>{$rs[ftp_host]}</td>
</tr>
<tr>
	<td>FTP用户名:</td>
	<td><span id="fu" style="display:none">{$rs[ftp_user]}</span><span id="fu2" style="cursor:pointer" onclick="$('#fu').show();$('#fu2').hide();"><u>查看用户名</u></span></td>
</tr>
<tr>
	<td>FTP登录密码:</td>
	<td><span id="fp" style="display:none">{$rs[ftp_pwd]}</span><span id="fp2" style="cursor:pointer" onclick="$('#fp').show();$('#fp2').hide();"><u>查看密码</u></span></td>
</tr>
<tr>
	<td>FTP端口:</td>
	<td>{$rs[ftp_port]}</td>
</tr>
<tr>
	<td colspan="2" class="color4 bold"><a href="{$a_import}" target="_blank" class="f14">FTP文件入库>></a></td>
</tr>
<!--#}#-->
</table>

<!--#}elseif($action=='multi_down' && $auth[pd_3]){#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=files")#}" method="post" target="_blank">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="file_ids" value="{$file_ids}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<div class="f14">打包下载以下文件：</div>
<ul style="border:1px solid #CCC; height:200px; overflow-y:hidden; padding:5px;">
<!--#if(count($filearr)){
foreach($filearr as $v){
#-->
<li>{#file_icon($v[file_extension])#}{$v[file_name]}</li>
<!--#}
}
#-->
</ul>
<li><input type="submit" class="btn_green" value="<?=__('btn_submit')?>" /></li>
</form>
</div>
</div>

<!--#}elseif($action=='download'){#-->
<table width="95%" cellpadding="4" cellspacing="0" align="center" class="td_line f14">
<tr>
	<td colspan="2">文件名称: {#file_icon($file[file_extension])#}{$file['file_name_all']}</td>
</tr>
<tr>
	<td width="50%"><?=__('upload_time')?>: <span class="txtgray">{$file['file_time']}</span></td>
	<td>最后访问: <span class="txtgray">{$file['file_last_view']}</span> </td>
</tr>
<tr>
	<td><?=__('upload_ip')?>:<span class="txtgray">{$file['ip']}</span></td>
	<td><?=__('file_size')?>:<span class="txtgray">{$file['file_size']}</span></td>
</tr>
<tr>
	<td>浏览量: <span class="txtgray">{$file['file_views']}</span> </td>
	<td>下载量: <span class="txtgray">{$file['file_downs']}</span> </td>
</tr>
<tr>
	<td colspan="2">文件描述：<br /><div class="txtgray">{$file['file_description']}</div></td>
</tr>
<tr>
	<td colspan="2"><div><a href="{$file[a_downfile]}" onclick="down_process('{$file[file_id]}');"><img src="{$user_tpl_dir}images/down_btn.jpg" border="0" /></a></div></td>
</tr>
</table>
<script type="text/javascript">
function down_process(file_id){
	$.ajax({
		type : 'post',
		url : 'ajax.php',
		data : 'action=down_process&file_id='+file_id+'&t='+Math.random(),
		dataType : 'text',
		success:function(msg){
			if(msg == 'true'){

			}else{
				atips(msg);
			}
		},
		error:function(){
		}

	});
}
</script>
<!--#
}elseif($action == 'index' || $action =='detail'||$action == 'search'){
#-->
<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");
		});
	});
	$("tr.tr_list").each(function(){
		var obj = $(this).find("div.ext_box");
		$(this).mouseover(function(){
			obj.css("display","");
			//$(this).addClass("alt_bg");
		}).mouseout(function(){
			obj.css("display","none");
			//$(this).removeClass("alt_bg");
		});
	});
	
	$("#to_share_corp").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=share&action=share_file&sel_type=corp&file_ids='+file_ids,'共享文件给公司',600,350);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	$("#to_share_depart").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=share&action=share_file&sel_type=depart&file_ids='+file_ids,'共享文件给部门',600,350);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	<!--#if(get_group_power($pd_gid,'can_share_file_to_other_depart',1)){#-->
	$("#to_share_other_depart").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=share&action=share_file&sel_type=other_depart&file_ids='+file_ids,'共享文件给其他部门',600,350);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	<!--#}#-->
	$("#to_share_buddy").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=share&action=share_file&sel_type=buddy&file_ids='+file_ids,'共享文件给好友',600,350);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	<!--#if(get_group_power($pd_gid,'cancle_public_file',1) && $settings[open_public_file]){#-->
	$("#cancle_public").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=share&action=cancle_public_file&file_ids='+file_ids,'取消公共共享',500,350);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	<!--#}#-->
	<!--#if(get_group_power($pd_gid,'can_public_file',1) && $settings[open_public_file]){#-->
	$("#to_public").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=share&action=public_file&file_ids='+file_ids,'设置公共共享',600,350);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	<!--#}#-->
	$("#is_link_code").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=files&action=make_link_code&file_ids='+file_ids,'批量生成外链',620,380);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	$("#to_folder").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=files&action=to_folder&folder_id={$folder_id}&file_ids='+file_ids,'移动文件到目录',400,200);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	$("#to_recycle").click(function(){ 
	var file_ids=""; 
		$("input[name='file_ids[]']:checkbox:checked").each(function(){ 
			file_ids += $(this).val()+','; 
		}); 
		if(file_ids){
		abox('mydisk.php?item=files&action=to_recycle&folder_id={$folder_id}&file_ids='+file_ids,'删除文件到回收站',400,200);
		}else{
		atips('请选择需要操作的文件。');
		}
	}) ;
	$("#cb_select_all").click(function(){
		 $("input[name='file_ids[]']").each(function(){
		 	if($(this).attr("checked")){
				$(this).attr("checked",false);
			}else{
				$(this).attr("checked",true);
			}
		 });
	});
	$("#cb_select_cancel").click(function(){
		 $("input[name='file_ids[]']").attr("checked",false);
	});
	
});
</script>
<!--# require_once template_echo('my_nav_bar',$user_tpl_dir);#-->
<form name="file_form">
<table align="center" width="98%" cellpadding="0" cellspacing="0" border="0" class="td_line">
<tr>
	<td colspan="4"><img src="images/icon_nav.gif" align="absmiddle" border="0" />
	<!--#if($action == 'search'){#-->
	搜索关键词:<span class="txtblue">{$word}</span>
	<!--#}else{#-->
	<a href="{#urr("mydisk","item=files&action=index")#}"><img src="images/disk.gif" border="0" align="absmiddle" /><?=__('root_folder')?></a> &raquo;	{#get_folder_path($folder_id,$pd_uid)#}<span class="txtgray">{$folder_description}{$folder_stat}</span>
	<!--#}#-->
	</td>
</tr>
<!--#if($action =='index'){#-->  
<tr>
	<td width="50%" class="bold"><a href="{$n_url}"><?=__('file_name')?>{$n_order}</a></td>
	<td align="center" width="150" class="bold"><a href="{$s_url}"><?=__('file_size')?>{$s_order}</a></td>
	<td align="center" width="150" class="bold"><a href="{$t_url}"><?=__('file_upload_time')?>{$t_order}</a></td>
	<td align="right" class="bold"><?=__('operation')?></td>
</tr>
<!--#}elseif($action=='search'){#-->
<tr>
	<td width="50%" class="bold">文件(夹)名称</td>
	<td align="center" width="150" class="bold">文件(夹)大小</td>
	<td align="center" width="150" class="bold">创建时间</td>
	<td align="right" class="bold"><?=__('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="<?=__('download')?>" target="_blank">{#file_icon($v['file_extension'],'filetype_32')#}</a></li>
		<li><input type="checkbox" name="file_ids[]" id="file_ids" value="{$v['file_id']}" />
		<a href="javascript:;" onclick="abox('{$v['a_viewfile']}','下载文件',650,450);">{$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"><?=__('file_description')?>：{$v['file_description']}</li>
		<!--#}#-->
        <li class="txtgray"><?=__('file_size')?>：{$v['file_size']}</li>
        <li class="txtgray"><?=__('file_upload_time')?>：{$v['file_time']}</li>
        <li><span class="txtgray" style="display:none"><?=__('operation')?>：<a href="javascript:;" onclick="abox('{$v[a_file_modify]}','<?=__('file_modify')?>',450,280);" title="<?=__('modify')?>"><img src="images/edit_icon.gif" border="0" align="absmiddle" /></a> <a href="javascript:;" onclick="abox('{$v[a_file_delete]}','<?=__('file_delete')?>',400,200);" title="<?=__('delete')?>"><img src="images/recycle_icon.gif" border="0" align="absmiddle" /></a></span></li>
		</td>
<!--#
	if(($k+1)%4 ==0) { echo "</tr><tr>";}
	}
}	
#-->
    </tr>
<!--#}else{#-->
<!--#
if(count($sub_folders)){
	foreach($sub_folders as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
#-->
<tr class="{$color}">
	<td width="50%"><input type="checkbox" disabled="disabled" />
	<img src="images/{$v['folder_icon']}.gif" border="0" align="absmiddle" />&nbsp;<a href="{$v['a_view']}">{$v['folder_name']}</a> <span title="<?=__('sub_dir')?>">{$v['sub_total']}</span>&nbsp;<span class="txtgray">{$v['folder_description']}</span><br />
	</td>
	<td align="center">{$v['folder_size']}</td>
	<td align="center" width="150" class="txtgray">{$v['folder_time']}</td>
	<td align="right">
	<a href="javascript:;" onclick="abox('{$v[a_modify]}','修改文件夹',450,320);" title="<?=__('modify')?>"><img src="images/edit_icon.gif" border="0" align="absmiddle" /></a>
	<a href="javascript:;" onclick="abox('{$v[a_delete]}','删除文件夹',400,200);" title="<?=__('delete')?>"><img src="images/recycle_icon.gif" border="0" align="absmiddle" /></a>
	</td>
</tr>
<!--#		
	}
}
#-->
<tbody id="ajax_file">
<!--#
if(count($files_array)){
	foreach($files_array as $k => $v){
		$color = ($k%2 ==0) ? 'color1' :'color4';
#-->
<tr class="{$color} tr_list">
	<td><input type="checkbox" name="file_ids[]" id="file_ids" value="{$v['file_id']}" />&nbsp;<a href="{$v['a_downfile']}" title="<?=__('download')?>" target="_blank">{#file_icon($v['file_extension'])#}</a>
	<!--#if($v['is_image']){#-->
		<a href="javascript:;" onclick="abox('{$v['a_viewfile']}','下载文件',650,450);" id="p_{$k}">{$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);">{$v['file_name']}</a>
	<!--#}#--><span class="txtgray" title="文件ID">({$v['file_id']})</span>
	<div class="ext_box" style="display:none;">
	<span class="txtgray" title="描述">{$v['file_description']}</span></div>
	</td>
	<td align="center">{$v['file_size']}</td>
	<td align="center"  class="txtgray">{$v['file_time']}</td>
	<td align="right">
	<!--#if($v['in_share']){#-->
	<a href="javascript:;" onclick="abox('{$v['a_file_unshare']}','<?=__('file_unshare')?>',400,200);" title="<?=__('file_unshare')?>"><img src="images/cs_file.gif" border="0" align="absmiddle" /></a>
	<!--#}#-->
	<!--#if($v['cate_id']){#-->
	<a href="javascript:;" onclick="aconfirm('确认取消公共共享文件?','{#urr("mydisk","item=share&menu=file&action=cancle_public_file2&file_id=$v[file_id]")#}');" title="取消公共共享文件"><img src="images/share_file.gif" border="0" align="absmiddle" /></a>
	<!--#}#-->
	<a href="{#urr("mydisk","item=message&menu=profile&action=sendmsg&file_id=$v[file_id]")#}" title="发送文件"><img src="images/icon_reply.gif" border="0" align="absmiddle"/></a>
	<a href="javascript:;" onclick="abox('{$v['a_out_share']}','{$v[link_txt]}',550,400);" title="{$v[link_txt]}"><img src="images/{$v[link_ico]}" border="0" align="absmiddle" alt="{$v[link_txt]}" /></a>
	<!--#if($v['use_code']){#-->
	<img src="images/ico_code.gif" id="cp_{$v[file_id]}" onmouseover="copy_text('cp_{$v[file_id]}','{$v[file_key]}','文件提取码复制成功')" border="0" align="absmiddle" alt="文件提取码" />
	<!--#}#-->
	<a href="javascript:;" onclick="abox('{$v['a_file_modify']}','<?=__('file_modify')?>',450,280);" title="<?=__('modify')?>"><img src="images/edit_icon.gif" border="0" align="absmiddle" /></a>
	<a href="javascript:;" onclick="abox('{$v['a_file_delete']}','<?=__('file_delete')?>',400,200);" title="<?=__('delete')?>"><img src="images/recycle_icon.gif" border="0" align="absmiddle" /></a>
	</td>
</tr>
<!--#		
	}
}
#-->
<!--#if(!count($files_array)){#-->
<tr class="color4">
	<td align="center" colspan="6">
	<!--#if($action=='search'){#-->
	<?=__('search_is_empty')?>
	<!--#}else{#-->
	<?=__('folder_is_empty')?> , <a href="javascript:;" onclick="abox('{$nav_arr['a_upload_file']}','<?=__('upload_file')?>',650,450);"><?=__('upload_file')?></a>
	<!--#}#-->
	</td>
</tr>
<!--#}#-->
</tbody>
<!--#if($page_nav){#-->
<tr>
	<td colspan="6" style="padding:5px 0;">{$page_nav}</td>
</tr>
<!--#}#-->
<tr>
	<td colspan="6" style="padding:5px 0;"><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="button" class="btn_green" id="to_folder" value="<?=__('my_folder')?>" />&nbsp;
	<input type="button" class="btn_green" id="is_link_code" value="<?=__('is_link_code')?>" />&nbsp;
	<input type="button" class="btn_green" id="p_sfb" value="共享文件" />&nbsp;
	<div id="c_sfb" class="menu_pop2" style=" text-align:center;">
	<!--#if(get_group_power($pd_gid,'cancle_public_file',1) && $settings[open_public_file]){#-->
	<a id="cancle_public" href="javascript:;">取消公共共享</a>
	<!--#}#-->
	<!--#if(get_group_power($pd_gid,'can_public_file',1) && $settings[open_public_file]){#-->
	<a id="to_public" href="javascript:;">设置公共共享</a>
	<!--#}#-->
	<a id="to_share_corp" href="javascript:;">共享给公司</a>
	<a id="to_share_depart" href="javascript:;">共享给部门</a>
	<!--#if(get_group_power($pd_gid,'can_share_file_to_other_depart',1)){#-->
	<a id="to_share_other_depart" href="javascript:;">共享给其他部门</a>
	<!--#}#-->
	<a id="to_share_buddy" href="javascript:;">共享给好友</a>
	</div>
	<script type="text/javascript">on_menu('p_sfb','c_sfb','-y','','');</script>
	<input type="button" class="btn_green" id="to_recycle" value="<?=__('move_to_recycle')?>" />&nbsp;	
	</td>
</tr>
<!--#}#-->
</table>
</form>
</div>
<!--#
}elseif($action =='file_modify'){
#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=files")#}" 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><?=__('file_name')?>(<?=__('none_extension')?>):</li>
<li><input type="text" name="file_name" value="{$file['file_name']}" style="width:350px" maxlength="50" /></li>
<!--#if(get_group_power($pd_gid,'can_public_file',1) && $settings[open_public_file]){#-->
<li>公共文件分类:</li>
<li><select name="cate_id">
<option value="0">- 未分类 -</option>
{#get_cate_option(0,$file[cate_id]);#}
</select></li>
<!--#}#-->
<li><?=__('file_description')?>(<?=__('optional')?>): </li>
<li><textarea name="file_description" style="width:350px; height:60px;">{$file['file_description']}</textarea></li>
<li><input type="submit" class="btn_green" value="<?=__('btn_submit')?>" />
</form>
</div>
</div>
<script language="javascript">
function dosubmit(o){
	if(o.file_name.value.strtrim().length <1){
		atips("<?=__('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=files")#}" 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_confirm')?></li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_delete')?>" /></li>
</div>
</form>
</div>
</div>
<!--#
}elseif($action =='to_recycle'){
#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=files")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="file_ids" value="{$file_ids}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<div class="cfm_info">
<li class="txtred">确认批量删除选中文件到回收站吗？</li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_delete')?>" /></li>
</div>
</form>
</div>
</div>
<!--#
}else if($action =='make_link_code'){
#-->
<div id="container">
<div class="box_style">
<div><?=__('make_link_mode')?>: <a href="javascript:void(0);" onclick="get_mode('ubb');">[UBB]</a> - <a href="javascript:void(0);" onclick="get_mode('img');">[IMG]</a> - <a href="javascript:void(0);" onclick="get_mode('img2');">&lt;IMG&gt;</a> - <a href="javascript:void(0);" onclick="get_mode('html');">[HTML]</a> - <a href="javascript:void(0);" onclick="get_mode('url');">[URL]</a></div>
<textarea id="link_area" style="width:98%; height:250px"></textarea><br />
<input type="button" class="btn_green" style="margin-top:3px;" value="<?=__('copy_text')?>" onclick="getId('link_area').select();copy_text2('link_area');" />
</div>
</div>
<script language="javascript">
var upl_array = new Array();
<!--#
if(count($upl_array)){
	foreach($upl_array as $k => $v){
#-->
upl_array[{$k}] = {"file_name":"{$v['file_name_all']}","file_link":"{$v['file_link']}","file_link_img":"{$v['file_link_img']}"};
<!--#
	}
	unset($upl_array);
}
#-->
function get_mode(type){
	var str = '';
	for(var i=0;i<upl_array.length;i++){
		var file = upl_array[i];
		switch(type){
			case 'ubb':
				var line = '[url=' + file['file_link'] + ']'+file['file_name']+'[/url]';
			break;
			
			case 'img':
				var line = '[img]' + file['file_link_img'] + '[/img]';
			break;
			
			case 'img2':
				var line = '<img src="' + file['file_link_img'] + '" border="0" />';
			break;
			
			case 'html':
				var line = '<a href="' + file['file_link'] + '" >'+file['file_name']+'</a>';
			break;
			
			case 'url':
				var line = file['file_link_img'];
			break;
			
		}
		str += line + "\n";
	}	
	if(document.all){
		getId('link_area').innerText = str;
	}else{
		getId('link_area').innerHTML = str;
	}
}
get_mode('ubb');
</script>
<!--#
}elseif($action =='to_folder'){
#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=files")#}" 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="file_ids" value="{$file_ids}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<li>目标文件夹:&nbsp;&nbsp;<select name="dest_fid">
	<option value="-1" class="txtblue" {#ifselected($folder_id,'-1','str')#} >根目录</option>
	{#get_folder_option(-1,$folder_id)#}
	</select>
</li>
<li style="margin-top:10px;">移动后跳转到：&nbsp;&nbsp;<input type="radio" name="go_folder" value="0" checked="checked" />当前文件夹&nbsp;&nbsp;<input type="radio" name="go_folder" value="1" />目标文件夹</li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_submit')?>" /></li>
</form>
</div>
</div>
<!--#
}elseif($action =='out_share'){
#-->
<div id="container">
<div class="box_style">
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b><?=__('tips')?>: </b>
<span class="txtgray"><?=__('modify_password_tips')?></span>
</div>
<form action="{#urr("mydisk","item=files")#}" 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}" />
<li class="txtgray"><span class="f20">1.</span>使用提取码(使用时间不限):</li>
<li><input type="radio" name="use_code" value="1" {#ifchecked($pa[use_code],1)#} onclick="show_code(1);" />是&nbsp;&nbsp;
<input type="radio" name="use_code" value="0" {#ifchecked($pa[use_code],0)#} onclick="show_code(0);" />否&nbsp;&nbsp;
<span id="s_box"><input type="text" value="{$pa[file_key]}" readonly /><input type="button" value="复制" class="btn" id="cp" onmouseover="copy_text('cp','{$pa[file_key]}','文件提取码复制成功')"/></span>
</li>
<li>&nbsp;</li>
<li class="txtgray"><span class="f20">2.</span>文件共享链接：</li>
<li><input type="text" value="{$settings[phpdisk_url]}{#urr("viewfile","file_id=$pa[file_id]")#}" size="50" readonly /><input type="button" value="复制" class="btn" id="cp2" onmouseover="copy_text('cp2','{$settings[phpdisk_url]}{#urr("viewfile","file_id=$pa[file_id]")#}','文件链接复制成功')"/></li>
<li class="txtgray">设置文件共享时间：</li>
<!--#if($auth[link_expire]){#-->
<li><select id="et" onchange="$('#expire_time').val($('#et').val());">
<option value="">- 请选择 -</option>
<option value="604800">一周</option>
</select>&nbsp;<input type="hidden" name="expire_time" id="expire_time" value="{$pa[expire_time]}" readonly /></li>
<!--#}else{#-->
<li><select id="et" onchange="$('#expire_time').val($('#et').val());">
<option value="">- 请选择 -</option>
<option value="86400">一天</option>
<option value="172800">两天</option>
<option value="259200">三天</option>
<option value="604800">一周</option>
<option value="1209600">两周</option>
<option value="2592000">一个月</option>
<option value="7776000">三个月</option>
<option value="31536000">一年</option>
</select>&nbsp;<input type="hidden" name="expire_time" id="expire_time" value="{$pa[expire_time]}" /></li>
<!--#}#-->
<li class="txtgray">共享链接到期时间：</li>
<li>{$pa[share_end_time]} </li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_submit')?>" /></li>
</form>
</div>
</div>
<script type="text/javascript">
function show_code(id){
	if(id==1){
	$('#s_box').show();
	}else{
	$('#s_box').hide();
	}
}
show_code({$pa[use_code]});
</script>
<!--#}#-->
<script type="text/javascript" src="includes/js/ZeroClipboard.js"></script>
<script language="javascript">
ZeroClipboard.setMoviePath( "includes/js/ZeroClipboard.swf" ); 
function copy_text(btn_id,txt,msg){
	clip = new ZeroClipboard.Client();
	clip.setHandCursor(true);
	clip.addEventListener('mouseOver', function (client) {
		clip.setText(txt);
	});
	clip.addEventListener('complete', function (client, text) {
		atips(msg);
	});
	clip.glue(btn_id);
}
function copy_text2(id){
	var field = getId(id);
	if (field){
		if(document.all){
			field.createTextRange().execCommand('copy');
			atips("<?=__('copy_success')?>");
		}else{
			atips("请复制选定的文件链接");
		}	
	}
}
</script>