<?php
/**
 * $Source: /home/cvs/nukescripts/kernel/db/db.php,v $
 * $Revision: 1.0.0a-2 $
 * $Author: cyril $
 * $Date: 2007/04/05 10:03:21 $
 *
 */

/***************************************************************************
 *                                 db.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   Id: db.php,v 1.10 2002/03/18 13:35:22 psotfx Exp
 *
 *   This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
 *   by Tom Nitzschner (tom@toms-home.com)
 *   http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
 *
 *   As always, make a backup before messing with anything. All code
 *   release by me is considered sample code only. It may be fully
 *   functual, but you use it at your own risk, if you break it,
 *   you get to fix it too. No waranty is given or implied.
 *
 *   Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
 *   then on my site. All original header code and copyright messages will be maintained
 *   to give credit where credit is due. If you modify this, the only requirement is
 *   that you also maintain all original copyright messages. All my work is released
 *   under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
 *
 ***************************************************************************/
defined('MAXIMUS') or die ('Access denied db MAXIMUS directly...');

switch($dbtype) {

	case 'MySQL':
        file_exists("".INCLUDE_PATH.'kernel/db/mysql.php') OR die("Code ".__LINE__." ter : Désolé. Un incident majeur empêche l'affichage de ce site");
        include("".INCLUDE_PATH."kernel/db/mysql.php");
	break;

	case 'mysql4':
        file_exists("".INCLUDE_PATH.'kernel/db/mysql4.php') OR die("Code ".__LINE__." ter : Désolé. Un incident majeur empêche l'affichage de ce site");
	include("".INCLUDE_PATH."/kernel/db/mysql4.php");
	break;

}

$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
    die("<br /><br /><center><img src='images/logo.gif' alt='' /><br /><br />Connexion impossible actuellement à la base de données,<br />veuillez repasser ultérieurement.<br /><br /><br />Connessione al database attualmente impossibile,<br /> prova a ripassare più tardi.<br /><br /><br /><b>There seems to be a problem with the MySQL server, sorry for the inconvenience.<br /><br />We should be back shortly.</center></b>");
}