*/ /** * Contains variables for facileManager * * @package facileManager * */ setTimezone(); /** * The facileManager name string * * @global string $fm_name */ $fm_name = 'facileManager'; /** Set global variables */ $GLOBALS['REQUEST_PROTOCOL'] = isSiteSecure() ? 'https' : 'http'; $GLOBALS['FM_URL'] = $GLOBALS['REQUEST_PROTOCOL'] . '://' . $_SERVER['HTTP_HOST'] . $GLOBALS['RELPATH']; if (!@is_array($__FM_CONFIG)) { $__FM_CONFIG = array(); } /** Images */ $__FM_CONFIG['icons']['fail'] = sprintf('<img src="fm-modules/%1$s/images/error24.png" border="0" alt="%2$s" title="%2$s" />', $fm_name, _('Failed')); $__FM_CONFIG['icons']['caution'] = sprintf('<img src="fm-modules/%1$s/images/orangequestion.jpg" border="0" alt="%2$s" title="%2$s" width="20" />', $fm_name, _('Caution')); $__FM_CONFIG['icons']['ok'] = sprintf('<img src="fm-modules/%1$s/images/ok24.png" border="0" alt="%2$s" title="%2$s" />', $fm_name, _('OK')); $__FM_CONFIG['icons']['add'] = sprintf('<img src="fm-modules/%1$s/images/plus16.png" border="0" alt="_TITLE_" title="_TITLE_" />', $fm_name); $__FM_CONFIG['icons']['edit'] = sprintf('<img src="fm-modules/%1$s/images/edit24.png" border="0" alt="%2$s" title="%2$s" width="20" />', $fm_name, _('Edit')); $__FM_CONFIG['icons']['delete'] = sprintf('<img src="fm-modules/%1$s/images/delete24.png" border="0" alt="%2$s" title="%2$s" width="20" />', $fm_name, _('Delete')); $__FM_CONFIG['icons']['copy'] = sprintf('<img src="fm-modules/%1$s/images/copy24.png" border="0" alt="%2$s" title="%2$s" width="20" />', $fm_name, _('Duplicate')); $__FM_CONFIG['icons']['enable'] = sprintf('<img src="fm-modules/%1$s/images/enable24.png" border="0" alt="%2$s" title="%2$s" width="20" />', $fm_name, _('Enable')); $__FM_CONFIG['icons']['disable'] = sprintf('<img src="fm-modules/%1$s/images/disable24.png" border="0" alt="%2$s" title="%2$s" width="20" />', $fm_name, _('Disable')); $__FM_CONFIG['icons']['popout'] = sprintf('<img src="fm-modules/%1$s/images/popout24.png" border="0" alt="%2$s" title="%2$s" width="20" class="popout" />', $fm_name, _('Popout'));
require_once ABSPATH . 'fm-modules/facileManager/functions.php'; } elseif (!function_exists('functionalCheck') || !is_array($__FM_CONFIG['db'])) { /** A config file is empty */ header('Location: ' . $GLOBALS['RELPATH'] . 'fm-install.php'); } /** Load language */ include_once ABSPATH . 'fm-includes/i18n.php'; $GLOBALS['URI'] = convertURIToArray(); $GLOBALS['basename'] = $path_parts['filename'] && $path_parts['filename'] != str_replace('/', '', $GLOBALS['RELPATH']) && substr($_SERVER['REQUEST_URI'], -1) != '/' ? $path_parts['filename'] . '.php' : 'index.php'; if (!defined('INSTALL') && !defined('CLIENT') && !defined('FM_NO_CHECKS')) { require_once ABSPATH . 'fm-includes/fm-db.php'; /** Handle special cases with config.inc.php */ handleHiddenFlags(); /** Enforce SSL if applicable */ if (getOption('fm_db_version') >= 23 && getOption('enforce_ssl')) { if (!isSiteSecure()) { $fm_port_ssl = getOption('fm_port_ssl') ? getOption('fm_port_ssl') : 443; header('Location: https://' . $_SERVER['HTTP_HOST'] . ':' . $fm_port_ssl . $_SERVER['REQUEST_URI']); } } require_once ABSPATH . 'fm-modules/facileManager/classes/class_logins.php'; if (!$fm_login->isLoggedIn()) { require_once ABSPATH . 'fm-includes/init.php'; checkAppVersions(); } /** Do the logout */ if (isset($_GET) && array_key_exists('logout', $_GET)) { $fm_login->logout(); header('Location: ' . $GLOBALS['RELPATH']); } /** Process password resets */