/** * reads config file */ function parseConfig() { require_once 'Config/Config.php'; $blocks = array(); $data = array(); $conf = new Config('IniFile'); $conf->parseInput('rubbercity.ini'); $blocks = $conf->getBlocks("/"); foreach ($blocks as $block) { $cfg[$block] = $conf->getValues("/" . $block); } $this->cfg = $cfg; }
* logs errors to a file */ function catchError(&$obj) { $str .= "<b>Error code</b>: " . $obj->code . "<br>\n"; $str .= "<b>Error message</b>: " . $obj->message . "<br>\n"; $str .= "<b>Debug string</b>: " . $obj->userinfo . "<br>\n\n"; echo $str; } /* * reads config file */ $blocks = array(); $data = array(); $conf = new Config('IniFile'); $conf->parseInput('rubbercity.ini'); $blocks = $conf->getBlocks("/"); foreach ($blocks as $block) { $cfg[$block] = $conf->getValues("/" . $block); } /* * Sets the language according to browser settings */ $langSupported = array("de" => true, "en" => true); define("LC_LANG", HTTP::negotiateLanguage($langSupported, 'en')); $langSelected = 'rc_' . LC_LANG; include_once $cfg['path']['i18n'] . LC_LANG . ".php"; $lang = new $langSelected(); $heute = date("Ymd", time()); // current date /*