[SPIP] ~2.1.12 -->2.1.25
[velocampus/web/www.git] / www / ecrire / install / etape_1.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2014 *
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 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15 // http://doc.spip.org/@install_etape_1_dist
16 function install_etape_1_dist()
17 {
18 echo install_debut_html();
19
20 // stopper en cas de grosse incompatibilite de l'hebergement
21 tester_compatibilite_hebergement();
22
23 // Recuperer les anciennes donnees pour plus de facilite (si presentes)
24 $s = !@is_readable(_FILE_CONNECT_TMP) ? ''
25 : analyse_fichier_connection(_FILE_CONNECT_TMP);
26
27 list($adresse_db, $login_db) = $s ? $s : login_hebergeur();
28
29 $chmod = (isset($_GET['chmod']) AND preg_match(',^[0-9]+$,', $_GET['chmod']))? sprintf('%04o', $_GET['chmod']):'0777';
30
31 if(@is_readable(_FILE_CHMOD_TMP)){
32 $s = @join('', @file(_FILE_CHMOD_TMP));
33 if(preg_match("#define\('_SPIP_CHMOD', (.*)\)#", $s, $regs)) {
34 $chmod = $regs[1];
35 }
36 }
37
38
39
40 $db = array($adresse_db, _T('entree_base_donnee_2'));
41 $login = array($login_db, _T('entree_login_connexion_2'));
42 $pass = array($pass_db, _T('entree_mot_passe_2'));
43
44 $predef = array(defined('_INSTALL_SERVER_DB') ? _INSTALL_SERVER_DB:'',
45 defined('_INSTALL_HOST_DB'),
46 defined('_INSTALL_USER_DB'),
47 defined('_INSTALL_PASS_DB'));
48
49
50 echo info_progression_etape(1,'etape_','install/');
51
52 // ces deux chaines de langues doivent etre reecrites
53 # echo info_etape(_T('info_connexion_mysql'), _T('texte_connexion_mysql').aide ("install1"));
54 echo info_etape(_T('info_connexion_base_donnee'),
55 '<p>'
56 . _T('texte_connexion_mysql')
57 .'</p>'
58 );
59 echo install_connexion_form($db, $login, $pass, $predef, "\n<input type='hidden' name='chmod' value='$chmod' />", 2);
60 echo install_fin_html();
61 }
62
63
64 ?>