|
|
|
@ -4,17 +4,14 @@ $time = time();
|
|
|
|
|
|
|
|
|
|
$config = include 'config/config.php'; |
|
|
|
|
|
|
|
|
|
//TODO switch to array |
|
|
|
|
extract($config, EXTR_OVERWRITE); |
|
|
|
|
|
|
|
|
|
if (USE_ACCESS_KEYS == TRUE){ |
|
|
|
|
if (!isset($_GET['akey'], $access_keys) || empty($access_keys)){ |
|
|
|
|
if (!isset($_GET['akey'], $config['access_keys']) || empty($config['access_keys'])){ |
|
|
|
|
die('Access Denied!'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$_GET['akey'] = strip_tags(preg_replace( "/[^a-zA-Z0-9\._-]/", '', $_GET['akey'])); |
|
|
|
|
|
|
|
|
|
if (!in_array($_GET['akey'], $access_keys)){ |
|
|
|
|
if (!in_array($_GET['akey'], $config['access_keys'])){ |
|
|
|
|
die('Access Denied!'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -24,19 +21,22 @@ $_SESSION['RF']["verify"] = "RESPONSIVEfilemanager";
|
|
|
|
|
if(isset($_POST['submit'])){ |
|
|
|
|
include 'upload.php'; |
|
|
|
|
}else{ |
|
|
|
|
$config['default_language'] = $config['default_language']; |
|
|
|
|
$available_languages = include 'lang/languages.php'; |
|
|
|
|
|
|
|
|
|
$lang = $config['default_language']; |
|
|
|
|
$languages = include 'lang/languages.php'; |
|
|
|
|
if (isset($_GET['lang'])) |
|
|
|
|
{ |
|
|
|
|
$lang = strip_tags($_GET['lang']); |
|
|
|
|
if(array_key_exists($lang,$languages)){ |
|
|
|
|
$_SESSION['RF']['language'] = $lang; |
|
|
|
|
list($preferred_language) = array_values(array_filter(array( |
|
|
|
|
isset($_GET['lang']) ? $_GET['lang'] : null, |
|
|
|
|
isset($_SESSION['RF']['language']) ? $_SESSION['RF']['language'] : null, |
|
|
|
|
$config['default_language'] |
|
|
|
|
))); |
|
|
|
|
|
|
|
|
|
if(array_key_exists($preferred_language, $available_languages)) |
|
|
|
|
{ |
|
|
|
|
$_SESSION['RF']['language'] = $preferred_language; |
|
|
|
|
} |
|
|
|
|
}elseif(isset($_SESSION['RF']['language']) && $_SESSION['RF']['language']) |
|
|
|
|
$lang = strip_tags($_SESSION['RF']['language']); |
|
|
|
|
if(array_key_exists($lang,$languages)){ |
|
|
|
|
$_SESSION['RF']['language'] = $lang; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$_SESSION['RF']['language'] = $config['default_language']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
include 'include/utils.php'; |
|
|
|
@ -47,10 +47,8 @@ if (isset($_GET['fldr']) && !empty($_GET['fldr'])) {
|
|
|
|
|
}elseif(isset($_SESSION['RF']['fldr']) && !empty($_SESSION['RF']['fldr'])){ |
|
|
|
|
$subdir_path = rawurldecode(trim(strip_tags($_SESSION['RF']['fldr']),"/")); |
|
|
|
|
} |
|
|
|
|
if (strpos($subdir_path,'../') === FALSE |
|
|
|
|
&& strpos($subdir_path,'./') === FALSE |
|
|
|
|
&& strpos($subdir_path,'..\\') === FALSE |
|
|
|
|
&& strpos($subdir_path,'.\\') === FALSE) |
|
|
|
|
|
|
|
|
|
if ( checkRelativePath($subdir_path)) |
|
|
|
|
{ |
|
|
|
|
$subdir = strip_tags($subdir_path) ."/"; |
|
|
|
|
$_SESSION['RF']['fldr'] = $subdir_path; |
|
|
|
@ -70,11 +68,11 @@ setcookie('last_position',$subdir,time() + (86400 * 7));
|
|
|
|
|
if ($subdir == "/") { $subdir = ""; } |
|
|
|
|
|
|
|
|
|
// If hidden folders are specified |
|
|
|
|
if(count($hidden_folders)){ |
|
|
|
|
if(count($config['hidden_folders'])){ |
|
|
|
|
// If hidden folder appears in the path specified in URL parameter "fldr" |
|
|
|
|
$dirs = explode('/', $subdir); |
|
|
|
|
foreach($dirs as $dir){ |
|
|
|
|
if($dir !== '' && in_array($dir, $hidden_folders)){ |
|
|
|
|
if($dir !== '' && in_array($dir, $config['hidden_folders'])){ |
|
|
|
|
// Ignore the path |
|
|
|
|
$subdir = ""; |
|
|
|
|
break; |
|
|
|
@ -82,8 +80,8 @@ if(count($hidden_folders)){
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($show_total_size) { |
|
|
|
|
list($sizeCurrentFolder,$fileCurrentNum,$foldersCurrentCount) = folder_info($current_path,false); |
|
|
|
|
if ($config['show_total_size']) { |
|
|
|
|
list($sizeCurrentFolder,$fileCurrentNum,$foldersCurrentCount) = folder_info($config['current_path'],false); |
|
|
|
|
} |
|
|
|
|
/*** |
|
|
|
|
*SUB-DIR CODE |
|
|
|
@ -94,9 +92,10 @@ if (!isset($_SESSION['RF']["subfolder"]))
|
|
|
|
|
} |
|
|
|
|
$rfm_subfolder = ''; |
|
|
|
|
|
|
|
|
|
if (!empty($_SESSION['RF']["subfolder"]) && strpos($_SESSION['RF']["subfolder"],'../') === FALSE && strpos($_SESSION['RF']["subfolder"],'..\\') === FALSE |
|
|
|
|
&& strpos($_SESSION['RF']["subfolder"],'./') === FALSE && strpos($_SESSION['RF']["subfolder"],"/") !== 0 |
|
|
|
|
&& strpos($_SESSION['RF']["subfolder"],'.') === FALSE) |
|
|
|
|
if (!empty($_SESSION['RF']["subfolder"]) |
|
|
|
|
&& strpos($_SESSION['RF']["subfolder"],"/") !== 0 |
|
|
|
|
&& strpos($_SESSION['RF']["subfolder"],'.') === FALSE |
|
|
|
|
) |
|
|
|
|
{ |
|
|
|
|
$rfm_subfolder = $_SESSION['RF']['subfolder']; |
|
|
|
|
} |
|
|
|
@ -105,23 +104,23 @@ if ($rfm_subfolder != "" && $rfm_subfolder[strlen($rfm_subfolder)-1] != "/") { $
|
|
|
|
|
|
|
|
|
|
$ftp=ftp_con($config); |
|
|
|
|
|
|
|
|
|
if (($ftp && !$ftp->isDir($ftp_base_folder.$upload_dir.$rfm_subfolder.$subdir)) || (!$ftp && !file_exists($current_path.$rfm_subfolder.$subdir))) |
|
|
|
|
if (($ftp && !$ftp->isDir($config['ftp_base_folder'].$config['upload_dir'].$rfm_subfolder.$subdir)) || (!$ftp && !file_exists($config['current_path'].$rfm_subfolder.$subdir))) |
|
|
|
|
{ |
|
|
|
|
$subdir = ''; |
|
|
|
|
$rfm_subfolder = ""; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$cur_dir = $upload_dir.$rfm_subfolder.$subdir; |
|
|
|
|
$cur_path = $current_path.$rfm_subfolder.$subdir; |
|
|
|
|
$thumbs_path = $thumbs_base_path.$rfm_subfolder; |
|
|
|
|
$cur_dir = $config['upload_dir'].$rfm_subfolder.$subdir; |
|
|
|
|
$cur_path = $config['current_path'].$rfm_subfolder.$subdir; |
|
|
|
|
$thumbs_path = $config['thumbs_base_path'].$rfm_subfolder; |
|
|
|
|
$parent = $rfm_subfolder.$subdir; |
|
|
|
|
|
|
|
|
|
if($ftp){ |
|
|
|
|
$cur_dir = $ftp_base_folder.$cur_dir; |
|
|
|
|
$cur_dir = $config['ftp_base_folder'].$cur_dir; |
|
|
|
|
$cur_path = str_replace(array('/..','..'),'',$cur_dir); |
|
|
|
|
$thumbs_path = str_replace(array('/..','..'),'',$ftp_base_folder.$ftp_thumbs_dir.$rfm_subfolder); |
|
|
|
|
$parent = $ftp_base_folder.$parent; |
|
|
|
|
$thumbs_path = str_replace(array('/..','..'),'',$config['ftp_base_folder'].$config['ftp_thumbs_dir'].$rfm_subfolder); |
|
|
|
|
$parent = $config['ftp_base_folder'].$parent; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!$ftp){ |
|
|
|
@ -132,11 +131,10 @@ if(!$ftp){
|
|
|
|
|
$i++; |
|
|
|
|
if ($parent=="./") $parent=""; |
|
|
|
|
|
|
|
|
|
if (file_exists($current_path.$parent."config.php")) |
|
|
|
|
if (file_exists($config['current_path'].$parent."config.php")) |
|
|
|
|
{ |
|
|
|
|
$configTemp = include $current_path.$parent.'config.php'; |
|
|
|
|
$configTemp = include $config['current_path'].$parent.'config.php'; |
|
|
|
|
$config = array_merge($config,$configTemp); |
|
|
|
|
extract($config, EXTR_OVERWRITE); |
|
|
|
|
$cycle = FALSE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -192,7 +190,7 @@ $crossdomain=!!$crossdomain;
|
|
|
|
|
//view type |
|
|
|
|
if(!isset($_SESSION['RF']["view_type"])) |
|
|
|
|
{ |
|
|
|
|
$view = $default_view; |
|
|
|
|
$view = $config['default_view']; |
|
|
|
|
$_SESSION['RF']["view_type"] = $view; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -253,7 +251,7 @@ if (isset($_GET['extensions'])){
|
|
|
|
|
$ext_tmp = array(); |
|
|
|
|
foreach($extensions as $extension){ |
|
|
|
|
$extension = fix_strtolower($extension); |
|
|
|
|
if(in_array( $extension, $config['ext'])){ |
|
|
|
|
if(check_file_extension( $extension, $config)){ |
|
|
|
|
$ext_tmp[]=$extension; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -311,7 +309,7 @@ $get_params['fldr'] ='';
|
|
|
|
|
$get_params = http_build_query($get_params); |
|
|
|
|
?> |
|
|
|
|
<!DOCTYPE html> |
|
|
|
|
<html xmlns="https://www.w3.org/1999/xhtml"> |
|
|
|
|
<html> |
|
|
|
|
<head> |
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > |
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
|
@ -325,7 +323,7 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<!-- CSS adjustments for browsers with JavaScript disabled --> |
|
|
|
|
<noscript><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"></noscript> |
|
|
|
|
<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript> |
|
|
|
|
<link href="js/jPlayer/skin/blue.monday/jplayer.blue.monday.css" rel="stylesheet" type="text/css"> |
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jplayer/2.2.0/skin/blue.monday/jplayer.blue.monday.min.css" /> |
|
|
|
|
<link href="css/style.css?v=<?php echo $version; ?>" rel="stylesheet" type="text/css" />
|
|
|
|
|
<!--[if lt IE 8]><style> |
|
|
|
|
.img-container span, .img-container-mini span { |
|
|
|
@ -337,11 +335,11 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> |
|
|
|
|
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js" type="text/javascript"></script> |
|
|
|
|
<script src="js/plugins.js?v=<?php echo $version; ?>"></script>
|
|
|
|
|
<script src="js/jPlayer/jquery.jplayer/jquery.jplayer.js"></script> |
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/jplayer/jquery.jplayer.min.js"></script> |
|
|
|
|
<script src="js/modernizr.custom.js"></script> |
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
if ($aviary_active){ |
|
|
|
|
if ($config['aviary_active']){ |
|
|
|
|
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) { ?> |
|
|
|
|
<script src="https://dme0ih8comzn4.cloudfront.net/imaging/v3/editor.js"></script> |
|
|
|
|
<?php }else{ ?> |
|
|
|
@ -354,12 +352,12 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<![endif]--> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
var ext_img=new Array('<?php echo implode("','", $ext_img)?>');
|
|
|
|
|
var image_editor=<?php echo $aviary_active?"true":"false";?>;
|
|
|
|
|
var ext_img=new Array('<?php echo implode("','", $config['ext_img'])?>');
|
|
|
|
|
var image_editor=<?php echo $config['aviary_active']?"true":"false";?>;
|
|
|
|
|
if (image_editor) { |
|
|
|
|
var featherEditor = new Aviary.Feather({ |
|
|
|
|
<?php |
|
|
|
|
foreach ($aviary_defaults_config as $aopt_key => $aopt_val) { |
|
|
|
|
foreach ($config['aviary_defaults_config'] as $aopt_key => $aopt_val) { |
|
|
|
|
echo $aopt_key.": ".json_encode($aopt_val).","; |
|
|
|
|
} ?> |
|
|
|
|
onReady: function() { |
|
|
|
@ -430,7 +428,7 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<input type="hidden" id="field_id" value="<?php echo $field_id;?>" />
|
|
|
|
|
<input type="hidden" id="multiple" value="<?php echo $multiple;?>" />
|
|
|
|
|
<input type="hidden" id="type_param" value="<?php echo $type_param;?>" />
|
|
|
|
|
<input type="hidden" id="upload_dir" value="<?php echo $upload_dir;?>" />
|
|
|
|
|
<input type="hidden" id="upload_dir" value="<?php echo $config['upload_dir'];?>" />
|
|
|
|
|
<input type="hidden" id="cur_dir" value="<?php echo $cur_dir;?>" />
|
|
|
|
|
<input type="hidden" id="cur_dir_thumb" value="<?php echo $thumbs_path.$subdir;?>" />
|
|
|
|
|
<input type="hidden" id="insert_folder_name" value="<?php echo trans('Insert_Folder_Name');?>" />
|
|
|
|
@ -440,21 +438,21 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<input type="hidden" id="cancel" value="<?php echo trans('Cancel');?>" />
|
|
|
|
|
<input type="hidden" id="rename" value="<?php echo trans('Rename');?>" />
|
|
|
|
|
<input type="hidden" id="lang_duplicate" value="<?php echo trans('Duplicate');?>" />
|
|
|
|
|
<input type="hidden" id="duplicate" value="<?php if($duplicate_files) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="base_url" value="<?php echo $base_url?>"/>
|
|
|
|
|
<input type="hidden" id="ftp_base_url" value="<?php echo $ftp_base_url?>"/>
|
|
|
|
|
<input type="hidden" id="duplicate" value="<?php if($config['duplicate_files']) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="base_url" value="<?php echo $config['base_url']?>"/>
|
|
|
|
|
<input type="hidden" id="ftp_base_url" value="<?php echo $config['ftp_base_url']?>"/>
|
|
|
|
|
<input type="hidden" id="fldr_value" value="<?php echo $subdir;?>"/>
|
|
|
|
|
<input type="hidden" id="sub_folder" value="<?php echo $rfm_subfolder;?>"/>
|
|
|
|
|
<input type="hidden" id="return_relative_url" value="<?php echo $return_relative_url == true ? 1 : 0;?>"/>
|
|
|
|
|
<input type="hidden" id="file_number_limit_js" value="<?php echo $file_number_limit_js;?>" />
|
|
|
|
|
<input type="hidden" id="file_number_limit_js" value="<?php echo $config['file_number_limit_js'];?>" />
|
|
|
|
|
<input type="hidden" id="sort_by" value="<?php echo $sort_by;?>" />
|
|
|
|
|
<input type="hidden" id="descending" value="<?php echo $descending?1:0;?>" />
|
|
|
|
|
<input type="hidden" id="current_url" value="<?php echo str_replace(array('&filter='.$filter,'&sort_by='.$sort_by,'&descending='.intval($descending)),array(''),$base_url.$_SERVER['REQUEST_URI']);?>" />
|
|
|
|
|
<input type="hidden" id="current_url" value="<?php echo str_replace(array('&filter='.$filter,'&sort_by='.$sort_by,'&descending='.intval($descending)),array(''),$config['base_url'].$_SERVER['REQUEST_URI']);?>" />
|
|
|
|
|
<input type="hidden" id="lang_show_url" value="<?php echo trans('Show_url');?>" />
|
|
|
|
|
<input type="hidden" id="copy_cut_files_allowed" value="<?php if($config['copy_cut_files']) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="copy_cut_dirs_allowed" value="<?php if($config['copy_cut_dirs']) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="copy_cut_max_size" value="<?php echo $copy_cut_max_size;?>" />
|
|
|
|
|
<input type="hidden" id="copy_cut_max_count" value="<?php echo $copy_cut_max_count;?>" />
|
|
|
|
|
<input type="hidden" id="copy_cut_max_size" value="<?php echo $config['copy_cut_max_size'];?>" />
|
|
|
|
|
<input type="hidden" id="copy_cut_max_count" value="<?php echo $config['copy_cut_max_count'];?>" />
|
|
|
|
|
<input type="hidden" id="lang_copy" value="<?php echo trans('Copy');?>" />
|
|
|
|
|
<input type="hidden" id="lang_cut" value="<?php echo trans('Cut');?>" />
|
|
|
|
|
<input type="hidden" id="lang_paste" value="<?php echo trans('Paste');?>" />
|
|
|
|
@ -466,10 +464,10 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<input type="hidden" id="clipboard" value="<?php echo ((isset($_SESSION['RF']['clipboard']['path']) && trim($_SESSION['RF']['clipboard']['path']) != null) ? 1 : 0);?>" />
|
|
|
|
|
<input type="hidden" id="lang_clear_clipboard_confirm" value="<?php echo trans('Clear_Clipboard_Confirm');?>" />
|
|
|
|
|
<input type="hidden" id="lang_file_permission" value="<?php echo trans('File_Permission');?>" />
|
|
|
|
|
<input type="hidden" id="chmod_files_allowed" value="<?php if($chmod_files) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="chmod_dirs_allowed" value="<?php if($chmod_dirs) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="chmod_files_allowed" value="<?php if($config['chmod_files']) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="chmod_dirs_allowed" value="<?php if($config['chmod_dirs']) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="lang_lang_change" value="<?php echo trans('Lang_Change');?>" />
|
|
|
|
|
<input type="hidden" id="edit_text_files_allowed" value="<?php if($edit_text_files) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="edit_text_files_allowed" value="<?php if($config['edit_text_files']) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="lang_edit_file" value="<?php echo trans('Edit_File');?>" />
|
|
|
|
|
<input type="hidden" id="lang_new_file" value="<?php echo trans('New_File');?>" />
|
|
|
|
|
<input type="hidden" id="lang_filename" value="<?php echo trans('Filename');?>" />
|
|
|
|
@ -478,13 +476,14 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<input type="hidden" id="lang_error_upload" value="<?php echo trans('Error_Upload');?>" />
|
|
|
|
|
<input type="hidden" id="lang_select" value="<?php echo trans('Select');?>" />
|
|
|
|
|
<input type="hidden" id="lang_extract" value="<?php echo trans('Extract');?>" />
|
|
|
|
|
<input type="hidden" id="transliteration" value="<?php echo $transliteration?"true":"false";?>" />
|
|
|
|
|
<input type="hidden" id="convert_spaces" value="<?php echo $convert_spaces?"true":"false";?>" />
|
|
|
|
|
<input type="hidden" id="replace_with" value="<?php echo $convert_spaces? $replace_with : "";?>" />
|
|
|
|
|
<input type="hidden" id="lower_case" value="<?php echo $lower_case?"true":"false";?>" />
|
|
|
|
|
<input type="hidden" id="show_folder_size" value="<?php echo $show_folder_size;?>" />
|
|
|
|
|
<input type="hidden" id="add_time_to_img" value="<?php echo $add_time_to_img;?>" />
|
|
|
|
|
<?php if($upload_files){ ?> |
|
|
|
|
<input type="hidden" id="extract_files" value="<?php if($config['extract_files']) echo 1; else echo 0;?>" />
|
|
|
|
|
<input type="hidden" id="transliteration" value="<?php echo $config['transliteration']?"true":"false";?>" />
|
|
|
|
|
<input type="hidden" id="convert_spaces" value="<?php echo $config['convert_spaces']?"true":"false";?>" />
|
|
|
|
|
<input type="hidden" id="replace_with" value="<?php echo $config['convert_spaces']? $config['replace_with'] : "";?>" />
|
|
|
|
|
<input type="hidden" id="lower_case" value="<?php echo $config['lower_case']?"true":"false";?>" />
|
|
|
|
|
<input type="hidden" id="show_folder_size" value="<?php echo $config['show_folder_size'];?>" />
|
|
|
|
|
<input type="hidden" id="add_time_to_img" value="<?php echo $config['add_time_to_img'];?>" />
|
|
|
|
|
<?php if($config['upload_files']){ ?> |
|
|
|
|
<!-- uploader div start --> |
|
|
|
|
<div class="uploader"> |
|
|
|
|
<div class="flex"> |
|
|
|
@ -496,7 +495,7 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
<div class="container1"> |
|
|
|
|
<ul class="nav nav-tabs"> |
|
|
|
|
<li class="active"><a href="#baseUpload" data-toggle="tab"><?php echo trans('Upload_base');?></a></li>
|
|
|
|
|
<?php if($url_upload){ ?> |
|
|
|
|
<?php if($config['url_upload']){ ?> |
|
|
|
|
<li><a href="#urlUpload" data-toggle="tab"><?php echo trans('Upload_url');?></a></li>
|
|
|
|
|
<?php } ?> |
|
|
|
|
</ul> |
|
|
|
@ -601,7 +600,7 @@ $get_params = http_build_query($get_params);
|
|
|
|
|
{% } %} |
|
|
|
|
</script> |
|
|
|
|
</div> |
|
|
|
|
<?php if($url_upload){ ?> |
|
|
|
|
<?php if($config['url_upload']){ ?> |
|
|
|
|
<div class="tab-pane" id="urlUpload"> |
|
|
|
|
<br/> |
|
|
|
|
<form class="form-horizontal"> |
|
|
|
@ -634,9 +633,9 @@ $class_ext = '';
|
|
|
|
|
$src = ''; |
|
|
|
|
if($ftp){ |
|
|
|
|
try{ |
|
|
|
|
$files = $ftp->scanDir($ftp_base_folder.$upload_dir.$rfm_subfolder.$subdir); |
|
|
|
|
if (!$ftp->isDir($ftp_base_folder.$ftp_thumbs_dir.$rfm_subfolder.$subdir)){ |
|
|
|
|
create_folder(false,$ftp_base_folder.$ftp_thumbs_dir.$rfm_subfolder.$subdir,$ftp,$config); |
|
|
|
|
$files = $ftp->scanDir($config['ftp_base_folder'].$config['upload_dir'].$rfm_subfolder.$subdir); |
|
|
|
|
if (!$ftp->isDir($config['ftp_base_folder'].$config['ftp_thumbs_dir'].$rfm_subfolder.$subdir)){ |
|
|
|
|
create_folder(false,$config['ftp_base_folder'].$config['ftp_thumbs_dir'].$rfm_subfolder.$subdir,$ftp,$config); |
|
|
|
|
} |
|
|
|
|
}catch(FtpClient\FtpException $e){ |
|
|
|
|
echo "Error: "; |
|
|
|
@ -645,7 +644,7 @@ if($ftp){
|
|
|
|
|
die(); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
$files = scandir($current_path.$rfm_subfolder.$subdir); |
|
|
|
|
$files = scandir($config['current_path'].$rfm_subfolder.$subdir); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$n_files= count($files); |
|
|
|
@ -664,11 +663,14 @@ foreach($files as $k=>$file){
|
|
|
|
|
if($file['type']=='file'){ |
|
|
|
|
$current_files_number++; |
|
|
|
|
$file_ext = substr(strrchr($file['name'],'.'),1); |
|
|
|
|
$is_dir = false; |
|
|
|
|
}else{ |
|
|
|
|
$current_folders_number++; |
|
|
|
|
$file_ext=trans('Type_dir'); |
|
|
|
|
$is_dir = true; |
|
|
|
|
} |
|
|
|
|
$sorted[$k]=array( |
|
|
|
|
'is_dir'=>$is_dir, |
|
|
|
|
'file'=>$file['name'], |
|
|
|
|
'file_lcase'=>strtolower($file['name']), |
|
|
|
|
'date'=>$date, |
|
|
|
@ -680,16 +682,17 @@ foreach($files as $k=>$file){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($file!="." && $file!=".."){ |
|
|
|
|
if(is_dir($current_path.$rfm_subfolder.$subdir.$file)){ |
|
|
|
|
$date=filemtime($current_path.$rfm_subfolder.$subdir. $file); |
|
|
|
|
if(is_dir($config['current_path'].$rfm_subfolder.$subdir.$file)){ |
|
|
|
|
$date=filemtime($config['current_path'].$rfm_subfolder.$subdir. $file); |
|
|
|
|
$current_folders_number++; |
|
|
|
|
if($show_folder_size){ |
|
|
|
|
list($size,$nfiles,$nfolders) = folder_info($current_path.$rfm_subfolder.$subdir.$file,false); |
|
|
|
|
if($config['show_folder_size']){ |
|
|
|
|
list($size,$nfiles,$nfolders) = folder_info($config['current_path'].$rfm_subfolder.$subdir.$file,false); |
|
|
|
|
} else { |
|
|
|
|
$size=0; |
|
|
|
|
} |
|
|
|
|
$file_ext=trans('Type_dir'); |
|
|
|
|
$sorted[$k]=array( |
|
|
|
|
'is_dir'=>true, |
|
|
|
|
'file'=>$file, |
|
|
|
|
'file_lcase'=>strtolower($file), |
|
|
|
|
'date'=>$date, |
|
|
|
@ -697,17 +700,18 @@ foreach($files as $k=>$file){
|
|
|
|
|
'permissions' =>'', |
|
|
|
|
'extension'=>fix_strtolower($file_ext) |
|
|
|
|
); |
|
|
|
|
if($show_folder_size){ |
|
|
|
|
if($config['show_folder_size']){ |
|
|
|
|
$sorted[$k]['nfiles'] = $nfiles; |
|
|
|
|
$sorted[$k]['nfolders'] = $nfolders; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
$current_files_number++; |
|
|
|
|
$file_path=$current_path.$rfm_subfolder.$subdir.$file; |
|
|
|
|
$file_path=$config['current_path'].$rfm_subfolder.$subdir.$file; |
|
|
|
|
$date=filemtime($file_path); |
|
|
|
|
$size=filesize($file_path); |
|
|
|
|
$file_ext = substr(strrchr($file,'.'),1); |
|
|
|
|
$sorted[$k]=array( |
|
|
|
|
'is_dir'=>false, |
|
|
|
|
'file'=>$file, |
|
|
|
|
'file_lcase'=>strtolower($file), |
|
|
|
|
'date'=>$date, |
|
|
|
@ -720,18 +724,52 @@ foreach($files as $k=>$file){
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function filenameSort($x, $y) { |
|
|
|
|
return $x['file_lcase'] < $y['file_lcase']; |
|
|
|
|
global $descending; |
|
|
|
|
|
|
|
|
|
if($x['is_dir'] !== $y['is_dir']){ |
|
|
|
|
return $y['is_dir']; |
|
|
|
|
} else { |
|
|
|
|
return ($descending) |
|
|
|
|
? $x['file_lcase'] < $y['file_lcase'] |
|
|
|
|
: $x['file_lcase'] >= $y['file_lcase']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function dateSort($x, $y) { |
|
|
|
|
return $x['date'] < $y['date']; |
|
|
|
|
global $descending; |
|
|
|
|
|
|
|
|
|
if($x['is_dir'] !== $y['is_dir']){ |
|
|
|
|
return $y['is_dir']; |
|
|
|
|
} else { |
|
|
|
|
return ($descending) |
|
|
|
|
? $x['date'] < $y['date'] |
|
|
|
|
: $x['date'] >= $y['date']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function sizeSort($x, $y) { |
|
|
|
|
return $x['size'] < $y['size']; |
|
|
|
|
global $descending; |
|
|
|
|
|
|
|
|
|
if($x['is_dir'] !== $y['is_dir']){ |
|
|
|
|
return $y['is_dir']; |
|
|
|
|
} else { |
|
|
|
|
return ($descending) |
|
|
|
|
? $x['size'] < $y['size'] |
|
|
|
|
: $x['size'] >= $y['size']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function extensionSort($x, $y) { |
|
|
|
|
return $x['extension'] < $y['extension']; |
|
|
|
|
global $descending; |
|
|
|
|
|
|
|
|
|
if($x['is_dir'] !== $y['is_dir']){ |
|
|
|
|
return $y['is_dir']; |
|
|
|
|
} else { |
|
|
|
|
return ($descending) |
|
|
|
|
? $x['extension'] < $y['extension'] |
|
|
|
|
: $x['extension'] >= $y['extension']; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
switch($sort_by){ |
|
|
|
@ -749,15 +787,12 @@ switch($sort_by){
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!$descending){ |
|
|
|
|
$sorted=array_reverse($sorted); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if($subdir!=""){ |
|
|
|
|
$sorted = array_merge(array(array('file'=>'..')),$sorted); |
|
|
|
|
} |
|
|
|
|
$files=$sorted; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
<!-- header div start --> |
|
|
|
|
<div class="navbar navbar-fixed-top"> |
|
|
|
@ -773,13 +808,13 @@ $files=$sorted;
|
|
|
|
|
<div class="filters"> |
|
|
|
|
<div class="row-fluid"> |
|
|
|
|
<div class="span4 half"> |
|
|
|
|
<?php if($upload_files){ ?> |
|
|
|
|
<?php if($config['upload_files']){ ?> |
|
|
|
|
<button class="tip btn upload-btn" title="<?php echo trans('Upload_file');?>"><i class="rficon-upload"></i></button>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if($create_text_files){ ?> |
|
|
|
|
<?php if($config['create_text_files']){ ?> |
|
|
|
|
<button class="tip btn create-file-btn" title="<?php echo trans('New_File');?>"><i class="icon-plus"></i><i class="icon-file"></i></button>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if($create_folders){ ?> |
|
|
|
|
<?php if($config['create_folders']){ ?> |
|
|
|
|
<button class="tip btn new-folder" title="<?php echo trans('New_Folder')?>"><i class="icon-plus"></i><i class="icon-folder-open"></i></button>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if($config['copy_cut_files'] || $config['copy_cut_dirs']){ ?> |
|
|
|
@ -807,28 +842,28 @@ $files=$sorted;
|
|
|
|
|
<div class="span6 entire types"> |
|
|
|
|
<span><?php echo trans('Filters');?>:</span>
|
|
|
|
|
<?php if($_GET['type']!=1 && $_GET['type']!=3 && $config['show_filter_buttons']){ ?> |
|
|
|
|
<?php if(count($ext_file)>0 or false){ ?> |
|
|
|
|
<?php if(count($config['ext_file'])>0 or false){ ?> |
|
|
|
|
<input id="select-type-1" name="radio-sort" type="radio" data-item="ff-item-type-1" checked="checked" class="hide" /> |
|
|
|
|
<label id="ff-item-type-1" title="<?php echo trans('Files');?>" for="select-type-1" class="tip btn ff-label-type-1"><i class="icon-file"></i></label>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if(count($ext_img)>0 or false){ ?> |
|
|
|
|
<?php if(count($config['ext_img'])>0 or false){ ?> |
|
|
|
|
<input id="select-type-2" name="radio-sort" type="radio" data-item="ff-item-type-2" class="hide" /> |
|
|
|
|
<label id="ff-item-type-2" title="<?php echo trans('Images');?>" for="select-type-2" class="tip btn ff-label-type-2"><i class="icon-picture"></i></label>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if(count($ext_misc)>0 or false){ ?> |
|
|
|
|
<?php if(count($config['ext_misc'])>0 or false){ ?> |
|
|
|
|
<input id="select-type-3" name="radio-sort" type="radio" data-item="ff-item-type-3" class="hide" /> |
|
|
|
|
<label id="ff-item-type-3" title="<?php echo trans('Archives');?>" for="select-type-3" class="tip btn ff-label-type-3"><i class="icon-inbox"></i></label>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if(count($ext_video)>0 or false){ ?> |
|
|
|
|
<?php if(count($config['ext_video'])>0 or false){ ?> |
|
|
|
|
<input id="select-type-4" name="radio-sort" type="radio" data-item="ff-item-type-4" class="hide" /> |
|
|
|
|
<label id="ff-item-type-4" title="<?php echo trans('Videos');?>" for="select-type-4" class="tip btn ff-label-type-4"><i class="icon-film"></i></label>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if(count($ext_music)>0 or false){ ?> |
|
|
|
|
<?php if(count($config['ext_music'])>0 or false){ ?> |
|
|
|
|
<input id="select-type-5" name="radio-sort" type="radio" data-item="ff-item-type-5" class="hide" /> |
|
|
|
|
<label id="ff-item-type-5" title="<?php echo trans('Music');?>" for="select-type-5" class="tip btn ff-label-type-5"><i class="icon-music"></i></label>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php } ?> |
|
|
|
|
<input accesskey="f" type="text" class="filter-input <?php echo (($_GET['type']!=1 && $_GET['type']!=3) ? '' : 'filter-input-notype');?>" id="filter-input" name="filter" placeholder="<?php echo fix_strtolower(trans('Text_filter'));?>..." value="<?php echo $filter;?>"/><?php if($n_files>$file_number_limit_js){ ?><label id="filter" class="btn"><i class="icon-play"></i></label><?php } ?> |
|
|
|
|
<input accesskey="f" type="text" class="filter-input <?php echo (($_GET['type']!=1 && $_GET['type']!=3) ? '' : 'filter-input-notype');?>" id="filter-input" name="filter" placeholder="<?php echo fix_strtolower(trans('Text_filter'));?>..." value="<?php echo $filter;?>"/><?php if($n_files>$config['file_number_limit_js']){ ?><label id="filter" class="btn"><i class="icon-play"></i></label><?php } ?> |
|
|
|
|
|
|
|
|
|
<input id="select-type-all" name="radio-sort" type="radio" data-item="ff-item-type-all" class="hide" /> |
|
|
|
|
<label id="ff-item-type-all" title="<?php echo trans('All');?>" <?php if($_GET['type']==1 || $_GET['type']==3){ ?>style="visibility: hidden;" <?php } ?> data-item="ff-item-type-all" for="select-type-all" style="margin-rigth:0px;" class="tip btn btn-inverse ff-label-type-all"><i class="icon-remove icon-white"></i></label>
|
|
|
|
@ -867,7 +902,7 @@ $files=$sorted;
|
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<li class="pull-right"><a class="btn-small" href="javascript:void('')" id="info"><i class="icon-question-sign"></i></a></li> |
|
|
|
|
<?php if($show_language_selection){ ?> |
|
|
|
|
<?php if($config['show_language_selection']){ ?> |
|
|
|
|
<li class="pull-right"><a class="btn-small" href="javascript:void('')" id="change_lang_btn"><i class="icon-globe"></i></a></li> |
|
|
|
|
<?php } ?> |
|
|
|
|
<li class="pull-right"><a id="refresh" class="btn-small" href="dialog.php?<?php echo $get_params.$subdir."&".uniqid() ?>"><i class="icon-refresh"></i></a></li>
|
|
|
|
@ -888,8 +923,8 @@ $files=$sorted;
|
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
<li><small class="hidden-phone">(<span id="files_number"><?php echo $current_files_number."</span> ".trans('Files')." - <span id='folders_number'>".$current_folders_number."</span> ".trans('Folders');?>)</small></li>
|
|
|
|
|
<?php if($show_total_size){ ?> |
|
|
|
|
<li><small class="hidden-phone"><span title="<?php echo trans('total size').$MaxSizeTotal;?>"><?php echo trans('total size').": ".makeSize($sizeCurrentFolder).(($MaxSizeTotal !== false && is_int($MaxSizeTotal))? '/'.$MaxSizeTotal.' '.trans('MB'):'');?></span></small>
|
|
|
|
|
<?php if($config['show_total_size']){ ?> |
|
|
|
|
<li><small class="hidden-phone"><span title="<?php echo trans('total size').$config['MaxSizeTotal'];?>"><?php echo trans('total size').": ".makeSize($sizeCurrentFolder).(($config['MaxSizeTotal'] !== false && is_int($config['MaxSizeTotal']))? '/'.$config['MaxSizeTotal'].' '.trans('MB'):'');?></span></small>
|
|
|
|
|
</li> |
|
|
|
|
<?php } ?> |
|
|
|
|
</ul> |
|
|
|
@ -897,15 +932,15 @@ $files=$sorted;
|
|
|
|
|
<!-- breadcrumb div end --> |
|
|
|
|
<div class="row-fluid ff-container"> |
|
|
|
|
<div class="span12"> |
|
|
|
|
<?php if( ($ftp && !$ftp->isDir($ftp_base_folder.$upload_dir.$rfm_subfolder.$subdir)) || (!$ftp && @opendir($current_path.$rfm_subfolder.$subdir)===FALSE)){ ?> |
|
|
|
|
<?php if( ($ftp && !$ftp->isDir($config['ftp_base_folder'].$config['upload_dir'].$rfm_subfolder.$subdir)) || (!$ftp && @opendir($config['current_path'].$rfm_subfolder.$subdir)===FALSE)){ ?> |
|
|
|
|
<br/> |
|
|
|
|
<div class="alert alert-error">There is an error! The upload folder there isn't. Check your config.php file. </div> |
|
|
|
|
<?php }else{ ?> |
|
|
|
|
<h4 id="help"><?php echo trans('Swipe_help');?></h4>
|
|
|
|
|
<?php if(isset($folder_message)){ ?> |
|
|
|
|
<div class="alert alert-block"><?php echo $folder_message;?></div>
|
|
|
|
|
<?php if(isset($config['folder_message'])){ ?> |
|
|
|
|
<div class="alert alert-block"><?php echo $config['folder_message'];?></div>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<?php if($show_sorting_bar){ ?> |
|
|
|
|
<?php if($config['show_sorting_bar']){ ?> |
|
|
|
|
<!-- sorter --> |
|
|
|
|
<div class="sorter-container <?php echo "list-view".$view;?>">
|
|
|
|
|
<div class="file-name"><a class="sorter sort-name <?php if($sort_by=="name"){ echo ($descending)?"descending":"ascending"; } ?>" href="javascript:void('')" data-sort="name"><?php echo trans('Filename');?></a></div>
|
|
|
|
@ -921,18 +956,17 @@ $files=$sorted;
|
|
|
|
|
<!--ul class="thumbnails ff-items"--> |
|
|
|
|
<ul class="grid cs-style-2 <?php echo "list-view".$view;?>" id="main-item-container">
|
|
|
|
|
<?php |
|
|
|
|
$jplayer_ext=array("mp4","flv","webmv","webma","webm","m4a","m4v","ogv","oga","mp3","midi","mid","ogg","wav"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($files as $file_array) { |
|
|
|
|
$file=$file_array['file']; |
|
|
|
|
if($file == '.' || ( substr($file, 0, 1) == '.' && isset( $file_array[ 'extension' ] ) && $file_array[ 'extension' ] == fix_strtolower(trans( 'Type_dir' ) )) || (isset($file_array['extension']) && $file_array['extension']!=fix_strtolower(trans('Type_dir'))) || ($file == '..' && $subdir == '') || in_array($file, $hidden_folders) || ($filter!='' && $n_files>$file_number_limit_js && $file!=".." && stripos($file,$filter)===false)){ |
|
|
|
|
if($file == '.' || ( substr($file, 0, 1) == '.' && isset( $file_array[ 'extension' ] ) && $file_array[ 'extension' ] == fix_strtolower(trans( 'Type_dir' ) )) || (isset($file_array['extension']) && $file_array['extension']!=fix_strtolower(trans('Type_dir'))) || ($file == '..' && $subdir == '') || in_array($file, $config['hidden_folders']) || ($filter!='' && $n_files>$config['file_number_limit_js'] && $file!=".." && stripos($file,$filter)===false)){ |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
$new_name=fix_filename($file,$config); |
|
|
|
|
if($ftp && $file!='..' && $file!=$new_name){ |
|
|
|
|
//rename |
|
|
|
|
rename_folder($current_path.$subdir.$file,$new_name,$ftp,$config); |
|
|
|
|
rename_folder($config['current_path'].$subdir.$file,$new_name,$ftp,$config); |
|
|
|
|
$file=$new_name; |
|
|
|
|
} |
|
|
|
|
//add in thumbs folder if not exist |
|
|
|
@ -961,7 +995,7 @@ $files=$sorted;
|
|
|
|
|
$file_prevent_rename = isset($filePermissions[$file]['prevent_rename']) && $filePermissions[$file]['prevent_rename']; |
|
|
|
|
$file_prevent_delete = isset($filePermissions[$file]['prevent_delete']) && $filePermissions[$file]['prevent_delete']; |
|
|
|
|
} |
|
|
|
|
?><figure data-name="<?php echo $file ?>" class="<?php if($file=="..") echo "back-";?>directory" data-type="<?php if($file!=".."){ echo "dir"; } ?>">
|
|
|
|
|
?><figure data-name="<?php echo $file ?>" data-path="<?php echo $rfm_subfolder.$subdir.$file;?>" class="<?php if($file=="..") echo "back-";?>directory" data-type="<?php if($file!=".."){ echo "dir"; } ?>">
|
|
|
|
|
<?php if($file==".."){ ?> |
|
|
|
|
<input type="hidden" class="path" value="<?php echo str_replace('.','',dirname($rfm_subfolder.$subdir));?>"/>
|
|
|
|
|
<input type="hidden" class="path_thumb" value="<?php echo dirname($thumbs_path.$subdir)."/";?>"/>
|
|
|
|
@ -969,13 +1003,13 @@ $files=$sorted;
|
|
|
|
|
<a class="folder-link" href="dialog.php?<?php echo $get_params.rawurlencode($src)."&".($callback?'callback='.$callback."&":'').uniqid() ?>">
|
|
|
|
|
<div class="img-precontainer"> |
|
|
|
|
<div class="img-container directory"><span></span> |
|
|
|
|
<img class="directory-img" data-src="img/<?php echo $icon_theme;?>/folder<?php if($file==".."){ echo "_back"; }?>.png" />
|
|
|
|
|
<img class="directory-img" data-src="img/<?php echo $config['icon_theme'];?>/folder<?php if($file==".."){ echo "_back"; }?>.png" />
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="img-precontainer-mini directory"> |
|
|
|
|
<div class="img-container-mini"> |
|
|
|
|
<span></span> |
|
|
|
|
<img class="directory-img" data-src="img/<?php echo $icon_theme;?>/folder<?php if($file==".."){ echo "_back"; }?>.png" />
|
|
|
|
|
<img class="directory-img" data-src="img/<?php echo $config['icon_theme'];?>/folder<?php if($file==".."){ echo "_back"; }?>.png" />
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<?php if($file==".."){ ?> |
|
|
|
@ -987,24 +1021,24 @@ $files=$sorted;
|
|
|
|
|
<?php }else{ ?> |
|
|
|
|
</a> |
|
|
|
|
<div class="box"> |
|
|
|
|
<h4 class="<?php if($ellipsis_title_after_first_row){ echo "ellipsis"; } ?>"><a class="folder-link" data-file="<?php echo $file ?>" href="dialog.php?<?php echo $get_params.rawurlencode($src)."&".uniqid() ?>"><?php echo $file;?></a></h4>
|
|
|
|
|
<h4 class="<?php if($config['ellipsis_title_after_first_row']){ echo "ellipsis"; } ?>"><a class="folder-link" data-file="<?php echo $file ?>" href="dialog.php?<?php echo $get_params.rawurlencode($src)."&".uniqid() ?>"><?php echo $file;?></a></h4>
|
|
|
|
|
</div> |
|
|
|
|
<input type="hidden" class="name" value="<?php echo $file_array['file_lcase'];?>"/>
|
|
|
|
|
<input type="hidden" class="date" value="<?php echo $file_array['date'];?>"/>
|
|
|
|
|
<input type="hidden" class="size" value="<?php echo $file_array['size'];?>"/>
|
|
|
|
|
<input type="hidden" class="extension" value="<?php echo fix_strtolower(trans('Type_dir'));?>"/>
|
|
|
|
|
<div class="file-date"><?php echo date(trans('Date_type'),$file_array['date']);?></div>
|
|
|
|
|
<?php if($show_folder_size){ ?> |
|
|
|
|
<?php if($config['show_folder_size']){ ?> |
|
|
|
|
<div class="file-size"><?php echo makeSize($file_array['size']);?></div>
|
|
|
|
|
<input type="hidden" class="nfiles" value="<?php echo $file_array['nfiles'];?>"/>
|
|
|
|
|
<input type="hidden" class="nfolders" value="<?php echo $file_array['nfolders'];?>"/>
|
|
|
|
|
<?php } ?> |
|
|
|
|
<div class='file-extension'><?php echo fix_strtolower(trans('Type_dir'));?></div>
|
|
|
|
|
<figcaption> |
|
|
|
|
<a href="javascript:void('')" class="tip-left edit-button rename-file-paths <?php if($rename_folders && !$file_prevent_rename) echo "rename-folder";?>" title="<?php echo trans('Rename')?>" data-folder="1" data-permissions="<?php echo $file_array['permissions']; ?>" data-path="<?php echo $rfm_subfolder.$subdir.$file;?>">
|
|
|
|
|
<i class="icon-pencil <?php if(!$rename_folders || $file_prevent_rename) echo 'icon-white';?>"></i></a>
|
|
|
|
|
<a href="javascript:void('')" class="tip-left erase-button <?php if($delete_folders && !$file_prevent_delete) echo "delete-folder";?>" title="<?php echo trans('Erase')?>" data-confirm="<?php echo trans('Confirm_Folder_del');?>" data-path="<?php echo $rfm_subfolder.$subdir.$file;?>" >
|
|
|
|
|
<i class="icon-trash <?php if(!$delete_folders || $file_prevent_delete) echo 'icon-white';?>"></i>
|
|
|
|
|
<a href="javascript:void('')" class="tip-left edit-button rename-file-paths <?php if($config['rename_folders'] && !$file_prevent_rename) echo "rename-folder";?>" title="<?php echo trans('Rename')?>" data-folder="1" data-permissions="<?php echo $file_array['permissions']; ?>">
|
|
|
|
|
<i class="icon-pencil <?php if(!$config['rename_folders'] || $file_prevent_rename) echo 'icon-white';?>"></i></a>
|
|
|
|
|
<a href="javascript:void('')" class="tip-left erase-button <?php if($config['delete_folders'] && !$file_prevent_delete) echo "delete-folder";?>" title="<?php echo trans('Erase')?>" data-confirm="<?php echo trans('Confirm_Folder_del');?>" >
|
|
|
|
|
<i class="icon-trash <?php if(!$config['delete_folders'] || $file_prevent_delete) echo 'icon-white';?>"></i>
|
|
|
|
|
</a> |
|
|
|
|
</figcaption> |
|
|
|
|
<?php } ?> |
|
|
|
@ -1018,40 +1052,45 @@ $files=$sorted;
|
|
|
|
|
foreach ($files as $nu=>$file_array) { |
|
|
|
|
$file=$file_array['file']; |
|
|
|
|
|
|
|