Line 163... |
Line 163... |
163 |
$Language = 'en';
|
163 |
$Language = 'en';
|
164 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
164 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
165 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
165 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
166 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
166 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
167 |
if($Language == 'fr'){
|
167 |
if($Language == 'fr'){
|
168 |
$l_ldap_title = "Authentification externe : LDAP";
|
168 |
$l_ldap_title = "Authentification externe : LDAP";
|
169 |
$l_ldap_legend = "Authentification LDAP";
|
169 |
$l_ldap_legend = "Authentification LDAP";
|
170 |
$l_ldap_auth_enable_label = "Activer l'authentification LDAP:";
|
170 |
$l_ldap_auth_enable_label = "Activer l'authentification LDAP:";
|
171 |
$l_ldap_YES = "OUI";
|
171 |
$l_ldap_YES = "OUI";
|
172 |
$l_ldap_NO = "NON";
|
172 |
$l_ldap_NO = "NON";
|
173 |
$l_ldap_server_label = "Nom du serveur LDAP:";
|
173 |
$l_ldap_server_label = "Nom du serveur LDAP:";
|
174 |
$l_ldap_server_text = "Nom ou IP du serveur LDAP éventuel.";
|
174 |
$l_ldap_server_text = "Nom ou IP du serveur LDAP éventuel.";
|
175 |
$l_ldap_base_dn_label = "DN de la base LDAP:";
|
175 |
$l_ldap_base_dn_label = "DN de la base LDAP:";
|
176 |
$l_ldap_base_dn_text = "DN est le 'Distinguished Name', il situe les informations utilisateurs, exemple: 'o=Mon entreprise, c=FR'.";
|
176 |
$l_ldap_base_dn_text = "DN est le 'Distinguished Name', il situe les informations utilisateurs, exemple: 'o=Mon entreprise, c=FR'.";
|
177 |
$l_ldap_filter_label = "Identifiant LDAP:";
|
177 |
$l_ldap_filter_label = "Identifiant LDAP:";
|
178 |
$l_ldap_filter_text = "Clé utilisée pour la recherche d'un identifiant de connexion, exemple: 'uid', 'sn', etc. Pour un AD mettre 'sAMAccountName'.";
|
178 |
$l_ldap_filter_text = "Clé utilisée pour la recherche d'un identifiant de connexion, exemple: 'uid', 'sn', etc. Pour un AD mettre 'sAMAccountName'.";
|
179 |
$l_ldap_base_filter_label = "Filtre de l'utilisateur LDAP:";
|
179 |
$l_ldap_base_filter_label = "Filtre de l'utilisateur LDAP:";
|
180 |
$l_ldap_base_filter_text = "Sur option, vous pouvez en plus limiter les objets recherchés avec des filtres additionnels. Par exemple 'objectClass=posixGroup' aurait comme conséquence l'utilisation de '(&(uid=username)(objectClass=posixGroup))'";
|
180 |
$l_ldap_base_filter_text = "Sur option, vous pouvez en plus limiter les objets recherchés avec des filtres additionnels. Par exemple 'objectClass=posixGroup' aurait comme conséquence l'utilisation de '(&(uid=username)(objectClass=posixGroup))'";
|
181 |
$l_ldap_user_label = "Utilisateur LDAP dn:";
|
181 |
$l_ldap_user_label = "Utilisateur LDAP:";
|
182 |
$l_ldap_user_text = "Laissez vide pour utiliser un accès invité. Si renseigné, il se connectera au serveur LDAP en tant qu'un utilisateur spécifié, exemple: 'uid=Utilisateur,ou=MonUnité,o=MaCompagnie,c=FR'. Requis pour les serveurs possédant un Active Directory.";
|
182 |
$l_ldap_user_text = "Laissez vide pour utiliser un accès invité. Si renseigné, ALCASAR se connectera au serveur LDAP en tant qu'un utilisateur spécifié, exemple: 'uid=Utilisateur,ou=MonUnité,o=MaCompagnie,c=FR'. Requis pour les serveurs possédant un Active Directory.";
|
183 |
$l_ldap_password_label = "Mot de passe LDAP:";
|
183 |
$l_ldap_password_label = "Mot de passe LDAP:";
|
184 |
$l_ldap_password_text = "Laissez vide pour un accès invité. Sinon, indiquez le mot de passe de connexion. Requis pour les serveurs possédant un Active Directory.";
|
184 |
$l_ldap_password_text = "Laissez vide pour un accès invité. Sinon, indiquez le mot de passe de connexion. Requis pour les serveurs possédant un Active Directory.";
|
185 |
$l_ldap_submit = "Enregistrer";
|
185 |
$l_ldap_submit = "Enregistrer";
|
186 |
$l_ldap_reset = "Annuler";
|
186 |
$l_ldap_reset = "Annuler";
|
187 |
$l_ldap_test_network_failed = "Pas de connectivité réseau avec le serveur LDAP.";
|
187 |
$l_ldap_test_network_failed = "Pas de connectivité réseau avec le serveur LDAP.";
|
188 |
$l_ldap_test_connection_failed = "Impossible de se connecter au serveur LDAP.";
|
188 |
$l_ldap_test_connection_failed = "Impossible de se connecter au serveur LDAP.";
|
189 |
$l_ldap_test_bind_ok = "Connexion LDAP réussie...";
|
189 |
$l_ldap_test_bind_ok = "Connexion LDAP réussie...";
|
190 |
$l_ldap_test_bind_failed = "Echec d'authentification sur le serveur LDAP...Vérifiez votre configuration ldap...";
|
190 |
$l_ldap_test_bind_failed = "Echec d'authentification sur le serveur LDAP...Vérifiez votre configuration ldap...";
|
191 |
} else {
|
191 |
} else {
|
192 |
$l_ldap_title = "External authentication : LDAP";
|
192 |
$l_ldap_title = "External authentication : LDAP";
|
193 |
$l_ldap_legend = "LDAP authentication";
|
193 |
$l_ldap_legend = "LDAP authentication";
|
194 |
$l_ldap_auth_enable_label = "Use LDAP authentication :";
|
194 |
$l_ldap_auth_enable_label = "Use LDAP authentication :";
|
195 |
$l_ldap_YES = "YES";
|
195 |
$l_ldap_YES = "YES";
|
196 |
$l_ldap_NO = "NO";
|
196 |
$l_ldap_NO = "NO";
|
197 |
$l_ldap_server_label = "LDAP server name:";
|
197 |
$l_ldap_server_label = "LDAP server name:";
|
198 |
$l_ldap_server_text = "This is the hostname or IP address of the LDAP server.";
|
198 |
$l_ldap_server_text = "This is the hostname or IP address of the LDAP server.";
|
199 |
$l_ldap_base_dn_label = "LDAP base dn:";
|
199 |
$l_ldap_base_dn_label = "LDAP base dn:";
|
200 |
$l_ldap_base_dn_text = "This is the 'Distinguished Name', locating the user information, e.g. 'o=My Company,c=US'.";
|
200 |
$l_ldap_base_dn_text = "This is the 'Distinguished Name', locating the user information, e.g. 'o=My Company,c=US'.";
|
201 |
$l_ldap_filter_label = "LDAP uid:";
|
201 |
$l_ldap_filter_label = "LDAP uid:";
|
202 |
$l_ldap_filter_text = "This is the key under which to search for a given login identity, e.g. 'uid', 'sn', etc.. For AD use 'sAMAccountName'.";
|
202 |
$l_ldap_filter_text = "This is the key under which to search for a given login identity, e.g. 'uid', 'sn', etc.. For AD use 'sAMAccountName'.";
|
203 |
$l_ldap_base_filter_label = "LDAP user filter:";
|
203 |
$l_ldap_base_filter_label = "LDAP user filter:";
|
204 |
$l_ldap_base_filter_text = "Optionally you can further limit the searched objects with additional filters. For example 'objectClass=posixGroup' would result in the use of '(&(uid=username)(objectClass=posixGroup))'";
|
204 |
$l_ldap_base_filter_text = "Optionally you can further limit the searched objects with additional filters. For example 'objectClass=posixGroup' would result in the use of '(&(uid=username)(objectClass=posixGroup))'";
|
205 |
$l_ldap_user_label = "LDAP user dn:";
|
205 |
$l_ldap_user_label = "LDAP user dn:";
|
206 |
$l_ldap_user_text = "Leave blank to use anonymous binding. If filled uses the specified distinguished name on login attempts to find the correct user, e.g. 'uid=Username,ou=MyUnit,o=MyCompany,c=US'. Required for Active Directory Servers.";
|
206 |
$l_ldap_user_text = "Leave blank to use anonymous binding. If filled, ALCASAR uses the specified distinguished name on login attempts to find the correct user, e.g. 'uid=Username,ou=MyUnit,o=MyCompany,c=US'. Required for Active Directory Servers.";
|
207 |
$l_ldap_password_label = "LDAP password:";
|
207 |
$l_ldap_password_label = "LDAP password:";
|
208 |
$l_ldap_password_text = "Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers.";
|
208 |
$l_ldap_password_text = "Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers.";
|
209 |
$l_ldap_submit = "Save";
|
209 |
$l_ldap_submit = "Save";
|
210 |
$l_ldap_reset = "Reset";
|
210 |
$l_ldap_reset = "Reset";
|
211 |
$l_ldap_test_network_failed = "LDAP server is not reachable.";
|
211 |
$l_ldap_test_network_failed = "LDAP server is not reachable.";
|
212 |
$l_ldap_test_connection_failed = "LDAP connexion failed...";
|
212 |
$l_ldap_test_connection_failed = "LDAP connexion failed...";
|
213 |
$l_ldap_test_bind_ok = "LDAP connexion success...";
|
213 |
$l_ldap_test_bind_ok = "LDAP connexion success...";
|
214 |
$l_ldap_test_bind_failed = "LDAP authentication failed...Check your ldap setup...";
|
214 |
$l_ldap_test_bind_failed = "LDAP authentication failed...Check your ldap setup...";
|
215 |
}
|
215 |
}
|
216 |
|
216 |
|
217 |
function ldap_test($f_ldap_server, $f_ldap_identity, $f_ldap_password, $f_ldap_port = "389"){
|
217 |
function ldap_test($f_ldap_server, $f_ldap_identity, $f_ldap_password, $f_ldap_port = "389"){
|
218 |
// Test du serveur
|
218 |
// Test du serveur
|
219 |
if (!$sock = @fsockopen($f_ldap_server, $f_ldap_port, $num, $error, 2)) {
|
219 |
if (!$sock = @fsockopen($f_ldap_server, $f_ldap_port, $num, $error, 2)) {
|