dd61d3b66b
All checks were successful
continuous-integration/drone/push Build is passing
Corrige un doublons laissé par le rebase semi-manuel Ajout d'une étape de linting dans DroneCi Fix linting Co-authored-by: Nigel Sheldon <nigelsheldon@live.fr> Reviewed-on: https://gitea.nemunai.re/halo-battle/game/pulls/3
30 lines
788 B
PHP
30 lines
788 B
PHP
<?php
|
|
|
|
if (!defined('ONYX')) {
|
|
exit;
|
|
}
|
|
|
|
switch ($OPT['type']) {
|
|
case 'mysql':
|
|
case 'postgresql':
|
|
|
|
$api = array('mysql' => 'mysqli_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);
|
|
}
|