vars = $INFO; } } //-------------------------------- // Import $INFO, now! //-------------------------------- require ROOT_PATH."conf_global.php"; //-------------------------------- // Require our global functions //-------------------------------- require ROOT_PATH."sources/functions.php"; $std = new FUNC; //-------------------------------- // Load the DB driver and such //-------------------------------- $INFO['sql_driver'] = ! $INFO['sql_driver'] ? 'mysql' : strtolower($INFO['sql_driver']); //require ( KERNEL_PATH.'class_db_'.$INFO['sql_driver'].".php" ); require ( "sources/Drivers/mySQL.php" ); $DB = new db_driver; $DB->obj['sql_database'] = $INFO['sql_database']; $DB->obj['sql_user'] = $INFO['sql_user']; $DB->obj['sql_pass'] = $INFO['sql_pass']; $DB->obj['sql_host'] = $INFO['sql_host']; $DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; $DB->obj['query_cache_file'] = ROOT_PATH.'sources/sql/'.$INFO['sql_driver'].'_queries.php'; $DB->obj['use_shutdown'] = USE_SHUTDOWN; //----------------------------------- // Required vars? //----------------------------------- if ( is_array( $DB->connect_vars ) and count( $DB->connect_vars ) ) { foreach( $DB->connect_vars as $k => $v ) { $DB->connect_vars[ $k ] = $INFO[ $k ]; } } //-------------------------------- // Get a DB connection //-------------------------------- $DB->connect(); $DB->query("SET CHARACTER SET cp1251"); ?> Карта форума (Site map) <