} if (isset($GLOBALS['folderAccess'][$GLOBALS['currentMainFolder']])) { define('_START_FOLDER', $GLOBALS['folderAccess'][$GLOBALS['currentMainFolder']]); } else { die("No such folder found!"); } define('_ROOTFOLDERID', (int) $GLOBALS['currentMainFolder']); // Prepaired for further versions of Profiles define("_FM_USE_FTP", false); $mimeTypes = MFile::parseData(_FM_HOME_DIR . DS . "data" . DS . "suffix.ini", true, false); $GLOBALS['mimeTypes'] = $mimeTypes; //Task $task = trim(MRequest::cmd('task')); $GLOBALS['task'] = $task; //View $view = trim(MRequest::cmd('view', 'default')); $GLOBALS['view'] = $view; //Check if this is a first time call if (!MFile::is(_FM_HOME_DIR . DS . "data" . DS . "diagnostic_log.php")) { $view = 'diagnostics'; $GLOBALS['view'] = $view; } //Check root only views $rootOnlyViews = array("rootsandrights", "config", "diagnostics"); if (in_array($view, $rootOnlyViews) && !MRights::userIsRoot() && !_FM_IS_DEMO) { ob_start(); include "templates" . DS . "noaccess.php"; $dieOut = ob_get_clean(); ob_get_clean(); die($dieOut); }