[ Index ] |
|
Code source de SPIP 1.9.2c |
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2007 * 7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * 8 * * 9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * 10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * 11 \***************************************************************************/ 12 13 // http://doc.spip.org/@inc_install_1 14 function install_etape_1_dist() 15 { 16 global $spip_lang_right; 17 18 echo install_debut_html(); 19 20 // stopper en cas de grosse incompatibilite de l'hebergement 21 tester_compatibilite_hebergement(); 22 23 echo info_etape(_T('info_connexion_mysql'), _T('texte_connexion_mysql').aide ("install1")); 24 25 list($adresse_db, $login_db) = login_hebergeur(); 26 $pass_db = ''; 27 28 $chmod = (isset($_GET['chmod']) AND preg_match(',^[0-9]+$,', $_GET['chmod']))? sprintf('%04o', $_GET['chmod']):'0777'; 29 // Recuperer les anciennes donnees pour plus de facilite (si presentes) 30 if (@file_exists(_FILE_CONNECT_INS . _FILE_TMP . '.php')) { 31 $s = @join('', @file(_FILE_CONNECT_INS . _FILE_TMP . '.php')); 32 if (ereg("mysql_connect\([\"'](.*)[\"'],[\"'](.*)[\"'],[\"'](.*)[\"']\)", $s, $regs)) { 33 $adresse_db = $regs[1]; 34 $login_db = $regs[2]; 35 } 36 else if (ereg("spip_connect_db\('(.*)','(.*)','(.*)','(.*)','(.*)'\)", $s, $regs)) { 37 $adresse_db = $regs[1]; 38 if ($port_db = $regs[2]) $adresse_db .= ':'.$port_db; 39 $login_db = $regs[3]; 40 } 41 } 42 if(@file_exists(_FILE_CHMOD_INS . _FILE_TMP . '.php')){ 43 $s = @join('', @file(_FILE_CHMOD_INS . _FILE_TMP . '.php')); 44 if(ereg("define\('_SPIP_CHMOD', (.*)\)", $s, $regs)) { 45 $chmod = $regs[1]; 46 } 47 } 48 echo generer_url_post_ecrire('install'); 49 echo "<input type='hidden' name='etape' value='2' />"; 50 echo "<input type='hidden' name='chmod' value='$chmod' />"; 51 echo fieldset(_T('entree_base_donnee_1'), 52 array( 53 'adresse_db' => array( 54 'label' => _T('entree_base_donnee_2'), 55 'valeur' => $adresse_db 56 ), 57 ) 58 ); 59 60 echo fieldset(_T('entree_login_connexion_1'), 61 array( 62 'login_db' => array( 63 'label' => _T('entree_login_connexion_2'), 64 'valeur' => $login_db 65 ), 66 ) 67 ); 68 69 echo fieldset(_T('entree_mot_passe_1'), 70 array( 71 'pass_db' => array( 72 'label' => _T('entree_mot_passe_2'), 73 'valeur' => $pass_db 74 ), 75 ) 76 ); 77 78 echo bouton_suivant(); 79 echo "</form>"; 80 81 echo install_fin_html(); 82 } 83 84 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 10:20:27 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |