echo "<INPUT type=\"hidden\" value=\"" . $lang . "\" name=\"lang\"><br>"; echo "<br>\n"; echo "<input type=\"submit\" value=\"OK\">\n"; echo "</form>\n"; } else { $is_dbconf_ok = write_db_config($dbserver, $dbuser, $dbpasswd, $dbdb); if ($is_dbconf_ok != true) { echo "le dossier " . CONFIG_PATH . " n'est pas accessible en écriture"; } else { echo _('db_configuration_ok'); echo "<br><a href=\"{$PHP_SELF}?session={$session}&lang={$lang}\"> continuez....</a><br>\n"; } } bottom(); } else { $installed_version = get_installed_version($DEBUG); if ($installed_version == 0) { install($lang, $DEBUG); } else { // on compare la version déclarée dans la database avec la version déclarée dans le fichier de config if ($installed_version != $config_php_conges_version) { // on attaque une mise a jour à partir de la version installée echo "<META HTTP-EQUIV=REFRESH CONTENT=\"0; URL=mise_a_jour.php?version={$installed_version}&lang={$lang}\">"; } else { // pas de mise a jour a faire : on propose les pages de config echo "<META HTTP-EQUIV=REFRESH CONTENT=\"0; URL=../config/\">"; } } } } /*****************************************************************************/
//disable warnings show_errors(); $real_db = $db_database; if ($db_type == 'sqlite') { $real_db = get_full_include_path($db_database); } if ($db_password == 'none') { $db_password = ''; } $c = dbi_connect($db_host, $db_login, $db_password, $real_db, false); //enable warnings show_errors(true); if ($c) { $_SESSION['db_success'] = true; // Do some queries to try to determine the previous version get_installed_version(); $response_msg = '<b>' . translate('Connection Successful') . '</b> ' . translate('Please go to next page to continue installation') . '.'; } else { $response_msg = $failure . dbi_error() . "</blockquote>\n"; // See if user is valid, but database doesn't exist // The normal call to dbi_connect simply return false for both conditions if ($db_type == 'mysql') { $c = mysql_connect($db_host, $db_login, $db_password); } else { if ($db_type == 'mssql') { $c = mssql_connect($db_host, $db_login, $db_password); } else { if ($db_type == 'postgresql') { $c = dbi_connect($db_host, $db_login, $db_password, 'template1', false); } else { if ($db_type == 'ibase') {