diff --git a/README.md b/README.md
index dca8858..4596f60 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,22 @@
# Tiny File Manager
-
[![Live demo](https://img.shields.io/badge/Live-Demo-brightgreen.svg?style=flat-square)](https://tinyfilemanager.github.io/demo/)
[![Live demo](https://img.shields.io/badge/Help-Docs-lightgrey.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/wiki)
[![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)
+[![GitHub License](https://img.shields.io/github/license/prasathmani/tinyfilemanager.svg?style=flat-square)](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
[![Paypal](https://img.shields.io/badge/Donate-Paypal-lightgrey.svg?style=flat-square)](https://www.paypal.me/prasathmani)
+
> TinyFileManager is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, uploading, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, It allows the creation of multiple users and each user can have its own directory and a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes.
## Demo
+
[Demo](https://tinyfilemanager.github.io/demo/)
- Login Details : admin/admin@123 | user/12345
-
+Login Details : admin/admin@123 | user/12345
## Documentation
-Tinyfilemanager is highly documented on the [wiki pages](https://github.com/prasathmani/tinyfilemanager/wiki).
+Tinyfilemanager is highly documented on the [wiki pages](https://github.com/prasathmani/tinyfilemanager/wiki).
[![Tiny File Manager](screenshot.gif)](screenshot.gif)
@@ -38,13 +38,14 @@ Default username/password: **admin/admin@123** and **user/12345**.
To enable/disable authentication set `$use_auth` to true or false.
+:information_source: Rename the `config-sample.php` file into `config.php` to use configuration, it is an additional configuration file, Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.
-### :loudspeaker: Features
+### :loudspeaker: Features
- :cd: Open Source, light and extremely simple
- :iphone: Mobile friendly view for touch devices
-- :information_source: Basic features likes Create, Delete, Modify, View, Quick Preview, Download, Copy and Move files
-- :arrow_double_up: Ajax Upload, Ability to drag & drop, upload from URL, multiple files upload with file extensions filter
+- :information_source: Basic features likes Create, Delete, Modify, View, Quick Preview, Download, Copy and Move files
+- :arrow_double_up: Ajax Upload, Ability to drag & drop, upload from URL, multiple files upload with 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
@@ -52,13 +53,12 @@ To enable/disable authentication set `$use_auth` to true or false.
- :pencil2: Cloud9 IDE - Syntax highlighting for over `150+` languages, Over `35+` themes with your favorite programming style
- :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 blacklist and whitelist
-- :mag_right: Search - Search and filter files using `datatable js`
+- :mag_right: Search - Search and filter files using `datatable js`
- :file_folder: Exclude folders and files from listing
- :globe_with_meridians: Multi-language(20+) support and for translations `translation.json` is file required
- :bangbang: lots more...
-
-### License, Credit
+### License, Credit
- Available under the [GNU license](https://github.com/prasathmani/tinyfilemanager/blob/master/LICENSE)
- Original concept and development by github.com/alexantr/filemanager
diff --git a/config.php b/config-sample.php
similarity index 94%
rename from config.php
rename to config-sample.php
index dc6c42c..abbdf8d 100644
--- a/config.php
+++ b/config-sample.php
@@ -2,7 +2,7 @@
/*
#################################################################################################################
-This is an OPTIONAL configuration file.
+This is an OPTIONAL configuration file. rename this file into config.php to use this configuration
The role of this file is to make updating of "tinyfilemanager.php" easier.
So you can:
-Feel free to remove completely this file and configure "tinyfilemanager.php" as a single file application.
@@ -76,8 +76,8 @@ $directories_users = array();
$iconv_input_encoding = 'UTF-8';
// date() format for file modification date
-// Doc - https://www.php.net/manual/en/function.date.php
-$datetime_format = 'd.m.y H:i';
+// Doc - https://www.php.net/manual/en/datetime.format.php
+$datetime_format = 'd.m.y H:i:s';
// Allowed file extensions for create and rename files
// e.g. 'txt,html,css,js'
@@ -90,11 +90,11 @@ $allowed_upload_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';
+$favicon_path = '';
// Files and folders to excluded from listing
// e.g. array('myfile.html', 'personal-folder', '*.php', ...)
-$exclude_items = array();
+$exclude_items = array('');
// Online office Docs Viewer
// Availabe rules are 'google', 'microsoft' or false
@@ -110,7 +110,7 @@ $sticky_navbar = true;
// max upload file size
-$max_upload_size_bytes = 2048;
+$max_upload_size_bytes = 5000;
// Possible rules are 'OFF', 'AND' or 'OR'
// OFF => Don't check connection IP, defaults to OFF
diff --git a/index.php b/index.php
index d2e967e..55a3b33 100644
--- a/index.php
+++ b/index.php
@@ -1,22 +1,22 @@
'$2y$10$Fg6Dz8oH9fPoZ2jJan5tZuv6Z4Kp7avtQ9bDfrdRntXtPeiMAZyGO' //12345
);
-//set application theme
-//options - 'light' and 'dark'
-$theme = 'light';
-
-// Readonly users
+// Readonly users
// e.g. array('users', 'guest', ...)
$readonly_users = array(
'user'
@@ -86,7 +82,7 @@ $allowed_upload_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';
+$favicon_path = '';
// Files and folders to excluded from listing
// e.g. array('myfile.html', 'personal-folder', '*.php', ...)
@@ -107,7 +103,7 @@ $sticky_navbar = true;
// Maximum file upload size
// Increase the following values in php.ini to work properly
// memory_limit, upload_max_filesize, post_max_size
-$max_upload_size_bytes = 2048;
+$max_upload_size_bytes = 5000;
// Possible rules are 'OFF', 'AND' or 'OR'
// OFF => Don't check connection IP, defaults to OFF
@@ -131,7 +127,7 @@ $ip_blacklist = array(
);
// if User has the customized config file, try to use it to override the default config above
-$config_file = './config.php';
+$config_file = __DIR__.'/config.php';
if (is_readable($config_file)) {
@include($config_file);
}
@@ -141,8 +137,6 @@ if (is_readable($config_file)) {
// max upload file size
define('MAX_UPLOAD_SIZE', $max_upload_size_bytes);
-define('FM_THEME', $theme);
-
// private key and session name to store to the session
if ( !defined( 'FM_SESSION_ID')) {
define('FM_SESSION_ID', 'filemanager');
@@ -166,6 +160,11 @@ $hide_Cols = isset($cfg->data['hide_Cols']) ? $cfg->data['hide_Cols'] : true;
// Show directory size: true or speedup output: false
$calc_folder = isset($cfg->data['calc_folder']) ? $cfg->data['calc_folder'] : true;
+// Theme
+$theme = isset($cfg->data['theme']) ? $cfg->data['theme'] : 'light';
+
+define('FM_THEME', $theme);
+
//available languages
$lang_list = array(
'en' => 'English'
@@ -236,11 +235,6 @@ if (isset($_GET['logout'])) {
fm_redirect(FM_SELF_URL);
}
-// Show image here
-if (isset($_GET['img'])) {
- fm_show_image($_GET['img']);
-}
-
// Validate connection IP
if($ip_ruleset != 'OFF'){
$clientIp = $_SERVER['REMOTE_ADDR'];
@@ -265,7 +259,7 @@ if($ip_ruleset != 'OFF'){
trigger_error('User connection denied from: ' . $clientIp, E_USER_WARNING);
if($ip_silent == false){
- fm_set_msg('Access denied. IP restriction applicable', 'error');
+ fm_set_msg(lng('Access denied. IP restriction applicable'), 'error');
fm_show_header_login();
fm_show_message();
}
@@ -366,7 +360,7 @@ if ($use_auth && isset($_SESSION[FM_SESSION_ID]['logged'])) {
$root_path = rtrim($root_path, '\\/');
$root_path = str_replace('\\', '/', $root_path);
if (!@is_dir($root_path)) {
- echo "