<?php

/* FIRESHOP: Advanced Content Market System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2012 by Mohamad Porhaji                                */
/* http://Firedesign.ir                                                   */
/*                                                                      */
/* This program is free software.  */
/************************************************************************/
/* $Id: db.php,v 1.0.0.1 2012/02/18 By Mohamad Porhaji $ */

if (stristr($_SERVER['PHP_SELF'], "db.php")) {
    Header("Location: index.php");
    die();
}


    $the_include = "db";


switch($dbtype) {

	case 'MySQL':
		include("".$the_include."/mysql.php");
		break;

	case 'mysql4':
		include("".$the_include."/mysql4.php");
		break;

	case 'sqlite':
		include("".$the_include."/sqlite.php");
		break;

	case 'postgres':
		include("".$the_include."/postgres7.php");
		break;

	case 'mssql':
		include("".$the_include."/mssql.php");
		break;

	case 'oracle':
		include("".$the_include."/oracle.php");
		break;

	case 'msaccess':
		include("".$the_include."/msaccess.php");
		break;

	case 'mssql-odbc':
		include("".$the_include."/mssql-odbc.php");
		break;
	
	case 'db2':
		include("".$the_include."/db2.php");
		break;

}

$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
    die("<meta http-equiv='Content-Type' content='text/html; charset=utf-8'><br><br><center><img src=images/logo.gif border = 0><br><br><br><font face = 'tahoma' size = '2'>در حال حاضر مشکلي در ارتباط با تنظيمات بانک اطلاعاتي وجود دارد</center></b>");
}
?>
