forked from halo-battle/game
Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
28
onyx2/modules/db/main.php
Normal file
28
onyx2/modules/db/main.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
if(!defined('ONYX')) exit;
|
||||
|
||||
switch($OPT['type'])
|
||||
{
|
||||
case 'mysql':
|
||||
case 'postgresql':
|
||||
|
||||
$api = array('mysql' => 'mysql_connect', 'postgresql' => 'pg_connect');
|
||||
if(!function_exists($api[$OPT['type']])) trigger_error('API introuvable',E_USER_ERROR);
|
||||
unset($api);
|
||||
|
||||
function dbpass($crypt,$cle)
|
||||
{
|
||||
return cxor(base64_decode($crypt),md5($cle,TRUE));
|
||||
}
|
||||
|
||||
$db_config = $OPT;
|
||||
|
||||
require_once($OPT['type'].'.class.php');
|
||||
define('DB_TYPE',$OPT['type']);
|
||||
break;
|
||||
|
||||
default: trigger_error('Base de donnee inconnue',E_USER_ERROR);
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue