Subversion Repositories ALCASAR

Rev

Rev 2718 | Rev 2809 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2718 Rev 2731
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: ldap.php 2718 2019-03-11 21:25:44Z tom.houdayer $
2
# $Id: ldap.php 2731 2019-05-26 21:09:18Z tom.houdayer $
3
 
3
 
4
/* written by steweb57, Rexy & Tom HOUDAYER */
4
/* written by steweb57, Rexy & Tom HOUDAYER */
5
/****************************************************************
5
/****************************************************************
6
*			GLOBAL FILE PATHS			*
6
*			GLOBAL FILE PATHS			*
7
*****************************************************************/
7
*****************************************************************/
Line 178... Line 178...
178
		} else {
178
		} else {
179
			ldap_set_option($ldapconn, LDAP_OPT_TIMELIMIT, 2);
179
			ldap_set_option($ldapconn, LDAP_OPT_TIMELIMIT, 2);
180
 
180
 
181
			// Bind anonymous
181
			// Bind anonymous
182
			$ldap_srv_636 = true;
182
			$ldap_srv_636 = true;
183
			if (!@ldap_bind($ldapconn, '', '')) {
183
			if (!@ldap_bind($ldapconn)) {
184
				ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
184
				ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
185
				if (!@ldap_bind($ldapconn, '', '')) {
185
				if (!@ldap_bind($ldapconn)) {
186
					$ldap_srv_636 = false;
186
					$ldap_srv_636 = false;
187
				}
187
				}
188
			}
188
			}
189
		}
189
		}
190
 
190
 
Line 224... Line 224...
224
		} else {
224
		} else {
225
			ldap_set_option($ldapconn, LDAP_OPT_TIMELIMIT, 2);
225
			ldap_set_option($ldapconn, LDAP_OPT_TIMELIMIT, 2);
226
 
226
 
227
			// Bind anonymous
227
			// Bind anonymous
228
			$ldap_srv_389 = true;
228
			$ldap_srv_389 = true;
229
			if (!@ldap_bind($ldapconn, '', '')) {
229
			if (!@ldap_bind($ldapconn)) {
230
				ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
230
				ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
231
				if (!@ldap_bind($ldapconn, '', '')) {
231
				if (!@ldap_bind($ldapconn)) {
232
					$ldap_srv_389 = false;
232
					$ldap_srv_389 = false;
233
				}
233
				}
234
			}
234
			}
235
		}
235
		}
236
 
236
 
Line 632... Line 632...
632
		var dom_ldap_dn            = document.getElementById('ldap_dn');
632
		var dom_ldap_dn            = document.getElementById('ldap_dn');
633
		var dom_ldap_uid           = document.getElementById('ldap_uid');
633
		var dom_ldap_uid           = document.getElementById('ldap_uid');
634
		var dom_ad_dns_domain      = document.getElementById('ad_dns_domain');
634
		var dom_ad_dns_domain      = document.getElementById('ad_dns_domain');
635
		post_data = 'ldap_server='+dom_ldap_server.value;
635
		post_data = 'ldap_server='+dom_ldap_server.value;
636
 
636
 
-
 
637
		messagesElem.innerHTML = '';
-
 
638
 
637
		var xhr = new XMLHttpRequest();
639
		var xhr = new XMLHttpRequest();
638
		xhr.onreadystatechange = function() {
640
		xhr.onreadystatechange = function() {
639
			if (this.readyState == 4) {
641
			if (this.readyState == 4) {
640
				if (this.status == 200) {
642
				if (this.status == 200) {
641
					var data = JSON.parse(this.responseText);
643
					var data = JSON.parse(this.responseText);