<?

$dsn_cms = array(

    'phptype'  => $db_config_cms['db_type'],

    'username' => $db_config_cms['username'],

    'password' => $db_config_cms['password'],

    'hostspec' => $db_config_cms['server'],

    'database' => $db_config_cms['db'],

);



$dsn_pms = array(

    'phptype'  => $db_config_pms['db_type'],

    'username' => $db_config_pms['username'],

    'password' => $db_config_pms['password'],

    'hostspec' => $db_config_pms['server'],

    'database' => $db_config_pms['db'],

);



$options_cms = array(

    'debug'       => 2,

    'portability' => DB_PORTABILITY_ALL,

);



$options_pms = array(

    'debug'       => 2,

    'portability' => DB_PORTABILITY_ALL,

);



$db =& DB::connect($dsn_cms, $options_cms);

if (PEAR::isError($db)) {

	$e=error_n_goto("-1","CMS Database Not Found!");
	//phpinfo();
	//echo $e;
	//mysql_connect("localhost","zikay_calyph5",$db_config_cms['db']) or die(mysql_error());
	die($e);

}

$db->setFetchMode(DB_FETCHMODE_ASSOC);



$db_pms =& DB::connect($dsn_pms, $options_pms);



if (PEAR::isError($db_pms)) {

	$e=error_n_goto("-1","PMS Database Not Found!");

	echo $e;

	die();

}

$db_pms->setFetchMode(DB_FETCHMODE_ASSOC);

?>