public static function getInstance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; }
} // Handle requests switch ($subject) { case 'ajax': if ($nefubId == 'search') { $search = urldecode($arguments[2]); $results = doSearch($search); echo json_encode($results); exit; } break; case 'retrieve.php': if (isset($_GET['retrieve'])) { $key = 1; if ($_GET['retrieve'] == $key) { $cronHandler = CronHandler::getInstance(); if (isset($_GET['gamesonly']) && $_GET['gamesonly'] == 1) { $cronHandler->runGames(); } elseif (isset($_GET['locationsonly']) && $_GET['locationsonly'] == 1) { $cronHandler->runLocations(); } else { $cronHandler->run(); } } else { echo "Ongeldige key: " . $_GET['retrieve']; exit; } } $oFrontRenderer->redirect(); break; case 'beheer':
Session::init(); // Set the locale from the user info else config, database, then default english locale if (User::identify()->loggedin && User::identify()->info->locale_lang) { Locale::set(User::identify()->info->locale_lang); } else { Locale::set(Config::get('locale', Options::get('locale', 'en-us'))); } if (Options::get('system_locale')) { Locale::set_system_locale(Options::get('system_locale')); } // Replace the $_COOKIE superglobal with an object representation SuperGlobal::process_c(); // Initiating request handling, tell the plugins. Plugins::act('init'); // Load Stack Items Stack::load_stackitems(); if (defined('SUPPRESS_REQUEST')) { return; } // Parse and handle the request. Controller::parse_request(); // Run the cron jobs asyncronously. CronHandler::run_cron(Config::get('cron_async', true)); // Dispatch the request (action) to the matched handler. Controller::dispatch_request(); // Shut down sessions so they can write and send cookies and headers before output, but after everything should be done Session::shutdown(); // Flush (send) the output buffer. $buffer = ob_get_clean(); $buffer = Plugins::filter('final_output', $buffer); echo $buffer;