1 rizwank 1.1 <?php
2 /***************************************************************************
3 * db.php
4 * -------------------
5 * begin : Saturday, Feb 13, 2001
6 * copyright : (C) 2001 The phpBB Group
7 * email : support@phpbb.com
8 *
9 * $Id: db.php,v 1.10 2002/03/18 13:35:22 psotfx Exp $
10 *
11 *
12 ***************************************************************************/
13
14 /***************************************************************************
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 ***************************************************************************/
22 rizwank 1.1
23 if ( !defined('IN_PHPBB') )
24 {
25 die("Hacking attempt");
26 }
27
28 switch($dbms)
29 {
30 case 'mysql':
31 include($phpbb_root_path . 'db/mysql.'.$phpEx);
32 break;
33
34 case 'mysql4':
35 include($phpbb_root_path . 'db/mysql4.'.$phpEx);
36 break;
37
38 case 'postgres':
39 include($phpbb_root_path . 'db/postgres7.'.$phpEx);
40 break;
41
42 case 'mssql':
43 rizwank 1.1 include($phpbb_root_path . 'db/mssql.'.$phpEx);
44 break;
45
46 case 'oracle':
47 include($phpbb_root_path . 'db/oracle.'.$phpEx);
48 break;
49
50 case 'msaccess':
51 include($phpbb_root_path . 'db/msaccess.'.$phpEx);
52 break;
53
54 case 'mssql-odbc':
55 include($phpbb_root_path . 'db/mssql-odbc.'.$phpEx);
56 break;
57 }
58
59 // Make the database connection.
60 $db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
61 if(!$db->db_connect_id)
62 {
63 message_die(CRITICAL_ERROR, "Could not connect to the database");
64 rizwank 1.1 }
65
66 ?>
|