4 $_SESSION[
'RF'][
"verify"]=
"RESPONSIVEfilemanager";
6 if(isset($_POST[
'submit'])){
14 if (isset($_GET[
'fldr'])
15 && !empty($_GET[
'fldr'])
16 && strpos($_GET[
'fldr'],
'../')===FALSE
17 && strpos($_GET[
'fldr'],
'./')===FALSE)
18 $subdir = urldecode(trim(strip_tags($_GET[
'fldr']),
"/") .
"/");
23 setcookie(
'last_position',
$subdir,time() + (86400 * 7));
26 if(!empty($_COOKIE[
'last_position'])
27 && strpos($_COOKIE[
'last_position'],
'.')===FALSE)
28 $subdir= trim($_COOKIE[
'last_position']);
41 if(!empty(
$_SESSION[
'RF'][
"subfolder"]) && strpos(
$_SESSION[
'RF'][
"subfolder"],
'../')===FALSE
42 && strpos(
$_SESSION[
'RF'][
"subfolder"],
'./')===FALSE && strpos(
$_SESSION[
'RF'][
"subfolder"],
"/")!==0
85 if(isset($_GET[
'popup']))
$popup= strip_tags($_GET[
'popup']);
else $popup=0;
107 if(isset($_GET[
'lang']) && $_GET[
'lang'] !=
'undefined' && $_GET[
'lang']!=
'') {
115 if(is_readable(
'lang/' .
$path_parts[
'basename'].
'.php')){
119 echo
"<script>console.log('The ".$lang.
" language file is not readable! Falling back...');</script>";
127 if(!isset($_GET[
'type'])) $_GET[
'type']=0;
128 if(!isset($_GET[
'field_id'])) $_GET[
'field_id']=
'';
143 <html xmlns=
"https://www.w3.org/1999/xhtml">
145 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" >
146 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
147 <meta http-equiv=
"X-UA-Compatible" content=
"IE=edge,chrome=1" />
148 <meta name=
"robots" content=
"noindex,nofollow">
149 <title>Responsive FileManager</title>
150 <link rel=
"shortcut icon" href=
"img/ico/favicon.ico">
151 <link href=
"css/bootstrap.min.css" rel=
"stylesheet" type=
"text/css" />
152 <link href=
"css/bootstrap-responsive.min.css" rel=
"stylesheet" type=
"text/css" />
153 <link href=
"css/bootstrap-lightbox.min.css" rel=
"stylesheet" type=
"text/css" />
154 <link href=
"css/style.css" rel=
"stylesheet" type=
"text/css" />
155 <link href=
"css/dropzone.min.css" type=
"text/css" rel=
"stylesheet" />
166 echo
'<script>console.log("Error: Spritemap not found!");</script>';
172 .dropzone .dz-
default.dz-message,
173 .dropzone .dz-preview .dz-error-mark,
174 .dropzone-previews .dz-preview .dz-error-mark,
175 .dropzone .dz-preview .dz-success-mark,
176 .dropzone-previews .dz-preview .dz-success-mark,
177 .dropzone .dz-preview .dz-progress .dz-upload,
178 .dropzone-previews .dz-preview .dz-progress .dz-upload {
182 @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
183 .dropzone .dz-
default.dz-message,
184 .dropzone .dz-preview .dz-error-mark,
185 .dropzone-previews .dz-preview .dz-error-mark,
186 .dropzone .dz-preview .dz-success-mark,
187 .dropzone-previews .dz-preview .dz-success-mark,
188 .dropzone .dz-preview .dz-progress .dz-upload,
189 .dropzone-previews .dz-preview .dz-progress .dz-upload {
194 <link href=
"css/jquery.contextMenu.min.css" rel=
"stylesheet" type=
"text/css" />
195 <link href=
"css/bootstrap-modal.min.css" rel=
"stylesheet" type=
"text/css" />
196 <link href=
"jPlayer/skin/blue.monday/jplayer.blue.monday.css" rel=
"stylesheet" type=
"text/css">
197 <!--[
if lt IE 8]><style>
198 .img-container span, .img-container-mini span {
199 display:
inline-block;
203 <script type=
"text/javascript" src=
"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
204 <script type=
"text/javascript">
205 if (typeof jQuery ===
'undefined')
207 document.write(unescape(
"%3Cscript src='js/jquery.js' type='text/javascript'%3E%3C/script%3E"));
210 <script type=
"text/javascript" src=
"js/bootstrap.min.js"></script>
211 <script type=
"text/javascript" src=
"js/bootstrap-lightbox.min.js"></script>
212 <script type=
"text/javascript" src=
"js/dropzone.min.js"></script>
213 <script type=
"text/javascript" src=
"js/jquery.touchSwipe.min.js"></script>
214 <script type=
"text/javascript" src=
"js/modernizr.custom.js"></script>
215 <script type=
"text/javascript" src=
"js/bootbox.min.js"></script>
216 <script type=
"text/javascript" src=
"js/bootstrap-modal.min.js"></script>
217 <script type=
"text/javascript" src=
"js/bootstrap-modalmanager.min.js"></script>
218 <script type=
"text/javascript" src=
"jPlayer/jquery.jplayer.min.js"></script>
219 <script type=
"text/javascript" src=
"js/imagesloaded.pkgd.min.js"></script>
220 <script type=
"text/javascript" src=
"js/jquery.queryloader2.min.js"></script>
224 <script type=
"text/javascript" src=
"https://dme0ih8comzn4.cloudfront.net/js/feather.js"></script>
226 <script type=
"text/javascript" src=
"http://feather.aviary.com/js/feather.js "></script>
229 <!-- Le HTML5 shim,
for IE6-8 support of HTML5 elements -->
231 <script src=
"//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
233 <script src=
"js/jquery.ui.position.min.js" type=
"text/javascript"></script>
234 <script src=
"js/jquery-ui-1.10.4.custom.js" type=
"text/javascript"></script>
235 <script src=
"js/jquery.contextMenu.min.js" type=
"text/javascript"></script>
238 var ext_img=
new Array(
'<?php echo implode("',
'", $ext_img)?>');
239 var allowed_ext=
new Array(
'<?php echo implode("',
'", $ext)?>');
240 var loading_bar=<?php echo
$loading_bar?
"true":
"false"; ?>;
243 Dropzone.options.myAwesomeDropzone = {
244 dictInvalidFileType:
"<?php echo lang_Error_extension;?>",
245 dictFileTooBig:
"<?php echo lang_Error_Upload; ?>",
246 dictResponseError:
"SERVER ERROR",
250 accept:
function(file, done) {
251 var extension=file.name.split(
'.').pop();
252 extension=extension.toLowerCase();
253 if ($.inArray(extension, allowed_ext) > -1) {
257 done(
"<?php echo lang_Error_extension;?>");
262 var featherEditor =
new Aviary.Feather({
263 apiKey:
"<?php echo $aviary_key; ?>",
265 language:
"<?php echo $aviary_language; ?>",
268 onSave:
function(imageID, newURL) {
270 var img = document.getElementById(imageID);
274 url:
"ajax_calls.php?action=save_img",
275 data: { url: newURL, path:$(
'#sub_folder').val()+$(
'#fldr_value').val(), name:$(
'#aviary_img').data(
'name') }
276 }).done(
function( msg ) {
277 featherEditor.close();
279 $(
"figure[data-name='"+$(
'#aviary_img').data(
'name')+
"']").find(
'img').each(
function(){
280 $(
this).attr(
'src',$(
this).attr(
'src')+
"?"+d.getTime());
282 $(
"figure[data-name='"+$(
'#aviary_img').data(
'name')+
"']").find(
'figcaption a.preview').each(
function(){
283 $(
this).data(
'url',$(
this).data(
'url')+
"?"+d.getTime());
289 onError:
function(errorObj) {
290 bootbox.alert(errorObj.message);
296 <script type=
"text/javascript" src=
"js/include.min.js"></script>
299 <input type=
"hidden" id=
"popup" value=
"<?php echo $popup; ?>" />
300 <input type=
"hidden" id=
"view" value=
"<?php echo $view; ?>" />
301 <input type=
"hidden" id=
"cur_dir" value=
"<?php echo $cur_dir; ?>" />
302 <input type=
"hidden" id=
"cur_dir_thumb" value=
"<?php echo $thumbs_path.$subdir; ?>" />
303 <input type=
"hidden" id=
"insert_folder_name" value=
"<?php echo lang_Insert_Folder_Name; ?>" />
304 <input type=
"hidden" id=
"new_folder" value=
"<?php echo lang_New_Folder; ?>" />
305 <input type=
"hidden" id=
"ok" value=
"<?php echo lang_OK; ?>" />
306 <input type=
"hidden" id=
"cancel" value=
"<?php echo lang_Cancel; ?>" />
307 <input type=
"hidden" id=
"rename" value=
"<?php echo lang_Rename; ?>" />
308 <input type=
"hidden" id=
"lang_duplicate" value=
"<?php echo lang_Duplicate; ?>" />
309 <input type=
"hidden" id=
"duplicate" value=
"<?php if($duplicate_files) echo 1; else echo 0; ?>" />
310 <input type=
"hidden" id=
"base_url" value=
"<?php echo $base_url?>"/>
311 <input type=
"hidden" id=
"base_url_true" value=
"<?php echo base_url(); ?>"/>
312 <input type=
"hidden" id=
"fldr_value" value=
"<?php echo $subdir; ?>"/>
313 <input type=
"hidden" id=
"sub_folder" value=
"<?php echo $rfm_subfolder; ?>"/>
314 <input type=
"hidden" id=
"file_number_limit_js" value=
"<?php echo $file_number_limit_js; ?>" />
315 <input type=
"hidden" id=
"descending" value=
"<?php echo $descending?"true":"false"; ?>" />
317 <input type=
"hidden" id=
"current_url" value=
"<?php echo str_replace(array('&filter='.$filter),array(''),$protocol.":
318 <input type=
"hidden" id=
"lang_show_url" value=
"<?php echo lang_Show_url; ?>" />
319 <input type=
"hidden" id=
"copy_cut_files_allowed" value=
"<?php if($copy_cut_files) echo 1; else echo 0; ?>" />
320 <input type=
"hidden" id=
"copy_cut_dirs_allowed" value=
"<?php if($copy_cut_dirs) echo 1; else echo 0; ?>" />
321 <input type=
"hidden" id=
"copy_cut_max_size" value=
"<?php echo $copy_cut_max_size; ?>" />
322 <input type=
"hidden" id=
"copy_cut_max_count" value=
"<?php echo $copy_cut_max_count; ?>" />
323 <input type=
"hidden" id=
"lang_copy" value=
"<?php echo lang_Copy; ?>" />
324 <input type=
"hidden" id=
"lang_cut" value=
"<?php echo lang_Cut; ?>" />
325 <input type=
"hidden" id=
"lang_paste" value=
"<?php echo lang_Paste; ?>" />
326 <input type=
"hidden" id=
"lang_paste_here" value=
"<?php echo lang_Paste_Here; ?>" />
327 <input type=
"hidden" id=
"lang_paste_confirm" value=
"<?php echo lang_Paste_Confirm; ?>" />
328 <input type=
"hidden" id=
"lang_files_on_clipboard" value=
"<?php echo lang_Files_ON_Clipboard; ?>" />
329 <input type=
"hidden" id=
"clipboard" value=
"<?php echo ((isset($_SESSION['RF']['clipboard']['path']) && trim($_SESSION['RF']['clipboard']['path']) != null) ? 1 : 0); ?>" />
330 <input type=
"hidden" id=
"lang_clear_clipboard_confirm" value=
"<?php echo lang_Clear_Clipboard_Confirm; ?>" />
331 <input type=
"hidden" id=
"lang_file_info" value=
"<?php echo fix_strtoupper(lang_File_info); ?>" />
332 <input type=
"hidden" id=
"lang_edit_image" value=
"<?php echo lang_Edit_image; ?>" />
333 <input type=
"hidden" id=
"lang_extract" value=
"<?php echo lang_Extract; ?>" />
334 <input type=
"hidden" id=
"transliteration" value=
"<?php echo $transliteration?"true":"false"; ?>" />
336 <!-- uploader div start -->
338 <div
class=
"uploader">
339 <center><button
class=
"btn btn-inverse close-uploader"><i
class=
"icon-backward icon-white"></i> <?php echo
lang_Return_Files_List?></button></center>
340 <div
class=
"space10"></div><div
class=
"space10"></div>
341 <div
class=
"tabbable upload-tabbable"> <!-- Only required
for left/right tabs -->
343 <ul
class=
"nav nav-tabs">
344 <li
class=
"active"><a href=
"#tab1" data-toggle=
"tab"><?php echo
lang_Upload_base; ?></a></li>
345 <li><a href=
"#tab2" id=
"uploader-btn" data-toggle=
"tab"><?php echo
lang_Upload_java; ?></a></li>
347 <div
class=
"tab-content">
348 <div
class=
"tab-pane active" id=
"tab1">
350 <
form action=
"dialog.php" method=
"post" enctype=
"multipart/form-data" id=
"myAwesomeDropzone" class=
"dropzone">
351 <input type=
"hidden" name=
"path" value=
"<?php echo $cur_path?>"/>
352 <input type=
"hidden" name=
"path_thumb" value=
"<?php echo $thumbs_path.$subdir?>"/>
353 <div
class=
"fallback">
355 <input name=
"file" type=
"file" />
356 <input type=
"hidden" name=
"fldr" value=
"<?php echo $subdir; ?>"/>
357 <input type=
"hidden" name=
"view" value=
"<?php echo $view; ?>"/>
358 <input type=
"hidden" name=
"type" value=
"<?php echo $type_param; ?>"/>
359 <input type=
"hidden" name=
"field_id" value=
"<?php echo $field_id; ?>"/>
360 <input type=
"hidden" name=
"popup" value=
"<?php echo $popup; ?>"/>
361 <input type=
"hidden" name=
"lang" value=
"<?php echo $lang; ?>"/>
362 <input type=
"hidden" name=
"filter" value=
"<?php echo $filter; ?>"/>
363 <input type=
"submit" name=
"submit" value=
"<?php echo lang_OK?>" />
369 <div
class=
"tab-pane" id=
"tab2">
370 <div
id=
"iframe-container"></div>
378 <!-- uploader div start -->
381 <div
class=
"container-fluid">
388 if ($_GET[
'type']==1) $apply =
'apply_img';
389 elseif($_GET[
'type']==2) $apply = 'apply_link';
390 elseif($_GET['type']==0 && $_GET['field_id']=='') $apply = 'apply_none';
391 elseif($_GET['type']==3) $apply = 'apply_video';
392 else $apply = 'apply';
399 $current_folder=array();
400 $prev_folder=array();
402 if($file==
".") $current_folder=array(
'file'=>$file);
403 elseif($file==
"..") $prev_folder=array('file'=>$file);
405 $date=filemtime(
$current_path.$rfm_subfolder.$subdir. $file);
408 $sorted[$k]=array(
'file'=>$file,
'date'=>$date,
'size'=>$size,
'extension'=>$file_ext);
411 $date=filemtime($file_path);
412 $size=filesize($file_path);
413 $file_ext = substr(strrchr($file,
'.'),1);
414 $sorted[$k]=array(
'file'=>$file,
'date'=>$date,
'size'=>$size,
'extension'=>$file_ext);
418 function filenameSort($x, $y) {
419 return $x[
'file'] < $y[
'file'];
421 function dateSort($x, $y) {
422 return $x[
'date'] < $y[
'date'];
424 function sizeSort($x, $y) {
425 return $x[
'size'] - $y[
'size'];
427 function extensionSort($x, $y) {
428 return $x[
'extension'] < $y[
'extension'];
433 usort($sorted,
'filenameSort');
436 usort($sorted,
'dateSort');
439 usort($sorted,
'sizeSort');
442 usort($sorted,
'extensionSort');
450 $sorted=array_reverse($sorted);
453 $files=array_merge(array($prev_folder),array($current_folder),$sorted);
455 <!-- header div start -->
456 <div
class=
"navbar navbar-fixed-top">
457 <div
class=
"navbar-inner">
458 <div
class=
"container-fluid">
459 <button type=
"button" class=
"btn btn-navbar" data-toggle=
"collapse" data-target=
".nav-collapse">
460 <span
class=
"icon-bar"></span>
461 <span
class=
"icon-bar"></span>
462 <span
class=
"icon-bar"></span>
465 <div
class=
"nav-collapse collapse">
466 <div
class=
"filters">
467 <div
class=
"row-fluid">
468 <div
class=
"span3 half">
470 <button
class=
"tip btn upload-btn" title=
"<?php echo lang_Upload_file; ?>"><i
class=
"icon-plus"></i><i
class=
"icon-file"></i></button>
473 <button
class=
"tip btn new-folder" title=
"<?php echo lang_New_Folder?>"><i
class=
"icon-plus"></i><i
class=
"icon-folder-open"></i></button>
476 <button
class=
"tip btn paste-here-btn" title=
"<?php echo lang_Paste_Here; ?>"><i
class=
"rficon-clipboard-apply"></i></button>
477 <button
class=
"tip btn clear-clipboard-btn" title=
"<?php echo lang_Clear_Clipboard; ?>"><i
class=
"rficon-clipboard-clear"></i></button>
480 <div
class=
"span3 half view-controller">
483 <button
class=
"btn tip<?php if($view==0) echo " btn-inverse
"; ?>" id=
"view0" data-value=
"0" title=
"<?php echo lang_View_boxes; ?>"><i
class=
"icon-th <?php if($view==0) echo "icon-white
"; ?>"></i></button>
484 <button
class=
"btn tip<?php if($view==1) echo " btn-inverse
"; ?>" id=
"view1" data-value=
"1" title=
"<?php echo lang_View_list; ?>"><i
class=
"icon-align-justify <?php if($view==1) echo "icon-white
"; ?>"></i></button>
485 <button
class=
"btn tip<?php if($view==2) echo " btn-inverse
"; ?>" id=
"view2" data-value=
"2" title=
"<?php echo lang_View_columns_list; ?>"><i
class=
"icon-fire <?php if($view==2) echo "icon-white
"; ?>"></i></button>
487 <div
class=
"span6 half types">
489 <?php
if($_GET[
'type']!=1 && $_GET[
'type']!=3){ ?>
490 <input
id=
"select-type-1" name=
"radio-sort" type=
"radio" data-item=
"ff-item-type-1" checked=
"checked" class=
"hide" />
491 <label
id=
"ff-item-type-1" title=
"<?php echo lang_Files; ?>" for=
"select-type-1" class=
"tip btn ff-label-type-1"><i
class=
"icon-file"></i></label>
492 <input
id=
"select-type-2" name=
"radio-sort" type=
"radio" data-item=
"ff-item-type-2" class=
"hide" />
493 <label
id=
"ff-item-type-2" title=
"<?php echo lang_Images; ?>" for=
"select-type-2" class=
"tip btn ff-label-type-2"><i
class=
"icon-picture"></i></label>
494 <input
id=
"select-type-3" name=
"radio-sort" type=
"radio" data-item=
"ff-item-type-3" class=
"hide" />
495 <label
id=
"ff-item-type-3" title=
"<?php echo lang_Archives; ?>" for=
"select-type-3" class=
"tip btn ff-label-type-3"><i
class=
"icon-inbox"></i></label>
496 <input
id=
"select-type-4" name=
"radio-sort" type=
"radio" data-item=
"ff-item-type-4" class=
"hide" />
497 <label
id=
"ff-item-type-4" title=
"<?php echo lang_Videos; ?>" for=
"select-type-4" class=
"tip btn ff-label-type-4"><i
class=
"icon-film"></i></label>
498 <input
id=
"select-type-5" name=
"radio-sort" type=
"radio" data-item=
"ff-item-type-5" class=
"hide" />
499 <label
id=
"ff-item-type-5" title=
"<?php echo lang_Music; ?>" for=
"select-type-5" class=
"tip btn ff-label-type-5"><i
class=
"icon-music"></i></label>
501 <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(lang_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 } ?>
503 <input
id=
"select-type-all" name=
"radio-sort" type=
"radio" data-item=
"ff-item-type-all" class=
"hide" />
504 <label
id=
"ff-item-type-all" title=
"<?php echo lang_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-align-justify icon-white"></i></label>
514 <!-- header div end -->
516 <!-- breadcrumb div start -->
518 <div
class=
"row-fluid">
520 $link=
"dialog.php?".$get_params;
522 <ul
class=
"breadcrumb">
523 <li
class=
"pull-left"><a href=
"<?php echo $link?>/"><i
class=
"icon-home"></i></a></li>
524 <li><span
class=
"divider">/</span></li>
526 $bc=explode(
"/",$subdir);
529 foreach($bc as $k=>$b){
531 if($k==count($bc)-2){
532 ?> <li
class=
"active"><?php echo $b?></li><?php
534 <li><a href=
"<?php echo $link.$tmp_path?>"><?php echo $b?></a></li><li><span
class=
"divider"><?php echo
"/"; ?></span></li>
538 <li
class=
"pull-right"><a
class=
"btn-small" href=
"javascript:void('')" id=
"info"><i
class=
"icon-question-sign"></i></a></li>
539 <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>
541 <li
class=
"pull-right">
542 <div
class=
"btn-group">
543 <a
class=
"btn dropdown-toggle sorting-btn" data-toggle=
"dropdown" href=
"#">
544 <i
class=
"icon-signal"></i>
545 <span
class=
"caret"></span>
547 <ul
class=
"dropdown-menu pull-left sorting">
548 <li><center><strong><?php echo
lang_Sorting ?></strong></center></li>
549 <li><a
class=
"sorter sort-name <?php if($sort_by=="name
"){ echo ($descending)?"descending
":"ascending
"; } ?>" href=
"javascript:void('')" data-sort=
"name"><?php echo
lang_Filename; ?></a></li>
550 <li><a
class=
"sorter sort-date <?php if($sort_by=="date
"){ echo ($descending)?"descending
":"ascending
"; } ?>" href=
"javascript:void('')" data-sort=
"date"><?php echo
lang_Date; ?></a></li>
551 <li><a
class=
"sorter sort-size <?php if($sort_by=="size
"){ echo ($descending)?"descending
":"ascending
"; } ?>" href=
"javascript:void('')" data-sort=
"size"><?php echo
lang_Size; ?></a></li>
552 <li><a
class=
"sorter sort-extension <?php if($sort_by=="extension
"){ echo ($descending)?"descending
":"ascending
"; } ?>" href=
"javascript:void('')" data-sort=
"extension"><?php echo
lang_Type; ?></a></li>
558 <!-- breadcrumb div end -->
559 <div
class=
"row-fluid ff-container">
561 <?php
if(@opendir(
$current_path.$rfm_subfolder.$subdir)===FALSE){ ?>
563 <div
class=
"alert alert-error">There is an error! The upload folder there isn
't. Check your config.php file. </div>
565 <h4 id="help"><?php echo lang_Swipe_help; ?></h4>
566 <?php if(isset($folder_message)){ ?>
567 <div class="alert alert-block"><?php echo $folder_message; ?></div>
569 <?php if($show_sorting_bar){ ?>
571 <div class="sorter-container <?php echo "list-view".$view; ?>">
572 <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 lang_Filename; ?></a></div>
573 <div class="file-date"><a class="sorter sort-date <?php if($sort_by=="date"){ echo ($descending)?"descending":"ascending"; } ?>" href="javascript:void('')" data-sort="date"><?php echo lang_Date; ?></a></div>
574 <div class="file-size"><a class="sorter sort-size <?php if($sort_by=="size"){ echo ($descending)?"descending":"ascending"; } ?>" href="javascript:void('')" data-sort="size"><?php echo lang_Size; ?></a></div>
575 <div class='img-dimension
'><?php echo lang_Dimension; ?></div>
576 <div class='file-extension
'><a class="sorter sort-extension <?php if($sort_by=="extension"){ echo ($descending)?"descending":"ascending"; } ?>" href="javascript:void('')" data-sort="extension"><?php echo lang_Type; ?></a></div>
577 <div class='file-operations
'><?php echo lang_Operations; ?></div>
581 <input type="hidden" id="file_number" value="<?php echo $n_files; ?>" />
582 <!--ul class="thumbnails ff-items"-->
583 <ul class="grid cs-style-2 <?php echo "list-view".$view; ?>" id="main-item-container">
586 $jplayer_ext=array("mp4","flv","webmv","webma","webm","m4a","m4v","ogv","oga","mp3","midi","mid","ogg","wav");
587 foreach ($files as $file_array) {
588 $file=$file_array['file
'];
589 if($file == '.
' || (isset($file_array['extension
']) && $file_array['extension
']!=lang_Type_dir) || ($file == '..
' && $subdir == '') || in_array($file, $hidden_folders) || ($filter!='' && $file!=".." && strpos($file,$filter)===false))
591 $new_name=fix_filename($file,$transliteration);
592 if($file!='..
' && $file!=$new_name){
594 rename_folder($current_path.$subdir.$new_name,$new_name,$transliteration);
597 //add in thumbs folder if not exist
598 if (!file_exists($thumbs_path.$subdir.$file)) create_folder(false,$thumbs_path.$subdir.$file);
600 if($file=='..
' && trim($subdir) != '' ){
601 $src = explode("/",$subdir);
602 unset($src[count($src)-2]);
603 $src=implode("/",$src);
604 if($src=='') $src="/";
606 elseif ($file!='..
') {
607 $src = $subdir . $file."/";
611 <li data-name="<?php echo $file ?>" <?php if($file=='..
') echo 'class=
"back"'; else echo 'class=
"dir"'; ?>><?php
612 $file_prevent_rename = false;
613 $file_prevent_delete = false;
614 if (isset($filePermissions[$file])) {
615 $file_prevent_rename = isset($filePermissions[$file]['prevent_rename
']) && $filePermissions[$file]['prevent_rename
'];
616 $file_prevent_delete = isset($filePermissions[$file]['prevent_delete
']) && $filePermissions[$file]['prevent_delete
'];
618 ?> <figure data-name="<?php echo $file ?>" class="<?php if($file=="..") echo "back-"; ?>directory" data-type="<?php if($file!=".."){ echo "dir"; } ?>">
619 <a class="folder-link" href="dialog.php?<?php echo $get_params.rawurlencode($src)."&".uniqid() ?>">
620 <div class="img-precontainer">
621 <div class="img-container directory"><span></span>
622 <img class="directory-img" src="img/<?php echo $icon_theme; ?>/folder<?php if($file==".."){ echo "_back"; }?>.jpg" alt="folder" />
625 <div class="img-precontainer-mini directory">
626 <div class="img-container-mini">
628 <img class="directory-img" src="img/<?php echo $icon_theme; ?>/folder<?php if($file==".."){ echo "_back"; }?>.png" alt="folder" />
631 <?php if($file==".."){ ?>
632 <div class="box no-effect">
633 <h4><?php echo lang_Back ?></h4>
640 <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>
642 <input type="hidden" class="name" value=""/>
643 <input type="hidden" class="date" value="<?php echo $file_array['date
']; ?>"/>
644 <input type="hidden" class="size" value="<?php echo $file_array['size
']; ?>"/>
645 <input type="hidden" class="extension" value="<?php echo lang_Type_dir; ?>"/>
646 <div class="file-date"><?php echo date(lang_Date_type,$file_array['date
'])?></div>
647 <?php if($show_folder_size){ ?><div class="file-size"><?php echo makeSize($file_array['size
'])?></div><?php } ?>
648 <div class='file-extension
'><?php echo lang_Type_dir; ?></div>
650 <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 lang_Rename?>" data-path="<?php echo $rfm_subfolder.$subdir.$file; ?>" data-thumb="<?php echo $thumbs_path.$subdir.$file; ?>">
651 <i class="icon-pencil <?php if(!$rename_folders || $file_prevent_rename) echo 'icon-white
'; ?>"></i></a>
652 <a href="javascript:void('')" class="tip-left erase-button <?php if($delete_folders && !$file_prevent_delete) echo "delete-folder"; ?>" title="<?php echo lang_Erase?>" data-confirm="<?php echo lang_Confirm_Folder_del; ?>" data-path="<?php echo $rfm_subfolder.$subdir.$file; ?>" data-thumb="<?php echo $thumbs_path.$subdir .$file; ?>">
653 <i class="icon-trash <?php if(!$delete_folders || $file_prevent_delete) echo 'icon-white
'; ?>"></i>
662 $files_prevent_duplicate = array();
663 foreach ($files as $nu=>$file_array) {
664 $file=$file_array['file
'];
666 if($file == '.
' || $file == '..
' || is_dir($current_path.$rfm_subfolder.$subdir.$file) || in_array($file, $hidden_files) || !in_array(fix_strtolower($file_array['extension
']), $ext) || ($filter!='' && strpos($file,$filter)===false))
669 $file_path=$current_path.$rfm_subfolder.$subdir.$file;
670 //check if file have illegal caracter
672 $filename=substr($file, 0, '-
' . (strlen($file_array['extension
']) + 1));
674 if($file!=fix_filename($file,$transliteration)){
675 $file1=fix_filename($file,$transliteration);
676 $file_path1=($current_path.$rfm_subfolder.$subdir.$file1);
677 if(file_exists($file_path1)){
679 $info=pathinfo($file1);
680 while(file_exists($current_path.$rfm_subfolder.$subdir.$info['filename
'].".[".$i."].".$info['extension
'])) {
683 $file1=$info['filename
'].".[".$i."].".$info['extension
'];
684 $file_path1=($current_path.$rfm_subfolder.$subdir.$file1);
687 $filename=substr($file1, 0, '-
' . (strlen($file_array['extension
']) + 1));
688 rename_file($file_path,fix_filename($filename,$transliteration),$transliteration);
690 $file_array['extension
']=fix_filename($file_array['extension
'],$transliteration);
691 $file_path=$file_path1;
697 $show_original=false;
698 $show_original_mini=false;
701 $extension_lower=fix_strtolower($file_array['extension
']);
702 if(in_array($extension_lower, $ext_img)){
703 $src = $base_url . $cur_dir . rawurlencode($file);
704 $mini_src = $src_thumb = $thumbs_path.$subdir. $file;
705 //add in thumbs folder if not exist
706 if(!file_exists($src_thumb)){
708 create_img_gd($file_path, $src_thumb, 122, 91);
709 new_thumbnails_creation($current_path.$rfm_subfolder.$subdir,$file_path,$file,$current_path,$relative_image_creation,$relative_path_from_current_pos,$relative_image_creation_name_to_prepend,$relative_image_creation_name_to_append,$relative_image_creation_width,$relative_image_creation_height,$fixed_image_creation,$fixed_path_from_filemanager,$fixed_image_creation_name_to_prepend,$fixed_image_creation_to_append,$fixed_image_creation_width,$fixed_image_creation_height);
710 } catch (Exception $e) {
711 $src_thumb=$mini_src="";
715 //check if is smaller than thumb
716 list($img_width, $img_height, $img_type, $attr)=getimagesize($file_path);
717 if($img_width<122 && $img_height<91){
718 $src_thumb=$current_path.$rfm_subfolder.$subdir.$file;
722 if($img_width<45 && $img_height<38){
723 $mini_src=$current_path.$rfm_subfolder.$subdir.$file;
724 $show_original_mini=true;
728 $is_icon_thumb=false;
729 $is_icon_thumb_mini=false;
733 if(file_exists('img/
'.$icon_theme.'/
'.$extension_lower.".jpg")){
734 $src_thumb ='img/
'.$icon_theme.'/
'.$extension_lower.".jpg";
736 $src_thumb = "img/".$icon_theme."/default.jpg";
741 $is_icon_thumb_mini=false;
745 if (in_array($extension_lower, $ext_video)) {
748 }elseif (in_array($extension_lower, $ext_img)) {
750 }elseif (in_array($extension_lower, $ext_music)) {
753 }elseif (in_array($extension_lower, $ext_misc)) {
758 if((!($_GET['type
']==1 && !$is_img) && !(($_GET['type
']==3 && !$is_video) && ($_GET['type
']==3 && !$is_audio))) && $class_ext>0){
760 <li class="ff-item-type-<?php echo $class_ext; ?> file" data-name="<?php echo $file; ?>"><?php
761 $file_prevent_rename = false;
762 $file_prevent_delete = false;
763 if (isset($filePermissions[$file])) {
764 if (isset($filePermissions[$file]['prevent_duplicate
']) && $filePermissions[$file]['prevent_duplicate
']) {
765 $files_prevent_duplicate[] = $file;
767 $file_prevent_rename = isset($filePermissions[$file]['prevent_rename
']) && $filePermissions[$file]['prevent_rename
'];
768 $file_prevent_delete = isset($filePermissions[$file]['prevent_delete
']) && $filePermissions[$file]['prevent_delete
'];
770 ?> <figure data-name="<?php echo $file ?>" data-type="<?php if($is_img){ echo "img"; }else{ echo "file"; } ?>">
771 <a href="javascript:void('')" class="link" data-file="<?php echo $file; ?>" data-field_id="<?php echo $field_id; ?>" data-function="<?php echo $apply; ?>">
772 <div class="img-precontainer">
773 <?php if($is_icon_thumb){ ?><div class="filetype"><?php echo $extension_lower ?></div><?php } ?>
774 <div class="img-container">
776 <img alt="<?php echo $filename." thumbnails";?>" class="<?php echo $show_original ? "original" : "" ?> <?php echo $is_icon_thumb ? "icon" : "" ?>" src="<?php echo $src_thumb; ?>">
779 <div class="img-precontainer-mini <?php if($is_img) echo 'original-thumb
' ?>">
780 <div class="filetype <?php echo $extension_lower ?> <?php if(!$is_icon_thumb){ echo "hide"; }?>"><?php echo $extension_lower ?></div>
781 <div class="img-container-mini">
783 <?php if($mini_src!=""){ ?>
784 <img alt="<?php echo $filename." thumbnails";?>" class="<?php echo $show_original_mini ? "original" : "" ?> <?php echo $is_icon_thumb_mini ? "icon" : "" ?>" src="<?php echo $mini_src; ?>">
788 <?php if($is_icon_thumb){ ?>
789 <div class="cover"></div>
793 <h4 class="<?php if($ellipsis_title_after_first_row){ echo "ellipsis"; } ?>"><a href="javascript:void('')" class="link" data-file="<?php echo $file; ?>" data-field_id="<?php echo $field_id; ?>" data-function="<?php echo $apply; ?>">
794 <?php echo $filename; ?></a> </h4>
796 <input type="hidden" class="date" value="<?php echo $file_array['date
']; ?>"/>
797 <input type="hidden" class="size" value="<?php echo $file_array['size
'] ?>"/>
798 <input type="hidden" class="extension" value="<?php echo $extension_lower; ?>"/>
799 <input type="hidden" class="name" value=""/>
800 <div class="file-date"><?php echo date(lang_Date_type,$file_array['date
'])?></div>
801 <div class="file-size"><?php echo makeSize($file_array['size
'])?></div>
802 <div class='img-dimension
'><?php if($is_img){ echo $img_width."x".$img_height; } ?></div>
803 <div class='file-extension
'><?php echo $extension_lower; ?></div>
805 <form action="force_download.php" method="post" class="download-form" id="form<?php echo $nu; ?>">
806 <input type="hidden" name="path" value="<?php echo $rfm_subfolder.$subdir?>"/>
807 <input type="hidden" class="name_download" name="name" value="<?php echo $file?>"/>
809 <a title="<?php echo lang_Download?>" class="tip-right" href="javascript:void('')" onclick="$('#form<?php echo $nu; ?>
').submit();"><i class="icon-download"></i></a>
810 <?php if($is_img && $src_thumb!=""){ ?>
811 <a class="tip-right preview" title="<?php echo lang_Preview?>" data-url="<?php echo $src;?>" data-toggle="lightbox" href="#previewLightbox"><i class=" icon-eye-open"></i></a>
812 <?php }elseif(($is_video || $is_audio) && in_array($extension_lower,$jplayer_ext)){ ?>
813 <a class="tip-right modalAV <?php if($is_audio){ echo "audio"; }else{ echo "video"; } ?>"
814 title="<?php echo lang_Preview?>" data-url="ajax_calls.php?action=media_preview&title=<?php echo $filename; ?>&file=<?php echo $current_path.$rfm_subfolder.$subdir.$file;; ?>"
815 href="javascript:void('');" ><i class=" icon-eye-open"></i></a>
817 <a class="preview disabled"><i class="icon-eye-open icon-white"></i></a>
819 <a href="javascript:void('')" class="tip-left edit-button rename-file-paths <?php if($rename_files && !$file_prevent_rename) echo "rename-file"; ?>" title="<?php echo lang_Rename?>" data-path="<?php echo $rfm_subfolder.$subdir .$file; ?>" data-thumb="<?php echo $thumbs_path.$subdir .$file; ?>">
820 <i class="icon-pencil <?php if(!$rename_files || $file_prevent_rename) echo 'icon-white
'; ?>"></i></a>
822 <a href="javascript:void('')" class="tip-left erase-button <?php if($delete_files && !$file_prevent_delete) echo "delete-file"; ?>" title="<?php echo lang_Erase?>" data-confirm="<?php echo lang_Confirm_del; ?>" data-path="<?php echo $rfm_subfolder.$subdir.$file; ?>" data-thumb="<?php echo $thumbs_path.$subdir .$file; ?>">
823 <i class="icon-trash <?php if(!$delete_files || $file_prevent_delete) echo 'icon-white
'; ?>"></i>
840 var files_prevent_duplicate = new Array();
842 foreach ($files_prevent_duplicate as $key => $value): ?>
843 files_prevent_duplicate[<?php echo $key;?>] = '<?php echo $value; ?>
';
847 <!-- lightbox div start -->
848 <div id="previewLightbox" class="lightbox hide fade" tabindex="-1" role="dialog" aria-hidden="true">
849 <div class='lightbox-content
'>
850 <img id="full-img" src="">
853 <!-- lightbox div end -->
855 <!-- loading div start -->
856 <div id="loading_container" style="display:none;">
857 <div id="loading" style="background-color:#000; position:fixed; width:100%; height:100%; top:0px; left:0px;z-index:100000"></div>
858 <img id="loading_animation" src="img/storing_animation.gif" alt="loading" style="z-index:10001; margin-left:-32px; margin-top:-32px; position:fixed; left:50%; top:50%"/>
860 <!-- loading div end -->
862 <!-- player div start -->
863 <div class="modal hide fade" id="previewAV">
864 <div class="modal-header">
865 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
866 <h3><?php echo lang_Preview; ?></h3>
868 <div class="modal-body">
869 <div class="row-fluid body-preview">
874 <!-- player div end -->
875 <img id='aviary_img
' src='' class="hide"/>
$_SESSION['RF']["verify"]
const lang_Return_Files_List
if((int)(ini_get('post_max_size'))< $MaxSizeUpload) $default_language
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
if($mtime===false) if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) $path_parts
if(!isset($_SESSION['RF']["view_type"])) if(isset($_GET['view'])) $view
create_folder($path=false, $path_thumbs=false)
foreach($wizard->configs['db_types'] as $db_driver=> $db_info)
if(isset($_GET['lang'])&&$_GET['lang']!= 'undefined'&&$_GET['lang']!='') $language_file
const lang_Upload_java_help
const lang_Upload_base_help
if(isset($_POST['submit'])) else