Revision 9 | Revision 66 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?phprequire_once "Config.php";require_once "MDB2.php";require_once "smarty/libs/Smarty.class.php";require_once "classes/host.php";require_once "classes/service.php";require_once "classes/contact.php";$GLOBALS["ui"] = new Smarty();$cfg = new Config();$cfg = $cfg->parseConfig( "config.xml", "xml" );$cfg = $cfg->toArray();$GLOBALS["cfg"] = $cfg["root"]["config"];$opts = array("persistent" => true,"portability" => MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL ^MDB2_PORTABILITY_FIX_CASE,);$dsn = array("phptype" => "mysqli","username" => $GLOBALS["cfg"]["db"]["user"],"password" => $GLOBALS["cfg"]["db"]["pass"],"hostspec" => $GLOBALS["cfg"]["db"]["server"],"database" => $GLOBALS["cfg"]["db"]["db"],"new_link" => true,);$GLOBALS["db"] = MDB2::connect( $dsn, $opts );if ( PEAR::isError( $GLOBALS["db"] ) ){trigger_error( "Keine Verbindung zur Datenbank möglich!\n", E_USER_ERROR );}$GLOBALS["db"]->setfetchMode( MDB2_FETCHMODE_ASSOC );$GLOBALS["ui"]->assign( "cfg", $GLOBALS["cfg"] );?>