deb14800d18aab880d6e5e723af75c21f7fdb305
[lhc/web/www.git] / www / ecrire / install / etape_ldap1.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2017 *
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')) {
14 return;
15 }
16
17 // http://code.spip.net/@install_etape_ldap1_dist
18 function install_etape_ldap1_dist() {
19 $adresse_ldap = defined('_INSTALL_HOST_LDAP')
20 ? _INSTALL_HOST_LDAP
21 : 'localhost';
22
23 $port_ldap = defined('_INSTALL_PORT_LDAP')
24 ? _INSTALL_PORT_LDAP
25 : 389;
26
27 $tls_ldap = defined('_INSTALL_TLS_LDAP')
28 ? _INSTALL_TLS_LDAP
29 : 'non';
30
31 $protocole_ldap = defined('_INSTALL_PROTOCOLE_LDAP')
32 ? _INSTALL_PROTOCOLE_LDAP
33 : 3; // on essaie 2 en cas d'echec
34
35 $login_ldap = defined('_INSTALL_USER_LDAP')
36 ? _INSTALL_USER_LDAP
37 : '';
38
39 $pass_ldap = defined('_INSTALL_PASS_LDAP')
40 ? _INSTALL_PASS_LDAP
41 : '';
42
43 echo install_debut_html('AUTO', ' onload="document.getElementById(\'suivant\').focus();return false;"');
44
45 echo info_etape(
46 _T('titre_connexion_ldap'),
47 info_progression_etape(1, 'etape_ldap', 'install/'),
48 _T('entree_informations_connexion_ldap')
49 );
50
51 echo generer_form_ecrire('install', (
52 "\n<input type='hidden' name='etape' value='ldap2' />"
53 . fieldset(
54 _T('entree_adresse_annuaire'),
55 array(
56 'adresse_ldap' => array(
57 'label' => _T('texte_adresse_annuaire_1'),
58 'valeur' => $adresse_ldap
59 ),
60 'port_ldap' => array(
61 'label' => _T('entree_port_annuaire') . '<br />' . _T('texte_port_annuaire'),
62 'valeur' => $port_ldap
63 ),
64 'tls_ldap' => array(
65 'label' => '<b>' . _T('tls_ldap') . '</b>',
66 'valeur' => $tls_ldap,
67 'alternatives' => array(
68 'non' => _T('item_non'),
69 'oui' => _T('item_oui')
70 )
71 ),
72 'protocole_ldap' => array(
73 'label' => _T('protocole_ldap'),
74 'valeur' => $protocole_ldap,
75 'alternatives' => array(
76 '3' => '3',
77 '2' => '2'
78 )
79 )
80 )
81 )
82
83 . "\n<p>" . _T('texte_acces_ldap_anonyme_1') . '</p>'
84 . fieldset(
85 _T('connexion_ldap'),
86 array(
87 'login_ldap' => array(
88 'label' => _T('texte_login_ldap_1'),
89 'valeur' => $login_ldap
90 ),
91 'pass_ldap' => array(
92 'label' => _T('entree_passe_ldap'),
93 'valeur' => $pass_ldap
94 )
95 )
96 )
97 . bouton_suivant()));
98
99 echo install_fin_html();
100 }