if (isset($urlArray[0])) { $action = $urlArray[0]; array_shift($urlArray); $queryString = $urlArray; } else { $action = 'index'; // Default Action } } $controllerName = ucfirst($controller) . 'Controller'; $dispatch = new $controllerName($controller, $action); //echo $controller . ' is the controller, ' . $action . ' is the action, '; //print_r($queryString); //echo ' is the query string'; if ((int) method_exists($controllerName, $action)) { call_user_func(array($dispatch, $action), $queryString); } else { /* The controller does not have the action specified */ /* Here we decouple controller and action and look up the URL in the routing table */ /* look up the url in the routing table */ /* if it exists, use the controller and action specified */ } } $url = $_GET['url']; //echo 'url is ' . $url; $inflect =& new Inflection(); $cache =& new Cache(); SetReporting(); RemoveMagicQuotes(); UnregisterGlobals(); DetermineRequest();
function InitPhpLogCon() { // Needed to make global global $gl_root_path, $content, $CFG; // Abort if already defined if (defined('PHPLOGCON_INITIALIZED')) { return; } // Init Basics which do not need a database InitBasicPhpLogCon(); // Will init the config file! InitPhpLogConConfigFile(); // Init UserDB related stuff! InitUserSystemPhpLogCon(); // Establish DB Connection if (GetConfigSetting("UserDBEnabled", false)) { DB_Connect(); } // Now load the Page configuration values InitConfigurationValues(); // Moved here, because we do not need if GZIP needs to be enabled before the config is loaded! InitRuntimeInformations(); // Now Create Themes List because we haven't the config before! CreateThemesList(); // Create Language List CreateLanguageList(); // Init Predefined Searches List CreatePredefinedSearches(); // Init predefined paging sizes CreatePagesizesList(); // Init predefined reload times CreateReloadTimesList(); // Init predefined reload times CreateExportFormatList(); // --- Enable PHP Debug Mode InitPhpDebugMode(); // --- // --- Init Allowed directories for DiskSources InitDiskAllowedSources(); // --- // --- Check and Remove Magic Quotes! RemoveMagicQuotes(); // --- // Finally defined PHPLOGCON_INITIALIZED! define('PHPLOGCON_INITIALIZED', TRUE); }