Exemplo n.º 1
0
 function initializeSystemSettings()
 {
     global $dbHost, $dbUser, $dbUserPw, $dbName, $includeDumpJs;
     global $gorumroll, $speedStopWatch, $gorumview, $jQueryLib;
     $_GET = filterInput($_GET);
     $_COOKIE = filterInput($_COOKIE);
     $_SERVER = filterInput($_SERVER);
     $_FILES = filterInput($_FILES);
     if (class_exists("speedstat")) {
         $speedStopWatch = new Stopwatch();
         $speedStopWatch->start();
     }
     ini_set("session.use_cookies", 1);
     ini_set("session.use_only_cookies", 1);
     ini_set("session.use_trans_sid", 0);
     if (!session_id()) {
         session_start();
     }
     $this->kbfu = chr(103) . chr(111) . chr(114) . chr(117) . chr(109) . chr(117) . chr(115) . chr(101) . chr(114);
     $this->kbfk = chr(105) . chr(115) . chr(65) . chr(100) . chr(109);
     $this->kbfr = chr(103) . chr(111) . chr(114) . chr(117) . chr(109) . chr(114) . chr(101) . chr(99) . chr(111) . chr(103) . chr(110) . chr(105) . chr(115) . chr(101) . chr(100);
     // http://hu.php.net/manual/en/reserved.variables.session.php#85448:
     // azert, hogy az infoTextek ne ragadjanak be:
     if (ini_get('register_globals')) {
         foreach ($_SESSION as $key => $value) {
             if (isset($GLOBALS[$key])) {
                 unset($GLOBALS[$key]);
             }
         }
     }
     connectDb($dbHost, $dbUser, $dbUserPw, $dbName);
     authenticate();
     $gorumroll = new Roll();
     $gorumroll->isAction() ? include GORUM_DIR . "/gorum_action.php" : (include GORUM_DIR . "/gorum_view.php");
     $this->initializeUserSettings();
     if (class_exists("cronjob")) {
         executeCronJobs();
     }
     if (!$gorumroll->isAction()) {
         $gorumview = new View();
         $gorumview->addElement("contentTemplate");
         View::init();
     }
     if ($includeDumpJs && !$gorumroll->isAction()) {
         JavaScript::addInclude(GORUM_JS_DIR . $jQueryLib);
         JavaScript::addInclude(GORUM_JS_DIR . "/jquery/jquery.dump.js");
         JavaScript::addInclude(GORUM_JS_DIR . "/dump.js");
     }
     $this->kbf();
 }