@@ -2022,7 +2023,7 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
+ if (in_array(strtolower(pathinfo($f, PATHINFO_EXTENSION)), array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg', 'webp', 'avif'))): ?>
@@ -2033,14 +2034,16 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
' . readlink($path . '/' . $f) . '' : '') ?>
|
-
- b-'.str_pad($filesize_raw, 18, "0", STR_PAD_LEFT).''. $filesize; ?>
+ | ">
+
|
- |
+ |
|
+
|
+
@@ -2403,7 +2406,7 @@ function fm_get_parent_path($path)
*/
function fm_is_exclude_items($file) {
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
- if (sizeof($exclude_items)) {
+ if (isset($exclude_items) and sizeof($exclude_items)) {
unset($exclude_items);
}
@@ -2502,9 +2505,9 @@ function fm_get_size($file)
function fm_get_filesize($size)
{
$size = (float) $size;
- $units = array(' B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
+ $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
- return sprintf('%s %s', number_format(round($size / pow(1024, $power), 2),2), $units[$power]);
+ return sprintf('%s %s', round($size / pow(1024, $power), 2), $units[$power]);
}
/**
@@ -2522,8 +2525,8 @@ function fm_get_directorysize($directory) {
$count++;
}
else if ($file->isDir()) { $dirCount++; }
- return [$size, $count, $dirCount];
- // return $size;
+ // return [$size, $count, $dirCount];
+ return $size;
}
else return 'Folder'; // Quick output
}
@@ -2665,6 +2668,8 @@ function fm_get_file_icon_class($path)
case 'bmp':
case 'tif':
case 'tiff':
+ case 'webp':
+ case 'avif':
case 'svg':
$img = 'fa fa-picture-o';
break;
@@ -2824,7 +2829,7 @@ function fm_get_file_icon_class($path)
*/
function fm_get_image_exts()
{
- return array('ico', 'gif', 'jpg', 'jpeg', 'jpc', 'jp2', 'jpx', 'xbm', 'wbmp', 'png', 'bmp', 'tif', 'tiff', 'psd', 'svg');
+ return array('ico', 'gif', 'jpg', 'jpeg', 'jpc', 'jp2', 'jpx', 'xbm', 'wbmp', 'png', 'bmp', 'tif', 'tiff', 'psd', 'svg', 'webp', 'avif');
}
/**
@@ -2911,6 +2916,8 @@ function fm_get_file_mimes($extension)
$fileTypes['png'] = 'image/png';
$fileTypes['jpeg'] = 'image/jpg';
$fileTypes['jpg'] = 'image/jpg';
+ $fileTypes['webp'] = 'image/webp';
+ $fileTypes['avif'] = 'image/avif';
$fileTypes['rar'] = 'application/rar';
$fileTypes['ra'] = 'audio/x-pn-realaudio';
@@ -3626,7 +3633,7 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
.lds-facebook div { position:absolute;left:6px;width:13px;background:#007bff;animation:lds-facebook 1.2s cubic-bezier(0,.5,.5,1) infinite }
.lds-facebook div:nth-child(1) { left:6px;animation-delay:-.24s }
.lds-facebook div:nth-child(2) { left:26px;animation-delay:-.12s }
- .lds-facebook div:nth-child(3) { left:45px;animation-delay:0 }
+ .lds-facebook div:nth-child(3) { left:45px;animation-delay:0s }
@keyframes lds-facebook { 0% { top:6px;height:51px }
100%,50% { top:19px;height:26px }
}
@@ -3749,6 +3756,7 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
+
|