📄 public.tpl.php
字号:
<?php
// This is PHPDISK auto-generated file. Do NOT modify me.
if(!defined('IN_PHPDISK'))
exit('[PHPDisk] Access Denied');
?>
<?php
##
# Project: PHPDisk
# This is NOT a freeware, use is subject to license terms.
#
# Site: http://www.phpdisk.com
#
# $Id: public.tpl.php 250 2009-03-10 17:29:43Z along $
#
# Copyright (C) 2008-2009 PHPDisk Team. All Rights Reserved.
#
##
?>
<?php
if($action =='index' || $action =='search'){
?>
<div id="container">
<h1><?=$lang['public_title']?></h1>
<div style="padding:10px;">
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b><?=$lang['tips']?>: </b>
<span class="txtgray"><?=$lang['public_title_tips']?></span>
</div>
<form name="search_frm" action="<?=urr("admincp","")?>" method="get" onsubmit="return dosearch(this);">
<input type="hidden" name="item" value="public" />
<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" />
<?=$lang['view_mode']?>:
<select id="view" onchange="chg_view();">
<option value="0" class="txtgreen"><?=$lang['please_select']?></option>
<option value="all_file" <?=ifselected('all_file',$view,'str');?>><?=$lang['all_file']?></option>
<option value="uncheck_file" <?=ifselected('uncheck_file',$view,'str');?>><?=$lang['uncheck_file']?></option>
<option value="checked_file" <?=ifselected('checked_file',$view,'str');?>><?=$lang['checked_file']?></option>
<option value="public_recycle" <?=ifselected('public_recycle',$view,'str');?>><?=$lang['public_recycle']?></option>
</select>
</div>
<div class="r"><input type="text" name="word" value="<?=$word?>" title="<?=$lang['search_files_tips']?>" /> <input type="submit" class="btn" value="<?=$lang['search_files']?>" /></div>
</div>
</form>
<div class="clear"></div>
<script language="javascript">
function chg_view(){
var view = $('view').value.strtrim();
document.location.href = '<?=urr("admincp","item=public&action=index&view='+view+'")?>';
}
function dosearch(o){
if(o.word.value.strtrim().length <1){
o.word.focus();
return false;
}
}
</script>
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<?php
if(count($files_array) >0){
?>
<tr>
<td width="40%" class="bold"><?=$lang['file_name']?></td>
<td class="bold"> </td>
<td align="center" class="bold"><?=$lang['file_size']?></td>
<td align="center" width="150" class="bold"><?=$lang['file_upload_time']?></td>
<td align="center" width="80" class="bold"><?=$lang['operation']?></td>
</tr>
<form name="public_frm" action="<?=urr("admincp","item=public")?>" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="action" value="<?=$action?>"/>
<input type="hidden" name="formhash" value="<?=$formhash?>" />
<?php
foreach($files_array as $k => $v){
$color = ($k%2 ==0) ? 'color1' :'color4';
?>
<tr class="<?=$color?>" height="20">
<td width="40%" class="td_line"><input type="checkbox" name="file_ids[]" id="file_ids" value="<?=$v['file_id']?>" /> <a href="<?=urr("downfile","action=public&file_id={$v['file_id']}&file_key={$v['file_key']}")?>" title="<?=$lang['download']?>"><?=file_icon($v['file_extension'])?></a>
<?php if($v['is_image']){ ?>
<a href="<?=urr("viewfile","action=public&file_id={$v['file_id']}&file_key={$v['file_key']}")?>" id="m_<?=$k?>" onMouseOver="show_thumb('<?=$v['file_id']?>','public');show_menu('m_<?=$k?>','div_<?=$k?>','show','right');" onMouseOut="show_menu('m_<?=$k?>','div_<?=$k?>','hide','right')" target="_blank" title="<?=$v['file_name_all']?> <?=$v['file_size']?>"><?=$v['file_name']?></a><br />
<div id="div_<?=$k?>" class="menu_thumb"><img id="thb_<?=$v['file_id']?>" src="<?=$tpl_dir?>/images/ajax_loading.gif" /></div>
<?php }else{ ?>
<a href="<?=urr("viewfile","action=public&file_id={$v['file_id']}&file_key={$v['file_key']}")?>" target="_blank" title="<?=$v['file_name_all']?> <?=$v['file_size']?>"><?=$v['file_name']?></a>
<?php } ?>
</td>
<td class="td_line"> </td>
<td align="center" class="td_line"><?=$v['file_size']?></td>
<td align="center" width="150" class="td_line txtgray"><?=$v['file_time']?></td>
<td align="center" class="td_line">
<?php if($v['in_recycle']){ ?>
<a href="<?=urr("admincp","item=public&action=recycle_delete&file_id={$v['file_id']}")?>" onclick="return confirm('<?=$lang['recycle_delete_confirm']?>');" title="<?=$lang['delete_recycle_title']?>"><?=$lang['delete']?></a>
<?php }else{ ?>
<a href="<?=urr("admincp","item=public&action=file_delete&file_id={$v['file_id']}")?>" onclick="return confirm('<?=$lang['delete_confirm']?>');" title="<?=$lang['folder_go_recycle']?>"><?=$lang['delete']?></a>
<?php } ?>
</td>
</tr>
<?php
}
unset($files_array);
?>
<?php if($view <>'public_recycle'){ ?>
<tr>
<td colspan="6"><a href="javascript:void(0);" onclick="reverse_ids();"><?=$lang['select_all']?></a> <a href="javascript:void(0);" onclick="cancel_ids();"><?=$lang['select_cancel']?></a> <input type="radio" name="task" value="check_public" checked="checked" /><?=$lang['check_public']?> <input type="radio" name="task" value="delete_to_recycle" /><?=$lang['delete_selected']?> <input type="submit" class="btn" value="<?=$lang['btn_submit']?>" /></td>
</tr>
<?php } ?>
</form>
<?php
}else{
?>
<tr>
<td colspan="6"><?=$lang['file_not_found']?></td>
</tr>
<?php
}
?>
</table>
<?=$page_nav?>
</div>
</div>
<script language="javascript">
function reverse_ids(){
for (var i=0;i<document.public_frm.file_ids.length;i++) {
var ids = document.public_frm.file_ids[i];
ids.checked = !ids.checked;
}
}
function cancel_ids(){
for (var i=0;i<document.public_frm.file_ids.length;i++) {
var ids = document.public_frm.file_ids[i];
ids.checked = false;
}
}
function checkbox(){
n = document.getElementsByName("file_ids[]");
var j =0;
for(i = 0; i < n.length; i++){
if(n[i].checked){
j++;
}
}
if(j ==0){
alert("<?=$lang['please_select_operation_files']?>");
return false;
}else{
return true;
}
}
function dosubmit(o){
if(checkbox() != true){
return false;
}
}
</script>
<?php }elseif($action =='setting'){ ?>
<div id="container">
<h1><?=$lang['public_setting']?></h1>
<div style="padding:10px;">
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b><?=$lang['tips']?>: </b>
<span class="txtgray"><?=$lang['public_setting_tips']?></span><br />
<span class="txtred"><?=$public_file_path_tips?></span>
</div>
<form action="<?=urr("admincp","item=public")?>" method="post" onsubmit="return chksettings();">
<input type="hidden" name="action" value="<?=$action?>"/>
<input type="hidden" name="task" value="<?=$action?>"/>
<input type="hidden" name="formhash" value="<?=$formhash?>" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
<td width="40%"><span class="bold"><?=$lang['public_file_path']?></span>: <br /><em><?=$lang['public_file_path_tips']?></em></td>
<td><input type="text" id="public_file_path" name="setting[public_file_path]" value="<?=$setting['public_file_path']?>" maxlength="30"/></td>
</tr>
<tr>
<td><span class="bold"><?=$lang['public_upload']?></span>: <br /><em><?=$lang['public_upload_tips']?></em></td>
<td><input type="radio" name="setting[public_upload]" value="1" <?=ifchecked(1,$setting['public_upload'])?> /> <?=$lang['yes']?> <input type="radio" name="setting[public_upload]" value="0" <?=ifchecked(0,$setting['public_upload'])?>/> <?=$lang['no']?></td>
</tr>
<tr>
<td><span class="bold"><?=$lang['anonymous_upload']?></span>: <br /><em><?=$lang['anonymous_upload_tips']?></em></td>
<td><input type="radio" name="setting[anonymous_upload]" value="1" <?=ifchecked(1,$setting['anonymous_upload'])?> /> <?=$lang['yes']?> <input type="radio" name="setting[anonymous_upload]" value="0" <?=ifchecked(0,$setting['anonymous_upload'])?>/> <?=$lang['no']?></td>
</tr>
<tr>
<td><span class="bold"><?=$lang['check_public_file']?></span>: <br /><em><?=$lang['check_public_file_tips']?></em></td>
<td><input type="radio" name="setting[check_public_file]" value="1" <?=ifchecked(1,$setting['check_public_file'])?> /> <?=$lang['yes']?> <input type="radio" name="setting[check_public_file]" value="0" <?=ifchecked(0,$setting['check_public_file'])?>/> <?=$lang['no']?></td>
</tr>
<tr>
<td><span class="bold"><?=$lang['public_max_flow_view']?></span>: <br /><em><?=$lang['public_max_flow_view_tips']?></em></td>
<td><input type="text" name="setting[public_max_flow_view]" value="<?=$setting['public_max_flow_view']?>" /> <?=$lang['current_public_flow_view']?>: <b><?=$stats['public_view_flow_count']?></b> <input type="button" class="btn" onclick="go('<?=urr("admincp","item=public&action=reset_bw&task=view_reset")?>')" value="<?=$lang['reset_flow']?>" /></td>
</tr>
<tr>
<td><span class="bold"><?=$lang['public_max_flow_down']?></span>: <br /><em><?=$lang['public_max_flow_down_tips']?></em></td>
<td><input type="text" name="setting[public_max_flow_down]" value="<?=$setting['public_max_flow_down']?>" /> <?=$lang['current_public_flow_down']?>: <b><?=$stats['public_down_flow_count']?></b> <input type="button" class="btn" onclick="go('<?=urr("admincp","item=public&action=reset_bw&task=down_reset")?>')" value="<?=$lang['reset_flow']?>" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" class="btn" value="<?=$lang['btn_update']?>"/></td>
</tr>
</table>
</form>
<script language="javascript">
function chksettings(){
if($('public_file_path').value.strtrim().length <1){
$('public_file_path').focus();
alert("<?=$lang['js_public_file_path']?>");
return false;
}
}
</script>
</div>
</div>
<?php } ?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -