<?php
/*=======================================================================
 *
 * dbconnect.inc.php
 *
 * Autor: Marc Vollmann
 *
 =======================================================================*/


include_once ("../../include/glob_defs.inc.php");

/**
 * Zuweisung zur Variable $dsn je nach benutzter Datenquelle aus-/kommentieren
 */

if ($phpVersion >= "5.1") :
   date_default_timezone_set('Europe/Berlin');
endif;

include_once ("../../lib/inc_lib_db.inc.php");

$dbCreds = array("dbHost" => $dbhostOnly, "dbUser" => $dblogin, "dbPassword" => $dbpassword, "dbName" => $dbname, "dbPort" => $dbport, "dbTable" => "user");

$db = new DB($dbCreds);

$db->dbQ('SET NAMES latin1');
$db->dbQ('SET @@SESSION.old_passwords=0');



$db2 = $db;

// Wrapper for deprecated DB functions
if ($phpVersion >= "7.0") :
   function mysql_escape_string($string) { global $db; return $db->escape($string); };
endif;

?>
