ha ok je vois...
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v2.0.0 PF 1
| =============================================
| by Matthew Mecham
| © 2001 - 2004 Invision Power Services, Inc.
|
http://www.invisionpower.com
| =============================================
| Web:
http://www.invisionboard.com
| Time: Thu, 22 Jul 2004 16:46:06 GMT
| Release: 49508f42c0d568d028dd08ecd2c2c488
| Licence Info:
http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > mySQL DB abstraction module
| > Module written by Matt Mecham
| > Date started: 14th February 2002
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
class db_driver {
var $obj = array ( "sql_database" => "esfsggk" ,
"sql_user" => "esfsggk" ,
"sql_pass" => "" ,
"sql_host" => "mysqlbox",
"sql_port" => "" ,
"persistent" => "0" ,
"sql_tbl_prefix" => "ibf_" ,
"cached_queries" => array() ,
'shutdown_queries' => array() ,
'debug' => 0 ,
'use_shutdown' => 1 ,
'query_cache_file' => '' ,
);
var $query_id = "";
var $connection_id = "";
var $query_count = 0;
var $record_row = array();
var $return_die = 0;
var $error = "";
var $failed = 0;
var $sql = "";
var $cur_query = "";
var $manual_addslashes = 0;
var $is_shutdown = 0;
var $loaded_classes = array();
var $prefix_changed = 0;
function db_driver()
{
}
/*========================================================================*/
// Connect to the database
/*========================================================================*/
function connect()
{
//--------------------------
// If debug, no shutdown....
//--------------------------
if ( $this->obj['debug'] )
{
$this->obj['use_shutdown'] = 0;
}
//--------------------------
// Done SQL prefix yet?
//--------------------------
if ( ! defined( 'SQL_PREFIX' ) )
{
$this->obj['sql_tbl_prefix'] = $this->obj['sql_tbl_prefix'] ? $this->obj['sql_tbl_prefix'] : 'ibf_';
define( 'SQL_PREFIX', $this->obj['sql_tbl_prefix'] );
}
//--------------------------
// Load query file
//--------------------------
if ( $this->obj['query_cache_file'] )
{
require_once( $this->obj['query_cache_file'] );
$this->sql = new sql_queries( &$this );
}
//--------------------------
// Connect
//--------------------------
if ($this->obj['persistent'])
{
$this->connection_id = mysql_pconnect( $this->obj['mysqlbox'] ,
$this->obj['esfsggk'] ,
$this->obj['']
);
}
else
{
$this->connection_id = mysql_connect( $this->obj['mysqlbox'] ,
$this->obj['esfsggk'] ,
$this->obj['']
);
}
if ( ! $this->connection_id )
{
$this->fatal_error();
return FALSE;
}
if ( ! mysql_select_db($this->obj['esfsggk'], $this->connection_id) )
{
$this->fatal_error();
return FALSE;
}
return TRUE;
}
/*========================================================================*/
// Load extra query cache file
/*========================================================================*/
function load_cache_file( $filepath, $classname='sql_extra_queries' )
{
if ( ! file_exists( $filepath ) )
{
print "Cannot locate $filepath - exiting!";
exit();
}
else
{
require_once( $filepat