\n"; if (($db_connect=="0") && $link) { echo "
"._T('info_connexion_ok')."
"; echo info_progression_etape(2,'etape_','install/'); echo info_etape(_T('menu_aide_installation_choix_base').aide ("install2", true)); spip_connect_db($adresse_db, 0, $login_db, $pass_db, '',$server_db); echo "\n", '' ; list($checked, $res) = install_etape_2_bases($login_db, $server_db); $hidden = (defined('_SPIP_CHMOD') ? '' : ("\n")) . predef_ou_cache($adresse_db,$login_db,$pass_db, $server_db); echo install_etape_2_form($hidden, $checked, $res, 3); } else { echo info_progression_etape(1,'etape_','install/',true); echo "
"; echo info_etape(_T('info_connexion_base')); echo "

" . _T('avis_connexion_echec_1') . "

"; echo "

"._T('avis_connexion_echec_2')."

"; echo "

", _T('avis_connexion_echec_3'), "

"; } echo install_fin_html(); } // Liste les bases accessibles, // avec une heuristique pour preselectionner la plus probable // http://doc.spip.org/@install_etape_2_bases function install_etape_2_bases($login_db, $server_db) { $res = install_etape_liste_bases($server_db, $login_db); if ($res) { list($checked, $bases) = $res; return array($checked, "" . "

" . _T('info_ou') . " " ); } $res = ""._T('avis_lecture_noms_bases_1')." "._T('avis_lecture_noms_bases_2')."

"; if ($login_db) { // Si un login comporte un point, le nom de la base est plus // probablement le login sans le point -- testons pour savoir $test_base = $login_db; $ok = sql_selectdb($test_base, $server_db); $test_base2 = str_replace('.', '_', $test_base); if (sql_selectdb($test_base2, $server_db)) { $test_base = $test_base2; $ok = true; } if ($ok) { $res .= _T('avis_lecture_noms_bases_3') . "

" . "

"._T('info_ou')." "; $checked = true; } } return array($checked, $res); } // http://doc.spip.org/@install_etape_2_form function install_etape_2_form($hidden, $checked, $res, $etape) { return generer_form_ecrire('install', ( "\n" . $hidden . (defined('_INSTALL_NAME_DB') ? '

'._T('install_nom_base_hebergeur'). ' '._INSTALL_NAME_DB.''.'

' : "\n
"._T('texte_choix_base_1')."\n" . $res . "\n\n

\n

" . "\n

\n" ) . ((defined('_INSTALL_TABLE_PREFIX') OR $GLOBALS['table_prefix'] != 'spip') ? '

'._T('install_table_prefix_hebergeur').' '.$GLOBALS['table_prefix'].''.'

' : "
"._T('texte_choix_table_prefix')."\n" . "

" . "\n

" ) . bouton_suivant())); } ?>