source: branches/rsr.v5.1.1/web/punbb/include/dblayer/common_db.php @ 8

Last change on this file since 8 was 4, checked in by dj3c1t, 13 years ago

passage en v5.1.1

File size: 1.1 KB
RevLine 
[1]1<?php
2
[3]3/**
4 * Copyright (C) 2008-2011 FluxBB
5 * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
6 * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
7 */
[1]8
9// Make sure no one attempts to run this script "directly"
10if (!defined('PUN'))
11        exit;
12
13
14// Load the appropriate DB layer class
15switch ($db_type)
16{
17        case 'mysql':
[3]18                require_once PUN_ROOT.'include/dblayer/mysql.php';
[1]19                break;
20
[3]21        case 'mysql_innodb':
22                require_once PUN_ROOT.'include/dblayer/mysql_innodb.php';
23                break;
24
[1]25        case 'mysqli':
[3]26                require_once PUN_ROOT.'include/dblayer/mysqli.php';
[1]27                break;
28
[3]29        case 'mysqli_innodb':
30                require_once PUN_ROOT.'include/dblayer/mysqli_innodb.php';
31                break;
32
[1]33        case 'pgsql':
[3]34                require_once PUN_ROOT.'include/dblayer/pgsql.php';
[1]35                break;
36
37        case 'sqlite':
[3]38                require_once PUN_ROOT.'include/dblayer/sqlite.php';
[1]39                break;
40
41        default:
[3]42                error('\''.$db_type.'\' is not a valid database type. Please check settings in config.php.', __FILE__, __LINE__);
[1]43                break;
44}
45
46
47// Create the database adapter object (and open/connect to/select db)
48$db = new DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect);
Note: See TracBrowser for help on using the repository browser.