From be1288ac60d7d0a93c1c60c32d078d7c4bdc84aa Mon Sep 17 00:00:00 2001 From: Alessandro Marinuzzi Date: Mon, 6 Nov 2017 12:48:05 +0100 Subject: [PATCH 1/2] Update tinyfilemanager.php This change solves several bug: 1) FM_EDIT_FILE constant not defined, I added to solve this line: define('FM_EDIT_FILE', $edit_files); 2) Html Validation issue: acion="" cannot be empty. I replaced all action="" with: action="" 3) Login Form contains a lot of HTML + PHP + JS not used and then produces php notice. I solved adding two news header and footer login which are basic HTML + CSS fm_show_header_login(); and fm_show_footer_login(); This solves several issue due to unused HTML + PHP + JS elements. --- tinyfilemanager.php | 61 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index faebe30..b056874 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -3,6 +3,7 @@ * H3K | Tiny File Manager * CCP Programmers * http://fb.com/ccpprogrammers + * https://github.com/prasathmani/tinyfilemanager */ // Default language @@ -141,19 +142,19 @@ if ($use_auth) { } else { // Form unset($_SESSION['logged']); - fm_show_header(); + fm_show_header_login(); fm_show_message(); ?>
H3K File manager -
+

Uploading files

Destination folder:

-
+
@@ -713,7 +715,7 @@ if (isset($_POST['copy']) && !FM_READONLY) { ?>

Copying

- +

- + @@ -1108,7 +1110,7 @@ $num_files = count($files); $num_folders = count($folders); $all_files_size = 0; ?> - +
@@ -1966,6 +1968,50 @@ function fm_show_message() } } +/** + * Show page header in Login Form + */ +function fm_show_header_login() +{ + $sprites_ver = '20160315'; + header("Content-Type: text/html; charset=utf-8"); + 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; + ?> + + + + +H3K | File Manager + + + + + + + +
+ + +
+ + + From 287146d8afaba460ca0c131d966fc724cda840aa Mon Sep 17 00:00:00 2001 From: Alessandro Marinuzzi Date: Mon, 6 Nov 2017 13:37:45 +0100 Subject: [PATCH 2/2] Update tinyfilemanager.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed issue concerning deleting files... Errore: Bad value “return confirm('Delete file?'');” for attribute “onclick” on element “a”: unterminated string literal I changed with: “return confirm('Delete file?');” --- tinyfilemanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index b056874..7a2b316 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -1193,7 +1193,7 @@ foreach ($files as $f) { - +