diff --git a/tinyfilemanager_09.30.2017.php b/tinyfilemanager_09.30.2017.php new file mode 100644 index 0000000..05b7ca3 --- /dev/null +++ b/tinyfilemanager_09.30.2017.php @@ -0,0 +1,2276 @@ + 'Password', 'Username2' => 'Password2', ...), Password has to encripted into MD5 +$auth_users = array( + 'admin' => '21232f297a57a5a743894a0e4a801fc3', //admin + 'user' => '827ccb0eea8a706c4c34a16891f84e7b', //12345 +); + +// Readonly users (usernames array) +$readonly_users = array( + 'user' +); + +// Show or hide files and folders that starts with a dot +$show_hidden_files = true; + +// Enable highlight.js (https://highlightjs.org/) on view's page +$use_highlightjs = true; + +// highlight.js style +$highlightjs_style = 'vs'; + +// Enable ace.js (https://ace.c9.io/) on view's page +$edit_files = true; + +// Send files though mail +$send_mail = false; + +// Send files though mail +$toMailId = ""; //yourmailid@mail.com + +// Default timezone for date() and time() - http://php.net/manual/en/timezones.php +$default_timezone = 'Asia/Kolkata'; // UTC+5:30 + +// Root path for file manager +$root_path = $_SERVER['DOCUMENT_ROOT']; + +// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' +// Will not working if $root_path will be outside of server document root +$root_url = ''; + +// Server hostname. Can set manually if wrong +$http_host = $_SERVER['HTTP_HOST']; + +// input encoding for iconv +$iconv_input_encoding = 'CP1251'; + +// date() format for file modification date +$datetime_format = 'd.m.y H:i'; + +//--- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL + +// if fm included +if (defined('FM_EMBED')) { + $use_auth = false; +} else { + @set_time_limit(600); + + date_default_timezone_set($default_timezone); + + ini_set('default_charset', 'UTF-8'); + if (version_compare(PHP_VERSION, '5.6.0', '<') && function_exists('mb_internal_encoding')) { + mb_internal_encoding('UTF-8'); + } + if (function_exists('mb_regex_encoding')) { + mb_regex_encoding('UTF-8'); + } + + session_cache_limiter(''); + session_name('filemanager'); + session_start(); +} + +if (empty($auth_users)) { + $use_auth = false; +} + +$is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) + || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'; + +// clean and check $root_path +$root_path = rtrim($root_path, '\\/'); +$root_path = str_replace('\\', '/', $root_path); +if (!@is_dir($root_path)) { + echo "
+
+ +
Copying
+ +""
+
+
+ = 1000): ?> ()
+
+
+ Files in archive:
+ Total size:
+ Size in archive:
+ Compression: %
+ ';
+ }
+ // 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') . '
';
+ }
+ ?>
+
+ + + + + + + + + + + + + +
+ '; + foreach ($filenames as $fn) { + if ($fn['folder']) { + echo '' . $fn['name'] . 'Error while fetching archive info
'; + } + } elseif ($is_image) { + // Image content + if (in_array($ext, array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico'))) { + echo ''; + } + } elseif ($is_audio) { + // Audio content + echo ''; + } elseif ($is_video) { + // Video content + echo ''; + } elseif ($is_text) { + if (FM_USE_HIGHLIGHTJS) { + // highlight + $hljs_classes = array( + 'shtml' => 'xml', + 'htaccess' => 'apache', + 'phtml' => 'php', + 'lock' => 'json', + 'svg' => 'xml', + ); + $hljs_class = isset($hljs_classes[$ext]) ? 'lang-' . $hljs_classes[$ext] : 'lang-' . $ext; + if (empty($ext) || in_array(strtolower($file), fm_get_text_names()) || preg_match('#\.min\.(css|js)$#i', $file)) { + $hljs_class = 'nohighlight'; + } + $content = '' . fm_enc($content) . '
';
+ } elseif (in_array($ext, array('php', 'php4', 'php5', 'phtml', 'phps'))) {
+ // php highlight
+ $content = highlight_string($content, true);
+ } else {
+ $content = '' . fm_enc($content) . ''; + } + echo $content; + } + ?> +
+
+
+