19 Commits
2.3.4 ... 2.3.8

Author SHA1 Message Date
Prasath Mani
3114fa92e3 Some language strings are missing. And other... #192
view file is insecure #187
Get files size (recursive) #186
There is no possibility for translation for some hints (title =) #185
View dirSize instead of word "Folder" #184
Document type detection #183
Stored Cross-site Scripting (XSS) Vulnerability detected in File Names #180
strings in code #177
Remove tracking #164
2019-07-23 12:56:01 +05:30
typewriter1
21094a66ee Fix spelling of "copyied" after copying file (#196)
Should be "copied".
2019-07-23 09:42:22 +05:30
Vebu
5386b89aaf Update tinyfilemanager.php (#194) 2019-07-23 09:42:00 +05:30
Vebu
b579489148 Update translation.json (#193)
Please add Czech translation
2019-07-23 09:41:13 +05:30
TheFax
9131db13a7 Updated italian translation (#182)
Added also "Move" that was missing in the file.
2019-07-23 09:40:47 +05:30
elhoussam
8d40ebcdd7 Improve Multilanguage Support (#179)
* Add Arabic Translation

* add some keywords and handling Fixed keywords [untranslated]

* add new translation words

* improve existing translation words
2019-07-23 09:40:26 +05:30
Yehuda Eisenberg
ea29092aea Add Save by ajax request (#175)
Add Save by ajax request, Instead of saving it to a post request and reloading the page each time.
2019-07-23 09:39:00 +05:30
Prasath Mani
1696ebf0fc IP whitelisting and/or blacklisting #171
Add Microsoft Office online view option #169
2019-05-19 12:31:49 +05:30
Yehuda Eisenberg
ffc34859cc Add Hebrew Language (#174)
Add Hebrew Language
2019-05-19 11:13:58 +05:30
elhoussam
9d472720a9 Add Arabic Translation (#176) 2019-05-19 11:10:56 +05:30
Kevin @ Navigram
498804f8a5 Basic IP white- and blacklisting (#178) 2019-05-19 11:10:20 +05:30
Prasath Mani
4b4b48242e PHP Warning: count() #173 2019-05-13 15:59:02 +05:30
Prasath Mani
f67a343f48 When uploading it doesnt override, insteads it crates a new filename #172
Add Custom Title and Favicon options #156
2019-05-13 15:48:29 +05:30
Daniel Kranich
f956ae3abc Add Custom Title and Favicon options (#156)
Added variables so the admin can set a custom title and favicon.
2019-05-07 15:13:37 +05:30
Prasath Mani
7a9730dfe1 Added .MKV format support and minor ui changes, #163. 2019-05-03 16:47:35 +05:30
Vu Thanh Tai
62e58a6597 add vietnamese language (#162) 2019-05-03 12:40:36 +05:30
Anton Dalmau Mines
0c5ee15ea3 Update translation.json (#151) 2019-05-03 12:38:45 +05:30
Prasath Mani
ae971c8b99 Fix for path traversal vulnerability, reported by - @hhc0null/Hiroki MATSUKUMA 2019-04-03 17:20:23 +05:30
Kamil Zarzycki
b546ac168e Add Polish language (#150) 2019-04-03 17:12:55 +05:30
3 changed files with 697 additions and 110 deletions

View File

@@ -5,7 +5,7 @@
[![Live demo](https://img.shields.io/badge/Help-Docs-lightgrey.svg?style=flat-square)](https://tinyfilemanager.github.io/)
[![GitHub Release](https://img.shields.io/github/release/qubyte/rubidium.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/releases)
[![GitHub License](https://img.shields.io/github/license/prasathmani/tinyfilemanager.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
[![Beerpay](https://beerpay.io/prasathmani/tinyfilemanager/badge.svg?style=flat-square)](https://beerpay.io/prasathmani/tinyfilemanager)
[![Paypal](https://img.shields.io/badge/Donate-Paypal-lightgrey.svg?style=flat-square)](https://www.paypal.me/prasathmani)
> It is a simple, fast and small file manager with single php file. It is also a web code editor. It'll run either online or locally, on Linux, Windows or Mac based platforms. The only requirement is to have **PHP 5.5+** available.
## Demo
@@ -23,8 +23,7 @@
## Requirements
- PHP 5.5.0 or higher.
- [Zip extension](http://php.net/manual/en/book.zip.php) for zip and unzip actions.
- Fileinfo, iconv and mbstring extensions are strongly recommended.
- Fileinfo, iconv, zip, tar and mbstring extensions are strongly recommended.
## How to use
@@ -55,15 +54,15 @@ To enable/disable authentication set `$use_auth` to true or false.
- :cd: Open Source, light and extremely simple
- :iphone: Mobile friendly view for touch devices
- :information_source: Basic features likes Create, Delete, Modify, View, Download, Copy and Move files
- :information_source: Basic features likes Create, Delete, Modify, View, Quick View, Download, Copy and Move files
- :arrow_double_up: Ajax Upload, Ability to drag & drop, upload from URL, multiple files upload and file extensions filter
- :file_folder: Ability to create folders and files
- :gift: Ability to compress, extract files (`zip`, `tar`)
- :sunglasses: Support user permissions - based on session and each user root folder mapping
- :floppy_disk: Copy direct file URL
- :pencil2: Cloud9 IDE - Syntax highlighting for over `150+` languages, Over `35+` themes with your favorite programming style
- :page_facing_up: Google Drive viewer helps you preview `PDF/DOC/XLS/PPT/etc`. 25 MB can be previewed with the Google Drive viewer
- :zap: Backup files
- :page_facing_up: Google/Microsoft doc viewer helps you preview `PDF/DOC/XLS/PPT/etc`. 25 MB can be previewed with the Google Drive viewer
- :zap: Backup files and IP white and blacklisting
- :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, Chinese and more..) for translations `translation.json` is file required
@@ -74,10 +73,7 @@ To enable/disable authentication set `$use_auth` to true or false.
- Available under the [GNU license](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
- Original concept and development by github.com/alexantr/filemanager
- CDN Used - _jQuery, Bootstrap, Font Awesome, Highlight js, ace js, DropZone js, DataTable js_
- CDN Used - _jQuery, Bootstrap, Font Awesome, Highlight js, ace js, DropZone js, ekko-lightbox js, and DataTable js_
- To report a bug or request a feature, please file an [issue](https://github.com/prasathmani/tinyfilemanager/issues)
- We hope our tools will be helpful for you. If you find Tiny File Manager useful for your personal or commercial projects, Help me out for a couple of
[![Beerpay](https://beerpay.io/prasathmani/tinyfilemanager/badge.svg?style=flat-square)](https://beerpay.io/prasathmani/tinyfilemanager)

View File

@@ -1,17 +1,21 @@
<?php
//Default Configuration
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false}';
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":true,"hide_Cols":false,"calc_folder":false}';
/**
* H3K | Tiny File Manager V2.3.4
* H3K | Tiny File Manager V2.3.8
* CCP Programmers | ccpprogrammers@gmail.com
* https://tinyfilemanager.github.io
*/
//TFM version
define('VERSION', '2.3.4');
define('VERSION', '2.3.8');
//Application Title
define('APP_TITLE', 'Tiny File Manager');
// Auth with login/password (set true/false to enable/disable it)
// Is independent from IP white- and blacklisting
$use_auth = true;
// Users: array('Username' => 'Password', 'Username2' => 'Password2', ...)
@@ -26,6 +30,27 @@ $readonly_users = array(
'user'
);
// Possible rules are 'OFF', 'AND' or 'OR'
// OFF => Don't check connection IP, defaults to OFF
// AND => Connection must be on the whitelist, and not on the blacklist
// OR => Connection must be on the whitelist, or not on the blacklist
$ip_ruleset = 'OFF';
// Should users be notified of their block?
$ip_silent = true;
// IP-addresses, both ipv4 and ipv6
$ip_whitelist = array(
'127.0.0.1', // local ipv4
'::1' // local ipv6
);
// IP-addresses, both ipv4 and ipv6
$ip_blacklist = array(
'0.0.0.0', // non-routable meta ipv4
'::' // non-routable meta ipv6
);
// user specific directories
// array('Username' => 'Directory path', 'Username2' => 'Directory path', ...)
$directories_users = array();
@@ -43,6 +68,7 @@ $edit_files = true;
$default_timezone = 'Etc/UTC'; // UTC
// Root path for file manager
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
$root_path = $_SERVER['DOCUMENT_ROOT'];
// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
@@ -59,20 +85,35 @@ $iconv_input_encoding = 'UTF-8';
$datetime_format = 'd.m.y H:i';
// allowed file extensions for upload and rename
$allowed_extensions = ''; // 'gif,png,jpg'
// e.g. 'gif,png,jpg'
$allowed_extensions = '';
// Favicon path. This can be either a full url to an .PNG image, or a path based on the document root.
// full path, e.g http://example.com/favicon.png
// local path, e.g images/icons/favicon.png
$favicon_path = '?img=favicon';
// Array of files and folders excluded from listing
// e.r array('myfile.html', 'personal-folder')
$GLOBALS['exclude_items'] = array();
// Google Docs Viewer
$GLOBALS['online_viewer'] = true;
// Online office Docs Viewer
// Availabe rules are 'google', 'microsoft' or false
// google => View documents using Google Docs Viewer
// microsoft => View documents using Microsoft Web Apps Viewer
// false => disable online dov viewer
$GLOBALS['online_viewer'] = 'google';
// Sticky Nav bar
// true => enable sticky header
// false => disable sticky header
$sticky_navbar = true;
// max upload file size
define('MAX_UPLOAD_SIZE', '2048');
//--- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL
// private key and session name to store to the session
if ( !defined( 'FM_SESSION_ID')) {
define('FM_SESSION_ID', 'filemanager');
@@ -90,13 +131,17 @@ $show_hidden_files = isset($cfg->data['show_hidden']) ? $cfg->data['show_hidden'
// PHP error reporting - false = Turns off Errors, true = Turns on Errors
$report_errors = isset($cfg->data['error_reporting']) ? $cfg->data['error_reporting'] : true;
// Hide Permissions and Owner cols in file-listing
$hide_Cols = isset($cfg->data['hide_Cols']) ? $cfg->data['hide_Cols'] : true;
// Show Dirsize: true or speedup output: false
$calc_folder = isset($cfg->data['calc_folder']) ? $cfg->data['calc_folder'] : true;
//available languages
$lang_list = array(
'en' => 'English'
);
//--- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL
if ($report_errors == true) {
@ini_set('error_reporting', E_ALL);
@ini_set('display_errors', 1);
@@ -105,9 +150,6 @@ if ($report_errors == true) {
@ini_set('display_errors', 0);
}
// Set Cookie
setcookie('fm_cache', true, 2147483647, "/");
// if fm included
if (defined('FM_EMBED')) {
$use_auth = false;
@@ -160,6 +202,39 @@ if (isset($_GET['img'])) {
fm_show_image($_GET['img']);
}
// Validate connection IP
if($ip_ruleset != 'OFF'){
$clientIp = $_SERVER['REMOTE_ADDR'];
$proceed = false;
$whitelisted = in_array($clientIp, $ip_whitelist);
$blacklisted = in_array($clientIp, $ip_blacklist);
if($ip_ruleset == 'AND'){
if($whitelisted == true && $blacklisted == false){
$proceed = true;
}
} else
if($ip_ruleset == 'OR'){
if($whitelisted == true || $blacklisted == false){
$proceed = true;
}
}
if($proceed == false){
trigger_error('User connection denied from: ' . $clientIp, E_USER_WARNING);
if($ip_silent == false){
fm_set_msg('Access denied. IP restriction applicable', 'error');
fm_show_header_login();
fm_show_message();
}
exit();
}
}
// Auth
if ($use_auth) {
if (isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_ID]['logged']])) {
@@ -199,7 +274,7 @@ if ($use_auth) {
</svg>
</div>
<div class="text-center">
<h1 class="card-title"><?php echo lng('AppName'); ?></h1>
<h1 class="card-title"><?php echo APP_TITLE; ?></h1>
</div>
<div class="card fat">
<div class="card-body">
@@ -231,7 +306,6 @@ if ($use_auth) {
</div>
<div class="footer text-center">
&mdash;&mdash; &copy;
<?php if(!isset($_COOKIE['fm_cache'])) { ?> <img src="https://logs-01.loggly.com/inputs/d8bad570-def7-44d4-922c-a8680d936ae6.gif?s=1" /> <?php } ?>
<a href="https://tinyfilemanager.github.io/" target="_blank" class="text-muted" data-version="<?php echo VERSION; ?>">CCP Programmers</a> &mdash;&mdash;
</div>
</div>
@@ -276,6 +350,10 @@ $p = isset($_GET['p']) ? $_GET['p'] : (isset($_POST['p']) ? $_POST['p'] : '');
// clean path
$p = fm_clean_path($p);
// for ajax request - save
$input = file_get_contents('php://input');
$_POST = (strpos($input, 'ajax') != FALSE && strpos($input, 'save') != FALSE) ? json_decode($input, true) : $_POST;
// instead globals vars
define('FM_PATH', $p);
define('FM_USE_AUTH', $use_auth);
@@ -292,6 +370,35 @@ unset($p, $use_auth, $iconv_input_encoding, $use_highlightjs, $highlightjs_style
// AJAX Request
if (isset($_POST['ajax']) && !FM_READONLY) {
// save
if (isset($_POST['type']) && $_POST['type'] == "save") {
// get current path
$path = FM_ROOT_PATH;
if (FM_PATH != '') {
$path .= '/' . FM_PATH;
}
// check path
if (!is_dir($path)) {
fm_redirect(FM_SELF_URL . '?p=');
}
$file = $_GET['edit'];
$file = fm_clean_path($file);
$file = str_replace('/', '', $file);
if ($file == '' || !is_file($path . '/' . $file)) {
fm_set_msg('File not found', 'error');
fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));
}
header('X-XSS-Protection:0');
$file_path = $path . '/' . $file;
$writedata = $_POST['content'];
$fd = fopen($file_path, "w");
@fwrite($fd, $writedata);
fclose($fd);
fm_set_msg('successful save!', 'alert');
die(true);
}
// backup files
if (isset($_POST['type']) && $_POST['type'] == "backup") {
$file = $_POST['file'];
@@ -304,7 +411,7 @@ if (isset($_POST['ajax']) && !FM_READONLY) {
// Save Config
if (isset($_POST['type']) && $_POST['type'] == "settings") {
global $cfg, $lang, $report_errors, $show_hidden_files, $lang_list;
global $cfg, $lang, $report_errors, $show_hidden_files, $lang_list, $hide_Cols, $calc_folder;
$newLng = $_POST['js-language'];
fm_get_translations([]);
if (!array_key_exists($newLng, $lang_list)) {
@@ -313,6 +420,8 @@ if (isset($_POST['ajax']) && !FM_READONLY) {
$erp = isset($_POST['js-error-report']) && $_POST['js-error-report'] == "true" ? true : false;
$shf = isset($_POST['js-show-hidden']) && $_POST['js-show-hidden'] == "true" ? true : false;
$hco = isset($_POST['js-hide-cols']) && $_POST['js-hide-cols'] == "true" ? true : false;
$caf = isset($_POST['js-calc-folder']) && $_POST['js-calc-folder'] == "true" ? true : false;
if ($cfg->data['lang'] != $newLng) {
$cfg->data['lang'] = $newLng;
@@ -326,6 +435,18 @@ if (isset($_POST['ajax']) && !FM_READONLY) {
$cfg->data['show_hidden'] = $shf;
$show_hidden_files = $shf;
}
if ($cfg->data['show_hidden'] != $shf) {
$cfg->data['show_hidden'] = $shf;
$show_hidden_files = $shf;
}
if ($cfg->data['hide_Cols'] != $hco) {
$cfg->data['hide_Cols'] = $hco;
$hide_Cols = $hco;
}
if ($cfg->data['calc_folder'] != $caf) {
$cfg->data['calc_folder'] = $caf;
$calc_folder = $caf;
}
$cfg->save();
echo true;
}
@@ -490,7 +611,7 @@ if (isset($_GET['copy'], $_GET['finish']) && !FM_READONLY) {
}
} else {
if (fm_rcopy($from, $dest)) {
fm_set_msg(sprintf('Copyied from <b>%s</b> to <b>%s</b>', fm_enc($copy), fm_enc($msg_from)));
fm_set_msg(sprintf('Copied from <b>%s</b> to <b>%s</b>', fm_enc($copy), fm_enc($msg_from)));
} else {
fm_set_msg(sprintf('Error while copying from <b>%s</b> to <b>%s</b>', fm_enc($copy), fm_enc($msg_from)), 'error');
}
@@ -570,7 +691,7 @@ if (isset($_GET['ren'], $_GET['to']) && !FM_READONLY) {
$old = str_replace('/', '', $old);
// new name
$new = $_GET['to'];
$new = fm_clean_path($new);
$new = fm_clean_path(strip_tags($new));
$new = str_replace('/', '', $new);
// path
$path = FM_ROOT_PATH;
@@ -620,6 +741,7 @@ if (isset($_GET['dl'])) {
// Upload
if (!empty($_FILES) && !FM_READONLY) {
$override_file_name = false;
$f = $_FILES;
$path = FM_ROOT_PATH;
$ds = DIRECTORY_SEPARATOR;
@@ -629,7 +751,6 @@ if (!empty($_FILES) && !FM_READONLY) {
$errors = 0;
$uploads = 0;
$total = count($f['file']['name']);
$allowed = (FM_EXTENSION) ? explode(',', FM_EXTENSION) : false;
$filename = $f['file']['name'];
@@ -641,7 +762,7 @@ if (!empty($_FILES) && !FM_READONLY) {
$fullPath = $path . '/' . $_REQUEST['fullpath'];
$folder = substr($fullPath, 0, strrpos($fullPath, "/"));
if(file_exists ($fullPath)) {
if(file_exists ($fullPath) && !$override_file_name) {
$ext_1 = $ext ? '.'.$ext : '';
$fullPath = str_replace($ext_1, '', $fullPath) .'_'. date('ymdHis'). $ext_1;
}
@@ -1124,6 +1245,34 @@ if (isset($_GET['settings']) && !FM_READONLY) {
</div>
</div>
<div class="form-group row">
<label for="js-hid-1" class="col-sm-3 col-form-label"><?php echo lng('HideColumns') ?></label>
<div class="col-sm-9">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary <?php echo getChecked($hide_Cols, 1, 'active') ?>">
<input type="radio" name="js-hide-cols" id="js-hid-1" autocomplete="off" value="true" <?php echo getChecked($hide_Cols, 1, 'checked') ?> > ON
</label>
<label class="btn btn-secondary <?php echo getChecked($hide_Cols, '', 'active') ?>">
<input type="radio" name="js-hide-cols" id="js-hid-0" autocomplete="off" value="false" <?php echo getChecked($hide_Cols, '', 'checked') ?> > OFF
</label>
</div>
</div>
</div>
<div class="form-group row">
<label for="js-dir-1" class="col-sm-3 col-form-label"><?php echo lng('CalculateFolderSize') ?></label>
<div class="col-sm-9">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-secondary <?php echo getChecked($calc_folder, 1, 'active') ?>">
<input type="radio" name="js-calc-folder" id="js-dir-1" autocomplete="off" value="true" <?php echo getChecked($calc_folder, 1, 'checked') ?> > ON
</label>
<label class="btn btn-secondary <?php echo getChecked($calc_folder, '', 'active') ?>">
<input type="radio" name="js-calc-folder" id="js-dir-0" autocomplete="off" value="false" <?php echo getChecked($calc_folder, '', 'checked') ?> > OFF
</label>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-success"> <i class="fa fa-check-circle"></i> <?php echo lng('Save'); ?></button>
@@ -1161,11 +1310,11 @@ if (isset($_GET['help'])) {
<div class="col-xs-12 col-sm-6">
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item"><a href="https://tinyfilemanager.github.io/" target="_blank"><i class="fa fa-question-circle"></i> Help Documents</a> </li>
<li class="list-group-item"><a href="https://github.com/prasathmani/tinyfilemanager/issues" target="_blank"><i class="fa fa-bug"></i> Report Issue</a></li>
<li class="list-group-item"><a href="javascript:latest_release_info('<?php echo VERSION; ?>');" target="_blank"><i class="fa fa-link"></i> Check Latest Version</a></li>
<li class="list-group-item"><a href="https://tinyfilemanager.github.io/" target="_blank"><i class="fa fa-question-circle"></i> <?php echo lng('Help Documents') ?> </a> </li>
<li class="list-group-item"><a href="https://github.com/prasathmani/tinyfilemanager/issues" target="_blank"><i class="fa fa-bug"></i> <?php echo lng('Report Issue') ?></a></li>
<li class="list-group-item"><a href="javascript:latest_release_info('<?php echo VERSION; ?>');" target="_blank"><i class="fa fa-link"> </i> <?php echo lng('Check Latest Version') ?></a></li>
<?php if(!FM_READONLY) { ?>
<li class="list-group-item"><a href="javascript:show_new_pwd();" target="_blank"><i class="fa fa-lock"></i> Generate new password hash</a></li>
<li class="list-group-item"><a href="javascript:show_new_pwd();" target="_blank"><i class="fa fa-lock"></i> <?php echo lng('Generate new password hash') ?></a></li>
<?php } ?>
</ul>
</div>
@@ -1176,13 +1325,13 @@ if (isset($_GET['help'])) {
<form class="form-inline" onsubmit="return new_password_hash(this)" method="POST" action="">
<input type="hidden" name="type" value="pwdhash" aria-label="hidden" aria-hidden="true">
<div class="form-group mb-2">
<label for="staticEmail2">Generate new password hash</label>
<label for="staticEmail2"><?php echo lng('Generate new password hash') ?></label>
</div>
<div class="form-group mx-sm-3 mb-2">
<label for="inputPassword2" class="sr-only">Password</label>
<label for="inputPassword2" class="sr-only"><?php echo lng('Password') ?></label>
<input type="text" class="form-control btn-sm" id="inputPassword2" name="inputPassword2" placeholder="Password" required>
</div>
<button type="submit" class="btn btn-success btn-sm mb-2">Generate</button>
<button type="submit" class="btn btn-success btn-sm mb-2"><?php echo lng('Generate') ?></button>
</form>
<textarea class="form-control" rows="2" readonly id="js-pwd-result"></textarea>
</div>
@@ -1201,7 +1350,7 @@ if (isset($_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)) {
if ($file == '' || !is_file($path . '/' . $file) || in_array($file, $GLOBALS['exclude_items'])) {
fm_set_msg('File not found', 'error');
fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));
}
@@ -1229,8 +1378,9 @@ if (isset($_GET['view'])) {
$view_title = 'File';
$filenames = false; // for zip
$content = ''; // for text
$online_viewer = strtolower($GLOBALS['online_viewer']);
if($GLOBALS['online_viewer'] && in_array($ext, fm_get_onlineViewer_exts())){
if(online_viewer && online_viewer !== 'false' && in_array($ext, fm_get_onlineViewer_exts())){
$is_onlineViewer = true;
}
elseif ($ext == 'zip' || $ext == 'tar') {
@@ -1300,41 +1450,37 @@ if (isset($_GET['view'])) {
?>
</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>
<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
// 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>
<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') ?>
<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') ?>
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>
<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
if($online_viewer == 'google') {
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>';
} else if($online_viewer == 'microsoft') {
echo '<iframe src="https://view.officeapps.live.com/op/embed.aspx?src=' . fm_enc($file_url) . '" frameborder="no" style="width:100%;min-height:460px"></iframe>';
}
} elseif ($is_zip) {
// ZIP content
if ($filenames !== false) {
@@ -1424,7 +1570,7 @@ if (isset($_GET['edit'])) {
$fd = fopen($file_path, "w");
@fwrite($fd, $writedata);
fclose($fd);
fm_set_msg('File Saved Successfully', 'alert');
fm_set_msg('File Saved Successfully');
}
$ext = strtolower(pathinfo($file_path, PATHINFO_EXTENSION));
@@ -1588,7 +1734,7 @@ $all_files_size = 0;
<th><?php echo lng('Name') ?></th>
<th><?php echo lng('Size') ?></th>
<th><?php echo lng('Modified') ?></th>
<?php if (!FM_IS_WIN): ?>
<?php if (!FM_IS_WIN && !$hide_Cols): ?>
<th><?php echo lng('Perms') ?></th>
<th><?php echo lng('Owner') ?></th><?php endif; ?>
<th><?php echo lng('Actions') ?></th>
@@ -1604,7 +1750,7 @@ $all_files_size = 0;
<td class="border-0"></td>
<td class="border-0"></td>
<td class="border-0"></td>
<?php if (!FM_IS_WIN) { ?>
<?php if (!FM_IS_WIN && !$hide_Cols) { ?>
<td class="border-0"></td>
<td class="border-0"></td>
<?php } ?>
@@ -1637,9 +1783,9 @@ $all_files_size = 0;
<div class="filename"><a href="?p=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="<?php echo $img ?>"></i> <?php echo fm_convert_win($f) ?>
</a><?php echo($is_link ? ' &rarr; <i>' . readlink($path . '/' . $f) . '</i>' : '') ?></div>
</td>
<td><?php echo lng('Folder') ?></td>
<td><?php if ($calc_folder) { echo fm_get_directorysize($path . '/' . $f); } else { echo "Folder"; } ?></td>
<td><?php echo $modif ?></td>
<?php if (!FM_IS_WIN): ?>
<?php if (!FM_IS_WIN && !$hide_Cols): ?>
<td><?php if (!FM_READONLY): ?><a title="Change Permissions" href="?p=<?php echo urlencode(FM_PATH) ?>&amp;chmod=<?php echo urlencode($f) ?>"><?php echo $perms ?></a><?php else: ?><?php echo $perms ?><?php endif; ?>
</td>
<td><?php echo $owner['name'] . ':' . $group['name'] ?></td>
@@ -1686,9 +1832,11 @@ $all_files_size = 0;
<div class="filename"><a href="<?php echo $filelink ?>" title="File info"><i class="<?php echo $img ?>"></i> <?php echo fm_convert_win($f) ?>
</a><?php echo($is_link ? ' &rarr; <i>' . readlink($path . '/' . $f) . '</i>' : '') ?></div>
</td>
<td><span title="<?php printf('%s bytes', $filesize_raw) ?>"><?php echo $filesize ?></span></td>
<td><span title="<?php printf('%s bytes', $filesize_raw) ?>">
<?php echo $filesize; ?>
</span></td>
<td><?php echo $modif ?></td>
<?php if (!FM_IS_WIN): ?>
<?php if (!FM_IS_WIN && !$hide_Cols): ?>
<td><?php if (!FM_READONLY): ?><a title="<?php echo 'Change Permissions' ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&amp;chmod=<?php echo urlencode($f) ?>"><?php echo $perms ?></a><?php else: ?><?php echo $perms ?><?php endif; ?>
</td>
<td><?php echo fm_enc($owner['name'] . ':' . $group['name']) ?></td>
@@ -1696,7 +1844,7 @@ $all_files_size = 0;
<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('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&amp;del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo lng('Delete').' '.lng('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') ?>..."
href="?p=<?php echo urlencode(FM_PATH) ?>&amp;copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-files-o"></i></a>
@@ -1725,11 +1873,11 @@ $all_files_size = 0;
<tr><?php if (!FM_READONLY): ?>
<td class="gray"></td><?php endif; ?>
<td class="gray" colspan="<?php echo !FM_IS_WIN ? '6' : '4' ?>">
Full size: <span title="<?php printf('%s bytes', $all_files_size) ?>"><?php echo '<span class="badge badge-light">'.fm_get_filesize($all_files_size).'</span>' ?></span>,
<?php echo lng('File').': <span class="badge badge-light">'.$num_files.'</span>' ?>,
<?php echo lng('Folder').': <span class="badge badge-light">'.$num_folders.'</span>' ?>,
<?php echo lng('MemoryUsed').': <span class="badge badge-light">'.fm_get_filesize(@memory_get_usage(true)).'</span>' ?>,
<?php echo lng('PartitionSize').': <span class="badge badge-light">'.fm_get_filesize(@disk_free_space($path)) .'</span> free of <span class="badge badge-light">'.fm_get_filesize(@disk_total_space($path)).'</span>'; ?>
<?php echo lng('FullSize').': <span class="badge badge-light">'.fm_get_filesize($all_files_size).'</span>' ?>
<?php echo lng('File').': <span class="badge badge-light">'.$num_files.'</span>' ?>
<?php echo lng('Folder').': <span class="badge badge-light">'.$num_folders.'</span>' ?>
<?php echo lng('MemoryUsed').': <span class="badge badge-light">'.fm_get_filesize(@memory_get_usage(true)).'</span>' ?>
<?php echo lng('PartitionSize').': <span class="badge badge-light">'.fm_get_filesize(@disk_free_space($path)) .'</span> '.lng('FreeOf').' <span class="badge badge-light">'.fm_get_filesize(@disk_total_space($path)).'</span>'; ?>
</td>
</tr>
</tfoot>
@@ -1958,6 +2106,27 @@ function fm_redirect($url, $code = 302)
exit;
}
/**
* Path traversal prevention and clean the url
* It replaces (consecutive) occurrences of / and \\ with whatever is in DIRECTORY_SEPARATOR, and processes /. and /.. fine.
* @param $path
* @return string
*/
function get_absolute_path($path) {
$path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
$parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');
$absolutes = array();
foreach ($parts as $part) {
if ('.' == $part) continue;
if ('..' == $part) {
array_pop($absolutes);
} else {
$absolutes[] = $part;
}
}
return implode(DIRECTORY_SEPARATOR, $absolutes);
}
/**
* Clean path
* @param string $path
@@ -1968,6 +2137,7 @@ function fm_clean_path($path)
$path = trim($path);
$path = trim($path, '\\/');
$path = str_replace(array('../', '..\\'), '', $path);
$path = get_absolute_path($path);
if ($path == '..') {
$path = '';
}
@@ -2085,6 +2255,27 @@ function fm_get_filesize($size)
}
}
/**
* Get director total size
* @param string $directory
* @return string
*/
function fm_get_directorysize($directory) {
global $calc_folder;
if ($calc_folder==true) { // Slower output
$size = 0; $count= 0; $dirCount= 0;
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file)
if ($file->isFile())
{ $size+=$file->getSize();
$count++;
}
else if ($file->isDir()) { $dirCount++; }
// return [$size, $count, $dirCount];
return fm_get_filesize($size);
}
else return 'Folder'; // Quick output
}
/**
* Get info about zip archive
* @param string $path
@@ -2379,7 +2570,7 @@ function fm_get_image_exts()
*/
function fm_get_video_exts()
{
return array('webm', 'mp4', 'm4v', 'ogm', 'ogv', 'mov');
return array('webm', 'mp4', 'm4v', 'ogm', 'ogv', 'mov', 'mkv');
}
/**
@@ -2803,7 +2994,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, $root_url;
global $lang, $root_url, $favicon_path;
?>
<!DOCTYPE html>
<html lang="en">
@@ -2814,8 +3005,8 @@ global $lang, $root_url;
<meta name="author" content="CCP Programmers">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex">
<link rel="icon" href="<?php echo $root_url ?>?img=favicon" type="image/png">
<title>H3K | Tiny File Manager</title>
<link rel="icon" href="<?php echo fm_enc($favicon_path) ?>" type="image/png">
<title><?php echo fm_enc(APP_TITLE) ?></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<style>
body.fm-login-page{background-color:#f7f9fb;font-size:14px}
@@ -2872,7 +3063,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, $root_url, $sticky_navbar;
global $lang, $root_url, $sticky_navbar, $favicon_path;
$isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
?>
<!DOCTYPE html>
@@ -2884,8 +3075,8 @@ $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 $root_url ?>?img=favicon" type="image/png">
<title>H3K | Tiny File Manager</title>
<link rel="icon" href="<?php echo fm_enc($favicon_path) ?>" type="image/png">
<title><?php echo fm_enc(APP_TITLE) ?></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">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css" />
@@ -2947,6 +3138,8 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
padding: 0;
min-width: 18px;
}
.table-sm td, .table-sm th { padding: .4rem;}
.table-bordered td, .table-bordered th { border: 1px solid #f1f1f1;}
.hidden {
display: none
}
@@ -3150,7 +3343,7 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
.ekko-lightbox-nav-overlay a:hover{
color: #20507D;
}
#main-table span.badge{border-bottom:2px solid #f8f9fa}#main-table span.badge:nth-child(1){border-color:#df4227}#main-table span.badge:nth-child(2){border-color:#f8b600}#main-table span.badge:nth-child(3){border-color:#00bd60}#main-table span.badge:nth-child(4){border-color:#4581ff}#main-table span.badge:nth-child(5){border-color:#ac68fc}#main-table span.badge:nth-child(6){border-color:#45c3d2}
@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}}
@@ -3237,12 +3430,9 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
<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); } };
var reInitHighlight = function() { if(typeof isHighlightingEnabled !== "undefined" && isHighlightingEnabled) { setTimeout(function () { $('.ekko-lightbox-container pre code').each(function (i, e) { hljs.highlightBlock(e) }); }, 555); } };
$(this).ekkoLightbox({
alwaysShowClose: true,
showArrows: true,
onShown: function() { reInitHighlight(); },
onNavigate: function(direction, itemIndex) { reInitHighlight(); }
alwaysShowClose: true, showArrows: true, onShown: function() { reInitHighlight(); }, onNavigate: function(direction, itemIndex) { reInitHighlight(); }
});
});
//TFM Config
@@ -3275,6 +3465,22 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
function edit_save(e, t) {
var n = "ace" == t ? editor.getSession().getValue() : document.getElementById("normal-editor").value;
if (n) {
if(true){
var data = {ajax: true, content: n, type: 'save'};
$.ajax({
type: "POST",
url: window.location,
// The key needs to match your method's input parameter (case-sensitive).
data: JSON.stringify(data),
contentType: "multipart/form-data-encoded; charset=utf-8",
//dataType: "json",
success: function(mes){window.onbeforeunload = function() {return}},
failure: function(mes) {alert("error");}
});
}
else{
var a = document.createElement("form");
a.setAttribute("method", "POST"), a.setAttribute("action", "");
var o = document.createElement("textarea");
@@ -3283,6 +3489,7 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
o.appendChild(c), a.appendChild(o), document.body.appendChild(a), a.submit()
}
}
}
//Check latest version
function latest_release_info(v) {
if(!!window.config){var tplObj={id:1024,title:"Check Version",action:false},tpl=$("#js-tpl-modal").html();
@@ -3347,11 +3554,14 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
});
});
</script>
<?php if (isset($_GET['edit']) && isset($_GET['env']) && FM_EDIT_FILE): ?>
<?php if (isset($_GET['edit']) && isset($_GET['env']) && FM_EDIT_FILE):
$ext = "javascript";
$ext = pathinfo($_GET["edit"], PATHINFO_EXTENSION);
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js"></script>
<script>
var editor = ace.edit("editor");
editor.getSession().setMode("ace/mode/javascript");
editor.getSession().setMode( {path:"ace/mode/<?php echo $ext; ?>", inline:true} );
//editor.setTheme("ace/theme/twilight"); //Dark Theme
function ace_commend (cmd) { editor.commands.exec(cmd, editor); }
editor.commands.addCommands([{
@@ -3359,9 +3569,10 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
exec: function(editor) { edit_save(this, 'ace'); }
}]);
function renderThemeMode() {
var $modeEl = $("select#js-ace-mode"), $themeEl = $("select#js-ace-theme"), optionNode = function(type, arr){ var $Option = ""; $.each(arr, function(i, val) { $Option += "<option value='"+type+i+"'>" + val + "</option>"; }); return $Option; };
if(window.config && window.config.aceMode) { $modeEl.html(optionNode("ace/mode/", window.config.aceMode)); }
if(window.config && window.config.aceTheme) { var lightTheme = optionNode("ace/theme/", window.config.aceTheme.bright), darkTheme = optionNode("ace/theme/", window.config.aceTheme.dark); $themeEl.html("<optgroup label=\"Bright\">"+lightTheme+"</optgroup><optgroup label=\"Dark\">"+darkTheme+"</optgroup>");}
var $modeEl = $("select#js-ace-mode"), $themeEl = $("select#js-ace-theme"), optionNode = function(type, arr){ var $Option = ""; $.each(arr, function(i, val) { $Option += "<option value='"+type+i+"'>" + val + "</option>"; }); return $Option; },
_data = {"aceTheme":{"bright":{"chrome":"Chrome","clouds":"Clouds","crimson_editor":"Crimson Editor","dawn":"Dawn","dreamweaver":"Dreamweaver","eclipse":"Eclipse","github":"GitHub","iplastic":"IPlastic","solarized_light":"Solarized Light","textmate":"TextMate","tomorrow":"Tomorrow","xcode":"XCode","kuroir":"Kuroir","katzenmilch":"KatzenMilch","sqlserver":"SQL Server"},"dark":{"ambiance":"Ambiance","chaos":"Chaos","clouds_midnight":"Clouds Midnight","dracula":"Dracula","cobalt":"Cobalt","gruvbox":"Gruvbox","gob":"Green on Black","idle_fingers":"idle Fingers","kr_theme":"krTheme","merbivore":"Merbivore","merbivore_soft":"Merbivore Soft","mono_industrial":"Mono Industrial","monokai":"Monokai","pastel_on_dark":"Pastel on dark","solarized_dark":"Solarized Dark","terminal":"Terminal","tomorrow_night":"Tomorrow Night","tomorrow_night_blue":"Tomorrow Night Blue","tomorrow_night_bright":"Tomorrow Night Bright","tomorrow_night_eighties":"Tomorrow Night 80s","twilight":"Twilight","vibrant_ink":"Vibrant Ink"}},"aceMode":{"javascript":"JavaScript","abap":"ABAP","abc":"ABC","actionscript":"ActionScript","ada":"ADA","apache_conf":"Apache Conf","asciidoc":"AsciiDoc","asl":"ASL","assembly_x86":"Assembly x86","autohotkey":"AutoHotKey","apex":"Apex","batchfile":"BatchFile","bro":"Bro","c_cpp":"C and C++","c9search":"C9Search","cirru":"Cirru","clojure":"Clojure","cobol":"Cobol","coffee":"CoffeeScript","coldfusion":"ColdFusion","csharp":"C#","csound_document":"Csound Document","csound_orchestra":"Csound","csound_score":"Csound Score","css":"CSS","curly":"Curly","d":"D","dart":"Dart","diff":"Diff","dockerfile":"Dockerfile","dot":"Dot","drools":"Drools","edifact":"Edifact","eiffel":"Eiffel","ejs":"EJS","elixir":"Elixir","elm":"Elm","erlang":"Erlang","forth":"Forth","fortran":"Fortran","fsharp":"FSharp","fsl":"FSL","ftl":"FreeMarker","gcode":"Gcode","gherkin":"Gherkin","gitignore":"Gitignore","glsl":"Glsl","gobstones":"Gobstones","golang":"Go","graphqlschema":"GraphQLSchema","groovy":"Groovy","haml":"HAML","handlebars":"Handlebars","haskell":"Haskell","haskell_cabal":"Haskell Cabal","haxe":"haXe","hjson":"Hjson","html":"HTML","html_elixir":"HTML (Elixir)","html_ruby":"HTML (Ruby)","ini":"INI","io":"Io","jack":"Jack","jade":"Jade","java":"Java","json":"JSON","jsoniq":"JSONiq","jsp":"JSP","jssm":"JSSM","jsx":"JSX","julia":"Julia","kotlin":"Kotlin","latex":"LaTeX","less":"LESS","liquid":"Liquid","lisp":"Lisp","livescript":"LiveScript","logiql":"LogiQL","lsl":"LSL","lua":"Lua","luapage":"LuaPage","lucene":"Lucene","makefile":"Makefile","markdown":"Markdown","mask":"Mask","matlab":"MATLAB","maze":"Maze","mel":"MEL","mixal":"MIXAL","mushcode":"MUSHCode","mysql":"MySQL","nix":"Nix","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","pascal":"Pascal","perl":"Perl","perl6":"Perl 6","pgsql":"pgSQL","php_laravel_blade":"PHP (Blade Template)","php":"PHP","puppet":"Puppet","pig":"Pig","powershell":"Powershell","praat":"Praat","prolog":"Prolog","properties":"Properties","protobuf":"Protobuf","python":"Python","r":"R","razor":"Razor","rdoc":"RDoc","red":"Red","rhtml":"RHTML","rst":"RST","ruby":"Ruby","rust":"Rust","sass":"SASS","scad":"SCAD","scala":"Scala","scheme":"Scheme","scss":"SCSS","sh":"SH","sjs":"SJS","slim":"Slim","smarty":"Smarty","snippets":"snippets","soy_template":"Soy Template","space":"Space","sql":"SQL","sqlserver":"SQLServer","stylus":"Stylus","svg":"SVG","swift":"Swift","tcl":"Tcl","terraform":"Terraform","tex":"Tex","text":"Text","textile":"Textile","toml":"Toml","tsx":"TSX","twig":"Twig","typescript":"Typescript","vala":"Vala","vbscript":"VBScript","velocity":"Velocity","verilog":"Verilog","vhdl":"VHDL","visualforce":"Visualforce","wollok":"Wollok","xml":"XML","xquery":"XQuery","yaml":"YAML","django":"Django"}};
if(_data && _data.aceMode) { $modeEl.html(optionNode("ace/mode/", _data.aceMode)); }
if(_data && _data.aceTheme) { var lightTheme = optionNode("ace/theme/", _data.aceTheme.bright), darkTheme = optionNode("ace/theme/", _data.aceTheme.dark); $themeEl.html("<optgroup label=\"Bright\">"+lightTheme+"</optgroup><optgroup label=\"Dark\">"+darkTheme+"</optgroup>");}
}
$(function(){
@@ -3477,6 +3688,14 @@ function lng($txt) {
$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['en']['Full size'] = 'Full size'; $tr['en']['Help'] = 'Help';
$tr['en']['Free of'] = 'Free of'; $tr['en']['Preview'] = 'Preview';
$tr['en']['Help Documents'] = 'Help Documents'; $tr['en']['Report Issue'] = 'Report Issue';
$tr['en']['Generate'] = 'Generate'; $tr['en']['FullSize'] = 'Full Size';
$tr['en']['FreeOf'] = 'free of'; $tr['en']['CalculateFolderSize']= 'Calculate folder size';
$tr['en']['Check Latest Version']= 'Check Latest Version';
$tr['en']['Generate new password hash'] = 'Generate new password hash';
$tr['en']['HideColumns'] = 'Hide Perms/Owner columns';
$i18n = fm_get_translations($tr);
$tr = $i18n ? $i18n : $tr;

View File

@@ -1,6 +1,6 @@
{
"appName": "Tiny File Manager",
"version": "2.3.4",
"version": "2.3.8",
"language": [
{
"name": "русский",
@@ -113,11 +113,14 @@
"BackUp": "Back-Up",
"SourceFolder": "Cartella di Origine",
"Files": "File",
"Move": "Sposta",
"Change": "Cambia",
"Settings": "Impostazioni",
"Language": "Lingua",
"MemoryUsed": "Memoria utilizzata",
"PartitionSize": "Dimensione della partizione"
"PartitionSize": "Dimensione della partizione",
"ErrorReporting": "Segnala errori",
"ShowHiddenFiles": "Mostra file nascosti"
}
},
{
@@ -237,13 +240,71 @@
}
},
{
"name": "Deutsche",
"name": "Català",
"code": "ca",
"translation": {
"AppName": "Tiny File Manager",
"AppTitle": "Administrador d'Arxius",
"Login": "Iniciar Sessió",
"Username": "Nom d'Usuari",
"Password": "Contrasenya",
"Logout": "Desconnectar-se",
"Move": "Moure",
"Copy": "Copiar",
"Save": "Desar",
"SelectAll": "Seleccionar Tot",
"UnSelectAll": "Deseleccionar Tot",
"File": "Arxiu",
"Back": "Enrere",
"Size": "Mida",
"Perms": "Permisos",
"Modified": "Modificat",
"Owner": "Propietari",
"Search": "Cercar",
"NewItem": "Nou Ítem",
"Folder": "Carpeta",
"Delete": "Esborrar",
"Rename": "Canviar Nom",
"CopyTo": "Copiar a",
"DirectLink": "Enllaç Directe",
"UploadingFiles": "Pujar Arxius",
"ChangePermissions": "Canviar Permisos",
"Copying": "Copiant",
"CreateNewItem": "Crear un Nou Ítem",
"Name": "Nom",
"AdvancedEditor": "Editor Avançat",
"RememberMe": "Recorda'm",
"Actions": "Accions",
"Upload": "Pujar",
"Cancel": "Cancel·lar",
"InvertSelection": "Invertir Selecció",
"DestinationFolder": "Carpeta Destí",
"ItemType": "Tipus d'Ítem",
"ItemName": "Nom de l'Ítem",
"CreateNow": "Crear",
"Download": "Descarregar",
"Open": "Obrir",
"UnZip": "Descomprimir",
"UnZipToFolder": "Descomprimir a Carpeta",
"Edit": "Editar",
"NormalEditor": "Editor Normal",
"BackUp": "Còpia de Seguretat",
"SourceFolder": "Carpeta Actual",
"Files": "Arxius",
"Change": "Canviar",
"Settings": "Preferències",
"Language": "Idioma",
"Preview": "Previsualitzar"
}
},
{
"name": "Deutsch",
"code": "de",
"translation": {
"AppName": "Tiny File Manager",
"AppTitle": "Datei Manager",
"Login": "Einloggen",
"Username": "Benutername",
"Username": "Benutzername",
"Password": "Passwort",
"Logout": "Ausloggen",
"Move": "Verschieben",
@@ -254,26 +315,26 @@
"File": "Datei",
"Back": "Zurück",
"Size": "Größe",
"Perms": "Perms",
"Perms": "Berechtigungen",
"Modified": "Geändert",
"Owner": "Eigentümer",
"Search": "Suchen",
"NewItem": "Neues Item",
"NewItem": "Neues Element",
"Folder": "Ordner",
"Delete": "Löschen",
"Rename": "Umbennen",
"Rename": "Umbenennen",
"CopyTo": "Kopieren nach",
"DirectLink": "Direktlink",
"UploadingFiles": "Datei hochladen",
"ChangePermissions": "Berechtigungen ändern",
"Copying": "Kopieren",
"CreateNewItem": "Neue Datei erstellen",
"Name": "Naam",
"AdvancedEditor": "Fortgeschrittener Editor",
"Name": "Name",
"AdvancedEditor": "Erweiterter Editor",
"RememberMe": "Eingeloggt bleiben",
"Actions": "Aktionen",
"Upload": "Hochladen",
"Cancel": "Abbrechner",
"Cancel": "Abbrechen",
"InvertSelection": "Auswahl umkehren",
"DestinationFolder": "Zielordner",
"ItemType": "Dateityp",
@@ -281,14 +342,14 @@
"CreateNow": "Jetzt erstellen",
"Download": "Download",
"Open": "Öffnen",
"UnZip": "UnZip",
"UnZipToFolder": "UnZip im Ordner",
"UnZip": "Entpacken",
"UnZipToFolder": "Entpacken im Ordner",
"Edit": "Bearbeiten",
"NormalEditor": "Normaler Editor",
"NormalEditor": "Standard Editor",
"BackUp": "Backup",
"SourceFolder": "Source ordner",
"Files": "Datein",
"Change": "Verändern",
"SourceFolder": "Quellordner",
"Files": "Dateien",
"Change": "Ändern",
"Settings": "Einstellungen",
"Language": "Sprache"
}
@@ -654,6 +715,317 @@
"Settings": "Preferências",
"Language": "Idioma"
}
},
{
"name": "Polski",
"code": "pl",
"translation": {
"AppName": "Tiny File Manager",
"AppTitle": "Menedżer plików",
"Login": "Login",
"Username": "Nazwa Użytkownika",
"Password": "Hasło",
"Logout": "Wyloguj",
"Move": "Przenieś",
"Copy": "Kopiuj",
"Save": "Zapisz",
"SelectAll": "Zaznacz wszystko",
"UnSelectAll": "Odznacz wszystko",
"File": "Plik",
"Back": "Cofnij",
"Size": "Rozmiar",
"Perms": "Uprawnienia",
"Modified": "Zmodyfikowano",
"Owner": "Właściciel",
"Search": "Szukaj",
"NewItem": "Nowy plik",
"Folder": "Folder",
"Delete": "Usuń",
"Rename": "Zmień nazwę",
"CopyTo": "Kopiuj do",
"DirectLink": "Link bezpośredni",
"UploadingFiles": "Wysyłanie plików",
"ChangePermissions": "Zmień uprawnienia",
"Copying": "Kopiowanie",
"CreateNewItem": "Utwórz nowy plik",
"Name": "Nazwa",
"AdvancedEditor": "Zaawansowany edytor",
"RememberMe": "Pamiętaj mnie",
"Actions": "Akcje",
"Upload": "Wyślij",
"Cancel": "Anuluj",
"InvertSelection": "Odwróć zaznaczenie",
"DestinationFolder": "Folder docelowy",
"ItemType": "Typ pliku",
"ItemName": "Nazwa pliku",
"CreateNow": "Utwórz nowy",
"Download": "Pobierz",
"Open": "Otwórz",
"UnZip": "Rozpakuj",
"UnZipToFolder": "Rozpakuj do",
"Edit": "Edytuj",
"NormalEditor": "Edytuj normalnie",
"BackUp": "Kopia zapasowa",
"SourceFolder": "Folder źródłowy",
"Files": "Pliki",
"Change": "Zmień",
"Settings": "Ustawienia",
"Language": "Język"
}
},
{
"name": "Việt Nam",
"code": "vi",
"translation": {
"AppName": "Trình quản lí tệp Tiny",
"AppTitle": "Trình quản lí",
"Login": "Đăng nhập",
"Username": "Tên đăng nhập",
"Password": "Mật khẩu",
"Logout": "Đăng xuất",
"Move": "Di chuyển",
"Copy": "Sao chép",
"Save": "Lưu",
"SelectAll": "Chọn tất cả",
"UnSelectAll": "Hủy chọn tất cả",
"File": "Tệp tin",
"Back": "Trở lại",
"Size": "Kích cỡ",
"Perms": "Quyền",
"Modified": "Sửa đổi",
"Owner": "Sở hữu",
"Search": "Tìm kiếm",
"NewItem": "Tạo mới",
"Folder": "Thư mục",
"Delete": "Xóa",
"Rename": "Đổi tên",
"CopyTo": "Sao chép đến",
"DirectLink": "Đường dẫn URL",
"UploadingFiles": "Tải lên file",
"ChangePermissions": "Thay đổi quyền",
"Copying": "Đang sao chép",
"CreateNewItem": "Tạo mới",
"Name": "Tên",
"AdvancedEditor": "Chỉnh sửa nâng cao",
"RememberMe": "Ghi nhớ đăng nhập",
"Actions": "Hành động",
"Upload": "Tải lên",
"Cancel": "Hủy",
"InvertSelection": "Lừa chọn đảo ngươc",
"DestinationFolder": "Thư mục đích",
"ItemType": "Kiểu",
"ItemName": "Tên tệp",
"CreateNow": "Tạo",
"Download": "Tải xuống",
"Open": "Mở",
"UnZip": "Giải nén",
"UnZipToFolder": "Giải nén đến thư mục",
"Edit": "Sửa",
"NormalEditor": "Chỉnh sửa",
"BackUp": "Back up",
"SourceFolder": "Thư mục",
"Files": "Tệp tin",
"Change": "Thay đổi",
"Settings": "Cài đặt",
"Language": "Ngôn ngữ",
"PartitionSize": "Kích thước"
}
},
{
"name": "Hebrew",
"code": "he",
"translation": {
"AppName": "סייר קבצים - טיני",
"AppTitle": "סייר קבצים",
"Login": "התחבר",
"Username": "שם משתמש",
"Password": "סיסמה",
"Logout": "התנתק",
"Move": "העבר",
"Copy": "העתק",
"Save": "שמור",
"SelectAll": "בחר הכל",
"UnSelectAll": "בטל בחירה מהכל",
"File": "קובץ",
"Back": "חזור",
"Size": "גודל",
"Perms": "הרשאות",
"Modified": "עודכן בתאריך",
"Owner": "בעלים",
"Search": "חיפוש",
"NewItem": "חדש",
"Folder": "תיקייה",
"Delete": "מחק",
"Rename": "שנה שם",
"CopyTo": "העתק ל",
"DirectLink": "קישור ישיר",
"UploadingFiles": "מעלה קבצים",
"ChangePermissions": "שנה הרשאות",
"Copying": "העותק",
"CreateNewItem": "צור פריט חדש",
"Name": "שם",
"AdvancedEditor": "עורך מתקדם",
"RememberMe": "זכור אותי",
"Actions": "פעולות",
"Upload": "העלה",
"Cancel": "ביטול",
"InvertSelection": "הפוך את הבחירה",
"DestinationFolder": "תיקיית יעד",
"ItemType": "סוג פריט",
"ItemName": "שם הפריט",
"CreateNow": "צור עכשיו",
"Download": "הורד",
"Open": "פתח",
"UnZip": "חילוץ",
"UnZipToFolder": "חלץ לתיקייה",
"Edit": "ערוך",
"NormalEditor": "עורך רגיל",
"BackUp": "גיבוי",
"SourceFolder": "תקיית מקור",
"Files": "קבצים",
"Change": "שנה",
"Settings": "הגדרות",
"Language": "שפה",
"MemoryUsed": "זיכרון בשימוש",
"PartitionSize": "גודל מחיצה"
}
},
{
"name": "العربية",
"code": "Ar",
"translation": {
"AppName": "مدير الملفات الصغير",
"AppTitle": "مدير الملفات",
"Login": "دخول",
"Username": "اسم المستخدم",
"Password": "كلمة المرور",
"Logout": "خروج",
"Move": "نقل",
"Copy": "نسخ",
"Save": "حفظ",
"SelectAll": "تحديد الكل",
"UnSelectAll": "الغاء تحديد الكل",
"File": "ملف",
"Back": "رجوع",
"Size": "حجم",
"Perms": "صلاحيات",
"Modified": "عدل بـ",
"Owner": "المالك",
"Search":"بحث",
"NewItem": "عنصر جديد",
"Folder": "مجلد",
"Delete": "حذف",
"Rename": "تسمية",
"CopyTo": "نسخ الى",
"DirectLink": "رابط مباشر",
"UploadingFiles": "رفع ملفات",
"ChangePermissions": "تغيير الصلاحيات",
"Copying": "جاري النسخ",
"CreateNewItem": "انشاء عنصر جديد",
"Name": "اسم",
"AdvancedEditor": "محرر متقدم",
"RememberMe": "تذكرني",
"Actions": "عمليات",
"Upload": "رفع",
"Cancel": "الغاء",
"InvertSelection": "عكس التحديد",
"DestinationFolder": "مجلد",
"ItemType": "نوع العنصر",
"ItemName": "اسم العنصر",
"CreateNow": "انشأ الآن",
"Download": "تحميل",
"Open": "فتح",
"UnZip": "فك الضغط",
"UnZipToFolder": "فك الصغط لملف",
"Edit": "نحرير",
"NormalEditor": "محرر عادي",
"BackUp": "نسخة احتياطية",
"SourceFolder": "مجلد المصدر",
"Files": "ملفات",
"Change": "تغيير",
"Settings": "اعدادات",
"Language": "لغة",
"MemoryUsed": "الذاكرة المستخدمة",
"PartitionSize": "حجم القسم",
"Free of": "مساحة فارغة من ",
"Preview": "عرض",
"Full size": "الحجم الكلي",
"ErrorReporting": "التبليغ باخطاء",
"ShowHiddenFiles": "اظهار الملفات المخفية",
"Help": "مساعدة",
"Generate": "توليد",
"Report Issue": "التبليغ بمشكلة",
"Generate new password hash": "توليد هاش لكلمة المرور",
"Help Documents": "وثائق المساعدة",
"Check Latest Version": "تفقد آخر الاصدارات"
}
},
{
"name": "Česky",
"code": "cz",
"translation": {
"AppName": "Tiny File Manager",
"AppTitle": "File Manager",
"Login": "Přihlásit",
"Username": "Přihlašovací jméno",
"Password": "Heslo",
"Logout": "Odhlásit",
"Move": "Přesunout",
"Copy": "Kopírovat",
"Save": "Uložit",
"SelectAll": "Vybrat vše",
"UnSelectAll": "Odebrat vše",
"File": "Soubor",
"Back": "Zpět",
"Size": "Velikost",
"Perms": "Oprávnění",
"Modified": "Změněno",
"Owner": "Vlastník",
"Search": "Hledat",
"NewItem": "Nová položka",
"Folder": "Složka",
"Delete": "Smazat",
"Rename": "Přejmenovat",
"CopyTo": "Kopírovat do",
"DirectLink": "Přímý odkaz",
"UploadingFiles": "Nahrát soubory",
"ChangePermissions": "Změnit oprávnění",
"Copying": "Kopírování",
"CreateNewItem": "Vytvoř novou položku",
"Name": "Název",
"AdvancedEditor": "Vylepšený editor",
"RememberMe": "Pamatuj si mně",
"Actions": "Akce",
"Upload": "Nahrát",
"Cancel": "Ukončit",
"InvertSelection": "Obrať výběr",
"DestinationFolder": "Konečná složka",
"ItemType": "Typ položky",
"ItemName": "Název položky",
"CreateNow": "Vytvořit",
"Download": "Stáhnout",
"Open": "Otevřít",
"UnZip": "Rozbalit",
"UnZipToFolder": "Rozbalit do",
"Edit": "Úpravy",
"NormalEditor": "Editor",
"BackUp": "Záloha",
"SourceFolder": "Zdrojová složka",
"Files": "Soubory",
"Change": "Změnit",
"Settings": "Nastavení",
"Language": "Jazyk",
"MemoryUsed": "Využitá paměť",
"PartitionSize": "Velikost oddílu",
"ErrorReporting": "Hlášení chyb",
"ShowHiddenFiles": "Zobrazit skryté soubory",
"Preview": "Náhled",
"Help": "Pomoc",
"FullSize": "Plná velikost",
"FreeOf": "volné z"
}
}
]
}