17 Commits
2.3 ... 2.3.4

Author SHA1 Message Date
Prasath Mani
285b6b4882 Provide "previous" and "next" to navigate between previews #145
Cross site scripting (XSS) #141
RegEx error | function template #134
2019-03-28 17:06:42 +05:30
Prasath Mani
a8c2fc66d6 prevent overwriting if uploaded file already exists #138,
IE11 aborts upload after 30s #137
2019-03-13 12:26:25 +05:30
Prasath Mani
622264042a Negative filesize on ARMv7 for files over 2GB #127
Max file size? #96
2019-03-03 15:30:47 +05:30
Prasath Mani
bb0e61787c Merge branch 'master' of https://github.com/prasathmani/tinyfilemanager 2019-02-28 15:35:40 +05:30
Prasath Mani
da31717cff Negative filesize on ARMv7 for files over 2GB #127
Simplified Chinese translation #125
Max file size? #96
2019-02-28 15:35:28 +05:30
Romaque Máximo
1b9e0f5e76 Português language added (#126) 2019-02-18 14:59:29 +05:30
Mark Shi
e0cc54b286 Add Simplified Chinese support (#122)
* Add Simplified Chinese support

And distinguish it from Traditional Chinese.

* Add two fields for translation.

* Add two fields for translation.

* Translated.
2019-01-28 22:24:05 +05:30
Prasath Mani
7a0de24a61 Fix : User's sub folder problem #120 2019-01-20 17:02:01 +05:30
Prasath Mani
1a24dc0729 Merge branch 'master' of https://github.com/prasathmani/tinyfilemanager 2019-01-18 17:12:35 +05:30
Prasath Mani
2a390b2247 down file error when larger than php memory limited #110 and Not looking good on phones #93 2019-01-18 17:12:20 +05:30
Prasath Mani
292c00d62f Merge pull request #119 from karavidas/master
Greek laguage added
2019-01-17 18:42:16 +05:30
Lampros Karavidas
30aa3e6f96 Update translation.json 2019-01-17 15:11:03 +02:00
Lampros Karavidas
200f56e8d4 Greek laguage added 2019-01-17 12:35:43 +02:00
Prasath Mani
09f688c625 Saving settings doesn't save #116 2019-01-17 12:34:54 +05:30
Prasath Mani
f26977adb3 Default Languages loading issue fix 2019-01-10 16:23:02 +05:30
Prasath Mani
704bec368f Merge pull request #115 from adit/patch-1
added Indonesia Language
2019-01-06 20:17:09 +05:30
Aditya Pratama
6970bdb7dd add indonesia lang. 2019-01-06 21:37:40 +07:00
3 changed files with 442 additions and 88 deletions

View File

@@ -66,7 +66,7 @@ To enable/disable authentication set `$use_auth` to true or false.
- :zap: Backup files
- :mag_right: Search - Search and Sorting using `datatable js`
- :file_folder: Exclude folders from listing
- :globe_with_meridians: Multi-language support (English, Spanish, French, Italian, German, Russian, Thailand and Chinese ) for translations `translation.json` is file required
- :globe_with_meridians: Multi-language support (English, Spanish, French, Italian, German, Russian, Thailand, Chinese and more..) for translations `translation.json` is file required
- :bangbang: lots more...

View File

@@ -3,13 +3,13 @@
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false}';
/**
* H3K | Tiny File Manager V2.3
* H3K | Tiny File Manager V2.3.4
* CCP Programmers | ccpprogrammers@gmail.com
* https://tinyfilemanager.github.io
*/
//TFM version
define('VERSION', '2.3');
define('VERSION', '2.3.4');
// Auth with login/password (set true/false to enable/disable it)
$use_auth = true;
@@ -70,6 +70,9 @@ $GLOBALS['online_viewer'] = true;
//Sticky Nav bar
$sticky_navbar = true;
//max upload file size
define('MAX_UPLOAD_SIZE', '2048');
// private key and session name to store to the session
if ( !defined( 'FM_SESSION_ID')) {
define('FM_SESSION_ID', 'filemanager');
@@ -134,6 +137,11 @@ if (empty($auth_users)) {
$is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1)
|| isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';
// update $root_url based on user specific directories
if (isset($_SESSION[FM_SESSION_ID]['logged']) && !empty($directories_users[$_SESSION[FM_SESSION_ID]['logged']])) {
$wd = fm_clean_path(dirname($_SERVER['PHP_SELF']));
$root_url = $root_url.$wd.DIRECTORY_SEPARATOR.$directories_users[$_SESSION[FM_SESSION_ID]['logged']];
}
// clean $root_url
$root_url = fm_clean_path($root_url);
@@ -298,7 +306,7 @@ if (isset($_POST['ajax']) && !FM_READONLY) {
if (isset($_POST['type']) && $_POST['type'] == "settings") {
global $cfg, $lang, $report_errors, $show_hidden_files, $lang_list;
$newLng = $_POST['js-language'];
fm_get_translations();
fm_get_translations([]);
if (!array_key_exists($newLng, $lang_list)) {
$newLng = 'en';
}
@@ -601,6 +609,7 @@ if (isset($_GET['dl'])) {
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($path . '/' . $dl));
ob_end_clean();
readfile($path . '/' . $dl);
exit;
} else {
@@ -632,6 +641,11 @@ if (!empty($_FILES) && !FM_READONLY) {
$fullPath = $path . '/' . $_REQUEST['fullpath'];
$folder = substr($fullPath, 0, strrpos($fullPath, "/"));
if(file_exists ($fullPath)) {
$ext_1 = $ext ? '.'.$ext : '';
$fullPath = str_replace($ext_1, '', $fullPath) .'_'. date('ymdHis'). $ext_1;
}
if (!is_dir($folder)) {
$old = umask(0);
mkdir($folder, 0777, true);
@@ -929,11 +943,12 @@ if (isset($_GET['upload']) && !FM_READONLY) {
<script>
Dropzone.options.fileUploader = {
timeout: 120000,
maxFilesize: <?php echo MAX_UPLOAD_SIZE; ?>,
init: function () {
this.on("sending", function (file, xhr, formData) {
let _path = (file.fullPath) ? file.fullPath : file.name;
document.getElementById("fullpath").value = _path;
xhr.ontimeout = (() => {
xhr.ontimeout = (function() {
alert('Error: Server Timeout');
});
}).on("success", function (res) {
@@ -1082,7 +1097,7 @@ if (isset($_GET['settings']) && !FM_READONLY) {
}
?>
<div class="form-group row">
<label for="js-err-rpt-1" class="col-sm-3 col-form-label">Error Reporting</label>
<label for="js-err-rpt-1" class="col-sm-3 col-form-label"><?php echo lng('ErrorReporting') ?></label>
<div class="col-sm-9">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary <?php echo getChecked($report_errors, 1, 'active') ?>">
@@ -1096,7 +1111,7 @@ if (isset($_GET['settings']) && !FM_READONLY) {
</div>
<div class="form-group row">
<label for="js-hdn-1" class="col-sm-3 col-form-label">Show Hidden Files</label>
<label for="js-hdn-1" class="col-sm-3 col-form-label"><?php echo lng('ShowHiddenFiles') ?></label>
<div class="col-sm-9">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary <?php echo getChecked($show_hidden_files, 1, 'active') ?>">
@@ -1183,6 +1198,7 @@ if (isset($_GET['help'])) {
// file viewer
if (isset($_GET['view'])) {
$file = $_GET['view'];
$quickView = (isset($_GET['quickView']) && $_GET['quickView'] == 1) ? true : false;
$file = fm_clean_path($file);
$file = str_replace('/', '', $file);
if ($file == '' || !is_file($path . '/' . $file)) {
@@ -1190,15 +1206,17 @@ if (isset($_GET['view'])) {
fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));
}
fm_show_header(); // HEADER
fm_show_nav_path(FM_PATH); // current path
if(!$quickView) {
fm_show_header(); // HEADER
fm_show_nav_path(FM_PATH); // current path
}
$file_url = FM_ROOT_URL . fm_convert_win((FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $file);
$file_path = $path . '/' . $file;
$ext = strtolower(pathinfo($file_path, PATHINFO_EXTENSION));
$mime_type = fm_get_mime_type($file_path);
$filesize = filesize($file_path);
$filesize = fm_get_filesize(filesize($file_path));
$is_zip = false;
$is_gzip = false;
@@ -1236,72 +1254,84 @@ if (isset($_GET['view'])) {
?>
<div class="row">
<div class="col-12">
<p class="break-word"><b><?php echo $view_title ?> "<?php echo fm_enc(fm_convert_win($file)) ?>"</b></p>
<p class="break-word">
Full path: <?php echo fm_enc(fm_convert_win($file_path)) ?><br>
File
size: <?php echo fm_get_filesize($filesize) ?><?php if ($filesize >= 1000): ?> (<?php echo sprintf('%s bytes', $filesize) ?>)<?php endif; ?>
<br>
MIME-type: <?php echo $mime_type ?><br>
<?php
// ZIP info
if (($is_zip || $is_gzip) && $filenames !== false) {
$total_files = 0;
$total_comp = 0;
$total_uncomp = 0;
foreach ($filenames as $fn) {
if (!$fn['folder']) {
$total_files++;
<?php if(!$quickView) { ?>
<p class="break-word"><b><?php echo $view_title ?> "<?php echo fm_enc(fm_convert_win($file)) ?>"</b></p>
<p class="break-word">
Full path: <?php echo fm_enc(fm_convert_win($file_path)) ?><br>
File
size: <?php echo fm_get_filesize($filesize) ?><?php if ($filesize >= 1000): ?> (<?php echo sprintf('%s bytes', $filesize) ?>)<?php endif; ?>
<br>
MIME-type: <?php echo $mime_type ?><br>
<?php
// ZIP info
if (($is_zip || $is_gzip) && $filenames !== false) {
$total_files = 0;
$total_comp = 0;
$total_uncomp = 0;
foreach ($filenames as $fn) {
if (!$fn['folder']) {
$total_files++;
}
$total_comp += $fn['compressed_size'];
$total_uncomp += $fn['filesize'];
}
$total_comp += $fn['compressed_size'];
$total_uncomp += $fn['filesize'];
?>
Files in archive: <?php echo $total_files ?><br>
Total size: <?php echo fm_get_filesize($total_uncomp) ?><br>
Size in archive: <?php echo fm_get_filesize($total_comp) ?><br>
Compression: <?php echo round(($total_comp / $total_uncomp) * 100) ?>%<br>
<?php
}
// Image info
if ($is_image) {
$image_size = getimagesize($file_path);
echo 'Image sizes: ' . (isset($image_size[0]) ? $image_size[0] : '0') . ' x ' . (isset($image_size[1]) ? $image_size[1] : '0') . '<br>';
}
// Text info
if ($is_text) {
$is_utf8 = fm_is_utf8($content);
if (function_exists('iconv')) {
if (!$is_utf8) {
$content = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $content);
}
}
echo 'Charset: ' . ($is_utf8 ? 'utf-8' : '8 bit') . '<br>';
}
?>
Files in archive: <?php echo $total_files ?><br>
Total size: <?php echo fm_get_filesize($total_uncomp) ?><br>
Size in archive: <?php echo fm_get_filesize($total_comp) ?><br>
Compression: <?php echo round(($total_comp / $total_uncomp) * 100) ?>%<br>
</p>
<p>
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>&amp;dl=<?php echo urlencode($file) ?>"><i
class="fa fa-cloud-download"></i> <?php echo lng('Download') ?></a></b> &nbsp;
<b><a href="<?php echo fm_enc($file_url) ?>" target="_blank"><i
class="fa fa-external-link-square"></i> <?php echo lng('Open') ?></a></b>
&nbsp;
<?php
}
// Image info
if ($is_image) {
$image_size = getimagesize($file_path);
echo 'Image sizes: ' . (isset($image_size[0]) ? $image_size[0] : '0') . ' x ' . (isset($image_size[1]) ? $image_size[1] : '0') . '<br>';
}
// Text info
if ($is_text) {
$is_utf8 = fm_is_utf8($content);
if (function_exists('iconv')) {
if (!$is_utf8) {
$content = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $content);
}
// ZIP actions
if (!FM_READONLY && ($is_zip || $is_gzip) && $filenames !== false) {
$zip_name = pathinfo($file_path, PATHINFO_FILENAME);
?>
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>&amp;unzip=<?php echo urlencode($file) ?>"><i
class="fa fa-check-circle"></i> <?php echo lng('UnZip') ?></a></b> &nbsp;
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>&amp;unzip=<?php echo urlencode($file) ?>&amp;tofolder=1"
title="UnZip to <?php echo fm_enc($zip_name) ?>"><i class="fa fa-check-circle"></i>
<?php echo lng('UnZipToFolder') ?></a></b> &nbsp;
<?php
}
echo 'Charset: ' . ($is_utf8 ? 'utf-8' : '8 bit') . '<br>';
}
?>
</p>
<p>
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>&amp;dl=<?php echo urlencode($file) ?>"><i class="fa fa-cloud-download"></i> <?php echo lng('Download') ?></a></b> &nbsp;
<b><a href="<?php echo fm_enc($file_url) ?>" target="_blank"><i class="fa fa-external-link-square"></i> <?php echo lng('Open') ?></a></b>
&nbsp;
if ($is_text && !FM_READONLY) {
?>
<b><a href="?p=<?php echo urlencode(trim(FM_PATH)) ?>&amp;edit=<?php echo urlencode($file) ?>"
class="edit-file"><i class="fa fa-pencil-square"></i> <?php echo lng('Edit') ?>
</a></b> &nbsp;
<b><a href="?p=<?php echo urlencode(trim(FM_PATH)) ?>&amp;edit=<?php echo urlencode($file) ?>&env=ace"
class="edit-file"><i
class="fa fa-pencil-square-o"></i> <?php echo lng('AdvancedEditor') ?>
</a></b> &nbsp;
<?php } ?>
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>"><i
class="fa fa-chevron-circle-left go-back"></i> <?php echo lng('Back') ?></a></b>
</p>
<?php
// ZIP actions
if (!FM_READONLY && ($is_zip || $is_gzip) && $filenames !== false) {
$zip_name = pathinfo($file_path, PATHINFO_FILENAME);
?>
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>&amp;unzip=<?php echo urlencode($file) ?>"><i class="fa fa-check-circle"></i> <?php echo lng('UnZip') ?></a></b> &nbsp;
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>&amp;unzip=<?php echo urlencode($file) ?>&amp;tofolder=1" title="UnZip to <?php echo fm_enc($zip_name) ?>"><i class="fa fa-check-circle"></i>
<?php echo lng('UnZipToFolder') ?></a></b> &nbsp;
<?php
}
if ($is_text && !FM_READONLY) {
?>
<b><a href="?p=<?php echo urlencode(trim(FM_PATH)) ?>&amp;edit=<?php echo urlencode($file) ?>" class="edit-file"><i class="fa fa-pencil-square"></i> <?php echo lng('Edit') ?></a></b> &nbsp;
<b><a href="?p=<?php echo urlencode(trim(FM_PATH)) ?>&amp;edit=<?php echo urlencode($file) ?>&env=ace" class="edit-file"><i class="fa fa-pencil-square-o"></i> <?php echo lng('AdvancedEditor') ?></a></b> &nbsp;
<?php } ?>
<b><a href="?p=<?php echo urlencode(FM_PATH) ?>"><i class="fa fa-chevron-circle-left go-back"></i> <?php echo lng('Back') ?></a></b>
</p>
<?php
}
if($is_onlineViewer) {
// Google docs viewer
echo '<iframe src="https://docs.google.com/viewer?embedded=true&hl=en&url=' . fm_enc($file_url) . '" frameborder="no" style="width:100%;min-height:460px"></iframe>';
@@ -1322,7 +1352,7 @@ if (isset($_GET['view'])) {
}
} elseif ($is_image) {
// Image content
if (in_array($ext, array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico'))) {
if (in_array($ext, array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg'))) {
echo '<p><img src="' . fm_enc($file_url) . '" alt="" class="preview-img"></p>';
}
} elseif ($is_audio) {
@@ -1358,7 +1388,9 @@ if (isset($_GET['view'])) {
</div>
</div>
<?php
fm_show_footer();
if(!$quickView) {
fm_show_footer();
}
exit;
}
@@ -1629,7 +1661,7 @@ $all_files_size = 0;
$is_link = is_link($path . '/' . $f);
$img = $is_link ? 'fa fa-file-text-o' : fm_get_file_icon_class($path . '/' . $f);
$modif = date(FM_DATETIME_FORMAT, filemtime($path . '/' . $f));
$filesize_raw = filesize($path . '/' . $f);
$filesize_raw = fm_get_size($path . '/' . $f);
$filesize = fm_get_filesize($filesize_raw);
$filelink = '?p=' . urlencode(FM_PATH) . '&amp;view=' . urlencode($f);
$all_files_size += $filesize_raw;
@@ -1663,6 +1695,7 @@ $all_files_size = 0;
<?php endif; ?>
<td class="inline-actions">
<?php if (!FM_READONLY): ?>
<a title="<?php echo lng('Preview') ?>" href="<?php echo $filelink.'&quickView=1'; ?>" data-toggle="lightbox" data-gallery="tiny-gallery" data-title="<?php echo fm_convert_win($f) ?>" data-max-width="100%" data-width="100%"><i class="fa fa-eye"></i></a>
<a title="<?php echo lng('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&amp;del=<?php echo urlencode($f) ?>" onclick="return confirm('Delete file?');"><i class="fa fa-trash-o"></i></a>
<a title="<?php echo lng('Rename') ?>" href="#" onclick="rename('<?php echo fm_enc(FM_PATH) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o"></i></a>
<a title="<?php echo lng('CopyTo') ?>..."
@@ -1987,6 +2020,51 @@ function fm_get_translations($tr) {
}
}
/**
* @param $file
* Recover all file sizes larger than > 2GB.
* Works on php 32bits and 64bits and supports linux
* @return int|string
*/
function fm_get_size($file)
{
static $iswin;
if (!isset($iswin)) {
$iswin = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN');
}
static $exec_works;
if (!isset($exec_works)) {
$exec_works = (function_exists('exec') && !ini_get('safe_mode') && @exec('echo EXEC') == 'EXEC');
}
// try a shell command
if ($exec_works) {
$cmd = ($iswin) ? "for %F in (\"$file\") do @echo %~zF" : "stat -c%s \"$file\"";
@exec($cmd, $output);
if (is_array($output) && ctype_digit($size = trim(implode("\n", $output)))) {
return $size;
}
}
// try the Windows COM interface
if ($iswin && class_exists("COM")) {
try {
$fsobj = new COM('Scripting.FileSystemObject');
$f = $fsobj->GetFile( realpath($file) );
$size = $f->Size;
} catch (Exception $e) {
$size = null;
}
if (ctype_digit($size)) {
return $size;
}
}
// if all else fails
return filesize($file);
}
/**
* Get nice filesize
* @param int $size
@@ -2292,7 +2370,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');
return array('ico', 'gif', 'jpg', 'jpeg', 'jpc', 'jp2', 'jpx', 'xbm', 'wbmp', 'png', 'bmp', 'tif', 'tiff', 'psd', 'svg');
}
/**
@@ -2725,7 +2803,7 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");
global $lang;
global $lang, $root_url;
?>
<!DOCTYPE html>
<html lang="en">
@@ -2736,7 +2814,7 @@ global $lang;
<meta name="author" content="CCP Programmers">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex">
<link rel="icon" href="<?php echo FM_SELF_URL ?>?img=favicon" type="image/png">
<link rel="icon" href="<?php echo $root_url ?>?img=favicon" type="image/png">
<title>H3K | Tiny File Manager</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<style>
@@ -2794,7 +2872,7 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");
global $lang, $sticky_navbar;
global $lang, $root_url, $sticky_navbar;
$isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
?>
<!DOCTYPE html>
@@ -2806,11 +2884,12 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
<meta name="author" content="CCP Programmers">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex">
<link rel="icon" href="<?php echo FM_SELF_URL ?>?img=favicon" type="image/png">
<link rel="icon" href="<?php echo $root_url ?>?img=favicon" type="image/png">
<title>H3K | Tiny File Manager</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<?php if (isset($_GET['view']) && FM_USE_HIGHLIGHTJS): ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css" />
<?php if (FM_USE_HIGHLIGHTJS): ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/<?php echo FM_HIGHLIGHTJS_STYLE ?>.min.css">
<?php endif; ?>
<style>
@@ -3052,6 +3131,27 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
border-top: 1px dashed #8c8b8b;
border-bottom: 1px dashed #fff;
}
.ekko-lightbox .modal-dialog { max-width: 98%; }
.ekko-lightbox-item.fade.in.show .row { background: #fff; }
.ekko-lightbox-nav-overlay{
display: flex !important;
opacity: 1 !important;
height: auto !important;
top: 50%;
}
.ekko-lightbox-nav-overlay a{
opacity: 1 !important;
width: auto !important;
text-shadow: none !important;
color: #3B3B3B;
}
.ekko-lightbox-nav-overlay a:hover{
color: #20507D;
}
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio: 2) { .navbar-collapse .col-xs-6.text-right { padding: 0; } }
.btn.active.focus,.btn.active:focus,.btn.focus,.btn.focus:active,.btn:active:focus,.btn:focus{outline:0!important;outline-offset:0!important;background-image:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}
.lds-facebook{display:none;position:relative;width:64px;height:64px}.lds-facebook div,.lds-facebook.show-me{display:inline-block}.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}@keyframes lds-facebook{0%{top:6px;height:51px}100%,50%{top:19px;height:26px}}
</style>
@@ -3129,12 +3229,27 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js"></script>
<?php if (FM_USE_HIGHLIGHTJS): ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad(); var isHighlightingEnabled = true;</script>
<?php endif; ?>
<script>
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
var reInitHighlight = function() { if(typeof isHighlightingEnabled !== "undefined" && isHighlightingEnabled) { setTimeout(function () { $('.ekko-lightbox-container pre code').each(function (i, e) { hljs.highlightBlock(e) }); }, 111); } };
$(this).ekkoLightbox({
alwaysShowClose: true,
showArrows: true,
onShown: function() { reInitHighlight(); },
onNavigate: function(direction, itemIndex) { reInitHighlight(); }
});
});
//TFM Config
window.curi = "https://tinyfilemanager.github.io/config.json", window.config = null;
function fm_get_config(){ if(!!window.name){ window.config = JSON.parse(window.name); } else { $.getJSON(window.curi).done(function(c) { if(!!c) { window.name = JSON.stringify(c), window.config = c; } }); }}
function template(html,options){
var re=/<%([^%>]+)?%>/g,reExp=/(^( )?(if|for|else|switch|case|break|{|}))(.*)?/g,code='var r=[];\n',cursor=0,match;var add=function(line,js){js?(code+=line.match(reExp)?line+'\n':'r.push('+line+');\n'):(code+=line!=''?'r.push("'+line.replace(/"/g,'\\"')+'");\n':'');return add}
var re=/<\%([^\%>]+)?\%>/g,reExp=/(^( )?(if|for|else|switch|case|break|{|}))(.*)?/g,code='var r=[];\n',cursor=0,match;var add=function(line,js){js?(code+=line.match(reExp)?line+'\n':'r.push('+line+');\n'):(code+=line!=''?'r.push("'+line.replace(/"/g,'\\"')+'");\n':'');return add}
while(match=re.exec(html)){add(html.slice(cursor,match.index))(match[1],!0);cursor=match.index+match[0].length}
add(html.substr(cursor,html.length-cursor));code+='return r.join("");';return new Function(code.replace(/[\r\t\n]/g,'')).apply(options)
}
@@ -3232,10 +3347,6 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
});
});
</script>
<?php if (isset($_GET['view']) && FM_USE_HIGHLIGHTJS): ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<?php endif; ?>
<?php if (isset($_GET['edit']) && isset($_GET['env']) && FM_EDIT_FILE): ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js"></script>
<script>
@@ -3365,8 +3476,10 @@ function lng($txt) {
$tr['en']['Move'] = 'Move'; $tr['en']['Change'] = 'Change';
$tr['en']['Settings'] = 'Settings'; $tr['en']['Language'] = 'Language';
$tr['en']['MemoryUsed'] = 'Memory used'; $tr['en']['PartitionSize'] = 'Partition size';
$tr['en']['ErrorReporting'] = 'Error Reporting'; $tr['en']['ShowHiddenFiles'] = 'Show Hidden Files';
$tr = fm_get_translations($tr);
$i18n = fm_get_translations($tr);
$tr = $i18n ? $i18n : $tr;
if (!strlen($lang)) $lang = 'en';
if (isset($tr[$lang][$txt])) return fm_enc($tr[$lang][$txt]);

View File

@@ -1,6 +1,6 @@
{
"appName": "Tiny File Manager",
"version": "2.3",
"version": "2.3.4",
"language": [
{
"name": "русский",
@@ -351,8 +351,74 @@
}
},
{
"name": "中文",
"code": "ch",
"name": "简体中文",
"code": "zh-CN",
"translation": {
"AppName": "Tiny File Manager",
"AppTitle": "文件及目录管理器",
"Login": "登录",
"Username": "账号",
"Password": "密码",
"Logout": "退出",
"Move": "移动",
"Copy": "拷贝",
"Save": "保存",
"SelectAll": "全选",
"UnSelectAll": "取消全选",
"File": "文件",
"Back": "取消上传",
"Size": "文档大小",
"Perms": "权限",
"Modified": "修改时间",
"Owner": "拥有者",
"Search": "查找",
"NewItem": "创建新文件/文件夹",
"Folder": "文件夹",
"Delete": "删除",
"CopyTo": "复制到",
"DirectLink": "直链",
"UploadingFiles": "上传",
"ChangePermissions": "修改权限",
"Copying": "复制中",
"CreateNewItem": "创建新文件",
"Name": "文件名",
"AdvancedEditor": "高级编辑器",
"RememberMe": "记住登录信息",
"Actions": "可执行操作",
"Upload": "上传",
"Cancel": "取消",
"InvertSelection": "反向选择",
"DestinationFolder": "目标文件夹",
"ItemType": "文件类型",
"ItemName": "创建名称",
"CreateNow": "创建",
"Download": "下載",
"UnZip": "解压缩",
"UnZipToFolder": "解压至目标文件夹",
"Edit": "编辑",
"NormalEditor": "编辑器",
"BackUp": "备份",
"SourceFolder": "源文件夹",
"Files": "文件",
"Change": "修改",
"Settings": "配置",
"Language": "语言",
"Open": "开启",
"Group": "用户组",
"Other": "其它用户",
"Read": "读取权限",
"Write": "写入权限",
"Execute": "执行权限",
"Rename": "重命名",
"enable": "启用",
"disable": "禁用",
"ErrorReporting": "上传错误报告",
"ShowHiddenFiles": "显示隐藏文件"
}
},
{
"name": "中文(繁體)",
"code": "zh-TW",
"translation": {
"AppName": "檔案管理器",
"AppTitle": "檔案管理器",
@@ -413,6 +479,181 @@
"enable": "開啟",
"disable": "關閉"
}
},
{
"name": "Bahasa Indonesia",
"code": "id",
"translation": {
"AppName": "Tiny File Manager",
"AppTitle": "Pengelola File",
"Login": "Masuk",
"Username": "Nama pengguna",
"Password": "Kata sandi",
"Logout": "Keluar",
"Move": "Pindah",
"Copy": "Salin",
"Save": "Simpan",
"SelectAll": "Pilih semua",
"UnSelectAll": "Batalkan pilihan semua",
"File": "File",
"Back": "Kembali",
"Size": "Ukuran",
"Perms": "Perizinan",
"Modified": "Terakhir diubah",
"Owner": "Pemilik",
"Search": "Cari",
"NewItem": "Item baru",
"Folder": "Folder",
"Delete": "Hapus",
"Rename": "Ganti nama",
"CopyTo": "Salin ke",
"DirectLink": "Link langsung",
"UploadingFiles": "Mengupload file",
"ChangePermissions": "Ubah perizinan",
"Copying": "Menyalin",
"CreateNewItem": "Buat item baru",
"Name": "Nama",
"AdvancedEditor": "Editor tingkat lanjut",
"RememberMe": "Ingat saya",
"Actions": "Aksi",
"Upload": "Upload",
"Cancel": "Batal",
"InvertSelection": "Pilihan sebaliknya",
"DestinationFolder": "Folder tujuan",
"ItemType": "Tipe item",
"ItemName": "Nama item",
"CreateNow": "Buat sekarang",
"Download": "Unduh",
"Open": "Buka",
"UnZip": "UnZip",
"UnZipToFolder": "UnZip ke folder",
"Edit": "Edit",
"NormalEditor": "Editor normal",
"BackUp": "Cadangkan",
"SourceFolder": "Folder sumber",
"Files": "File",
"Change": "Ubah",
"Settings": "Pengaturan",
"Language": "Bahasa",
"MemoryUsed": "Memori terpakai",
"PartitionSize": "Ukuran partisi"
}
},
{
"name": "Ελληνικά",
"code": "gr",
"translation": {
"AppName": "Tiny File Manager",
"AppTitle": "File Manager",
"Login": "Είσοδος",
"Username": "Username",
"Password": "Password",
"Logout": "Αποσύνδεση",
"Move": "Μετακίνση",
"Copy": "Αντιγραφή",
"Save": "Αποθήκευση",
"SelectAll": "Επιλογή όλων",
"UnSelectAll": "Αποεπιλογή όλων",
"File": "Αρχείο",
"Back": "Πίσω",
"Size": "Μέγεθος",
"Perms": "Άδειες",
"Modified": "Τροποποιημένο",
"Owner": "Ιδιοκτήτης",
"Search": "Αναζήτηση",
"NewItem": "Νέο Αντικείμενο",
"Folder": "Φάκελος",
"Delete": "Διαγραφή",
"Rename": "Μετονομασία",
"CopyTo": "Αντιγραφή σε",
"DirectLink": "Direct Link",
"UploadingFiles": "Ανέβασμα αρχείων",
"ChangePermissions": "Αλλαγή αδειών",
"Copying": "Αντιγραφή σε εξέλιξη",
"CreateNewItem": "Δημιουργία νέου αντικειμένου",
"Name": "Όνομα",
"AdvancedEditor": "Editor για προχωρημένους",
"RememberMe": "Θυμήσου με",
"Actions": "Ενέργειες",
"Upload": "Ανέβασμα",
"Cancel": "Ακύρωση",
"InvertSelection": "Αναίρεση επιλογής",
"DestinationFolder": "Φάκελος προορισμού",
"ItemType": "Τύπος αντικειμένου",
"ItemName": "Όνομα αντικειμένου",
"CreateNow": "Δημιούργησε τώρα",
"Download": "Download",
"Open": "Άνοιξε",
"UnZip": "Αποσυμπίεση",
"UnZipToFolder": "Αποσυμπίεση σε φάκελο",
"Edit": "Επεξεργασία",
"NormalEditor": "Βασικός editor",
"BackUp": "Back-Up",
"SourceFolder": "Πηγή",
"Files": "Αρχεία",
"Change": "Τροποποίησε",
"Settings": "Ρυθμίσεις",
"Language": "Γλώσσα",
"MemoryUsed": "Η μνήμη χρησιμοποιείται",
"PartitionSize": "Μέγεθος partition"
}
},
{
"name": "Português",
"code": "pt",
"translation": {
"AppName": "Gerenciador de arquivos Tiny",
"AppTitle": "Gerenciador de arquivos",
"Login": "Iniciar Sessão",
"Username": "Nome de usuário",
"Password": "Senha",
"Logout": "Sair",
"Move": "Mover",
"Copy": "Copiar",
"Save": "Salvar",
"SelectAll": "Selecionar tudo",
"UnSelectAll": "Desmarcar tudo",
"File": "Arquivo",
"Back": "Voltar",
"Size": "Tamanho",
"Perms": "Permissões",
"Modified": "Modificado",
"Owner": "Proprietário",
"Search": "Buscar",
"NewItem": "Novo Item",
"Folder": "Pasta",
"Delete": "Excluir",
"Rename": "Renomear",
"CopyTo": "Copiar em",
"DirectLink": "Link direto",
"UploadingFiles": "Upload de arquivos",
"ChangePermissions": "Alterar permissões",
"Copying": "Copiando",
"CreateNewItem": "Criar novo item",
"Name": "Nome",
"AdvancedEditor": "Editor Avançado",
"RememberMe": "Lembra de mim",
"Actions": "Ações",
"Upload": "Upload",
"Cancel": "Cancelar",
"InvertSelection": "Seleção reversa",
"DestinationFolder": "Pasta de destino",
"ItemType": "Tipo de Item",
"ItemName": "Nome do item",
"CreateNow": "Criar",
"Download": "Baixar",
"Open": "Abrir",
"UnZip": "Descompactar os arquivos",
"UnZipToFolder": "Descompactar na pasta",
"Edit": "Editar",
"NormalEditor": "Editor Normal",
"BackUp": "Copia de segurança",
"SourceFolder": "Pasta atual",
"Files": "Arquivos",
"Change": "Alterar",
"Settings": "Preferências",
"Language": "Idioma"
}
}
]
}