diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 6b4d34b..8feaff4 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -11,6 +11,13 @@ $CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false}'; //TFM version define('VERSION', '2.3.5'); +// Page Title. Leave blank for default. +$page_title = ''; + +// Favicon path. This can be either a full url to an image, or +// a path based on the document root. leave blank for default. +$favicon_path = ''; + // Auth with login/password (set true/false to enable/disable it) $use_auth = true; @@ -258,6 +265,24 @@ if (!@is_dir($root_path)) { exit; } +// clean and check faviocn path +if(!empty($favicon_path)) { + $favicon_path = trim($favicon_path); + if(strtolower(substr($favicon_path, 0, 4)) !== 'http') { + $favicon_path = trim($favicon_path, '\\/'); + $favicon_path = $root_url . '/' . $favicon_url; + } +} else { + $favicon_path = $root_url . '?img=favicon'; +} + +// Clean page title +if(!empty($page_title)) { + $page_title = trim($page_title); +} else { + $page_title = 'H3K | Tiny File Manager'; +} + defined('FM_SHOW_HIDDEN') || define('FM_SHOW_HIDDEN', $show_hidden_files); defined('FM_ROOT_PATH') || define('FM_ROOT_PATH', $root_path); defined('FM_LANG') || define('FM_LANG', $lang); @@ -2818,7 +2843,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, $page_title; ?> @@ -2829,8 +2854,8 @@ global $lang, $root_url; - - H3K | Tiny File Manager + + <?php echo $page_title ?>