[SPIP] +2.1.12
[velocampus/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-2011 *
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_ldap1_dist
16 function install_etape_ldap1_dist()
17 {
18 $adresse_ldap = defined('_INSTALL_HOST_LDAP')
19 ? _INSTALL_HOST_LDAP
20 : 'localhost';
21
22 $port_ldap = defined('_INSTALL_PORT_LDAP')
23 ? _INSTALL_PORT_LDAP
24 : 389;
25
26 $tls_ldap = defined('_INSTALL_TLS_LDAP')
27 ? _INSTALL_TLS_LDAP
28 : 'non';
29
30 $protocole_ldap = defined('_INSTALL_PROTOCOLE_LDAP')
31 ? _INSTALL_PROTOCOLE_LDAP
32 : 3 ; // on essaie 2 en cas d'echec
33
34 $login_ldap = defined('_INSTALL_USER_LDAP')
35 ? _INSTALL_USER_LDAP
36 : '';
37
38 $pass_ldap = defined('_INSTALL_PASS_LDAP')
39 ? _INSTALL_PASS_LDAP
40 : '';
41
42 echo install_debut_html();
43
44 echo info_etape(_T('titre_connexion_ldap'),info_progression_etape(1,'etape_ldap','install/'), _T('entree_informations_connexion_ldap'));
45
46 echo generer_form_ecrire('install', (
47 "\n<input type='hidden' name='etape' value='ldap2' />"
48
49 . fieldset(_T('entree_adresse_annuaire'),
50 array(
51 'adresse_ldap' => array(
52 'label' => _T('texte_adresse_annuaire_1'),
53 'valeur' => $adresse_ldap
54 ),
55 'port_ldap' => array(
56 'label' => _T('entree_port_annuaire').'<br />'._T('texte_port_annuaire'),
57 'valeur' => $port_ldap
58 ),
59 'tls_ldap' => array(
60 'label' => '<b>'._T('tls_ldap').'</b>',
61 'valeur' => $tls_ldap,
62 'alternatives' => array(
63 'non' => _T('item_non'),
64 'oui' => _T('item_oui')
65 )
66 ),
67 'protocole_ldap' => array(
68 'label' => _T('protocole_ldap'),
69 'valeur' => $protocole_ldap,
70 'alternatives' => array(
71 '3' => '3',
72 '2' => '2'
73 )
74 )
75 )
76 )
77
78 . "\n<p>"._T('texte_acces_ldap_anonyme_1').'</p>'
79 . fieldset(_T('connexion_ldap'),
80 array(
81 'login_ldap' => array(
82 'label' => _T('texte_login_ldap_1'),
83 'valeur' => $login_ldap
84 ),
85 'pass_ldap' => array(
86 'label' => _T('entree_passe_ldap'),
87 'valeur' => $pass_ldap
88 )
89 )
90 )
91
92 . bouton_suivant()));
93
94 echo install_fin_html();
95 }
96
97 ?>