Subversion Repositories ALCASAR

Rev

Rev 2446 | Rev 2451 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 2446 Rev 2449
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
# $Id: ldap.php 2449 2017-12-05 21:42:08Z tom.houdayer $
-
 
3
 
2
/* written by steweb57 & Rexy */
4
/* written by steweb57 & Rexy */
3
/****************************************************************
5
/****************************************************************
4
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION	*
6
*			GLOBAL FILE PATHS			*
5
*****************************************************************/
7
*****************************************************************/
-
 
8
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
6
 
9
 
-
 
10
/****************************************************************
-
 
11
*			FILE reading test			*
7
define ("ALCASAR_RADIUS_SITE", "/etc/raddb/sites-enabled/alcasar");
12
*****************************************************************/
-
 
13
$conf_files = array(CONF_FILE);
-
 
14
foreach ($conf_files as $file) {
-
 
15
	if (!file_exists($file)) {
-
 
16
		exit("Fichier $file non présent");
-
 
17
	}
-
 
18
	if (!is_readable($file)) {
8
define ("ALCASAR_RADIUS_MODULE_LDAP", "/etc/raddb/mods-available/ldap");
19
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
-
 
20
	}
-
 
21
}
9
 
22
 
10
/****************************************************************
23
/****************************************************************
11
*			Choice of language			*
24
*			Read CONF_FILE				*
12
*****************************************************************/
25
*****************************************************************/
-
 
26
$file_conf = fopen(CONF_FILE, 'r');
-
 
27
if (!$file_conf) {
-
 
28
	exit('Error opening the file '.CONF_FILE);
-
 
29
}
-
 
30
while (!feof($file_conf)) {
-
 
31
	$buffer = fgets($file_conf, 4096);
-
 
32
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
-
 
33
		$tmp = explode('=', $buffer, 2);
-
 
34
		$conf[trim($tmp[0])] = trim($tmp[1]);
-
 
35
	}
-
 
36
}
-
 
37
fclose($file_conf);
13
 
38
 
-
 
39
/****************************************************************
-
 
40
*			Choice of language			*
-
 
41
*****************************************************************/
14
$Language = 'en';
42
$Language = 'en';
15
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
43
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
16
	$Langue	= explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
44
	$Langue	  = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
17
	$Language	= strtolower(substr(chop($Langue[0]),0,2)); }
45
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
-
 
46
}
18
if($Language == 'fr'){
47
if ($Language === 'fr') {		// French
19
	$l_file				= "Fichier ";
-
 
20
	$l_not_found			= " non présent";
-
 
21
	$l_no_writing_right_on_file	= "Vous n'avez pas les droits d'écriture sur le fichier ";
-
 
22
	$l_ldap_update_sucess		= "Mise à jour des paramètres LDAP réalisée avec succès";
48
	$l_ldap_update_sucess		= "Mise à jour des paramètres LDAP réalisée avec succès";
23
	$l_ldap_title			= "Authentification externe : LDAP";
49
	$l_ldap_title			= "Authentification externe : LDAP";
24
	$l_ldap_legend			= "Authentification LDAP";
50
	$l_ldap_legend			= "Authentification LDAP";
25
	$l_ldap_auth_enable_label	= "Activer l'authentification LDAP:";
51
	$l_ldap_auth_enable_label	= "Activer l'authentification LDAP:";
26
	$l_ldap_YES			= "OUI";
52
	$l_ldap_YES			= "OUI";
Line 43... Line 69...
43
	$l_ldap_test_connection_failed	= "Impossible de se connecter au serveur LDAP.";
69
	$l_ldap_test_connection_failed	= "Impossible de se connecter au serveur LDAP.";
44
	$l_ldap_test_bind_ok		= "Connexion LDAP réussie...";
70
	$l_ldap_test_bind_ok		= "Connexion LDAP réussie...";
45
	$l_ldap_test_bind_failed	= "Echec d'authentification sur le serveur LDAP... Vérifiez votre configuration";
71
	$l_ldap_test_bind_failed	= "Echec d'authentification sur le serveur LDAP... Vérifiez votre configuration";
46
	$l_ldap_test_dn_ok		= "DN semble bon";
72
	$l_ldap_test_dn_ok		= "DN semble bon";
47
	$l_ldap_test_dn_failed		= "DN semble mauvais";
73
	$l_ldap_test_dn_failed		= "DN semble mauvais";
48
} else {
-
 
49
	$l_file				= "File ";
74
	$l_ldap_error			= "erreur LDAP";
50
	$l_not_found			= " not found";
75
} else {				// English
51
	$l_no_writing_right_on_file	= "You have no writting permission on the file ";
-
 
52
	$l_ldap_update_sucess		= "Successfull LDAP settings update";
76
	$l_ldap_update_sucess		= "Successfull LDAP settings update";
53
	$l_ldap_title			= "External authentication : LDAP";
77
	$l_ldap_title			= "External authentication : LDAP";
54
	$l_ldap_legend			= "LDAP authentication";
78
	$l_ldap_legend			= "LDAP authentication";
55
	$l_ldap_auth_enable_label	= "Use LDAP authentication :";
79
	$l_ldap_auth_enable_label	= "Use LDAP authentication :";
56
	$l_ldap_YES			= "YES";
80
	$l_ldap_YES			= "YES";
Line 73... Line 97...
73
	$l_ldap_test_connection_failed	= "LDAP connexion failed...";
97
	$l_ldap_test_connection_failed	= "LDAP connexion failed...";
74
	$l_ldap_test_bind_ok		= "LDAP connexion success...";
98
	$l_ldap_test_bind_ok		= "LDAP connexion success...";
75
	$l_ldap_test_bind_failed	= "LDAP authentication failed...Check your ldap setup...";
99
	$l_ldap_test_bind_failed	= "LDAP authentication failed...Check your ldap setup...";
76
	$l_ldap_test_dn_ok              = "DN seems to be right";
100
	$l_ldap_test_dn_ok              = "DN seems to be right";
77
	$l_ldap_test_dn_failed          = "DN seems to be wrong";
101
	$l_ldap_test_dn_failed          = "DN seems to be wrong";
-
 
102
	$l_ldap_error			= "LDAP error";
78
}
103
}
79
/********************************************************
-
 
80
*		TEST DES FICHIERS DE CONFIGURATION	*
-
 
81
*********************************************************/
-
 
82
 
-
 
83
//Test de présence et des droits en lecture des fichiers de configuration.
-
 
84
if (!file_exists(ALCASAR_RADIUS_SITE)){
-
 
85
	exit($l_file.ALCASAR_RADIUS_SITE.$l_not_found);
-
 
86
}
-
 
87
if (!file_exists(ALCASAR_RADIUS_MODULE_LDAP)){
-
 
88
	exit($l_file.ALCASAR_RADIUS_MODULE_LDAP.$l_not_found);
-
 
89
}
-
 
90
if (!is_readable(ALCASAR_RADIUS_SITE)){
-
 
91
	exit($l_no_writing_right_on_file.ALCASAR_RADIUS_SITE);
-
 
92
}
-
 
93
if (!is_readable(ALCASAR_RADIUS_MODULE_LDAP)){
-
 
94
	exit($l_no_writing_right_on_file.ALCASAR_RADIUS_MODULE_LDAP);
-
 
95
}
-
 
96
 
-
 
97
/********************************************************
-
 
98
*		VARIABLES DE FORMULAIRE			*
-
 
99
*********************************************************/
-
 
100
 
104
 
101
if (isset($_GET['erreur'])&&(!($_GET['erreur']==""))) $erreur = $_GET['erreur']; else $erreur = false;//valeur de $erreur non controlée car ne sert qu'un afficher un msg.
-
 
102
if (isset($_GET['update'])&&($_GET['update']=="ok")) $update = true; else $update = false;
-
 
103
 
105
 
104
$message = "";
106
$message = '';
105
if ((bool)$erreur){ 
107
if ((isset($_GET['erreur'])) && (!empty($_GET['erreur']))) { 
106
	$message = "<div align=\"center\"><br>";
108
	$message  = '<div style="text-align: center"><br>';
107
	$message.="<strong><font color=\"red\">".$erreur."</font></strong><br>";
109
	$message .= '<span style="font-weight: bold; color: red;">'.htmlspecialchars($erreur).'</span><br>';
108
	$message.="<br></div>";
110
	$message .= '<br></div>';
109
}else{
-
 
110
	if ($update){
111
} else if (isset($_GET['update']) && ($_GET['update'] === 'ok')) {
111
		$message = "<div align=\"center\"><br>";
112
	$message  = '<div style="text-align: center"><br>';
112
		$message.="<strong><font color=\"green\">$l_ldap_update_sucess</font><br></strong>";
113
	$message .= '<span style="font-weight: bold; color: green;">'.$l_ldap_update_sucess.'</span><br>';
113
		$message.="<br></div>";
114
	$message .= '<br></div>';
114
	}
-
 
115
}
115
}
116
 
116
 
117
/****************************************************************
-
 
118
*			VARIABLES RESULTATS			*
117
// LDAP configuration params
119
*****************************************************************/
-
 
120
//Création des variables nécessaires
118
$ldap_status      = ($conf['LDAP'] === 'on');
121
//variables ldap
-
 
122
$ldap_on		= "";
-
 
123
$ldap_server	= ""; 	//IP ou nom DNS du seveur LDAP (ou AD)
119
$ldap_server      = $conf['LDAP_SERVER'];
124
						//par défaut : server = "ldap.your.domain"
-
 
125
$ldap_identity	= "";	//nom d'utilisateur qui intérroge le ldap (vide = anonyme)
-
 
126
						//par défaut : # identity = "cn=admin,o=My Org,c=UA"
120
$ldap_identity    = $conf['LDAP_USER'];
127
$ldap_password	= "";	//mot de passe de l'utilisateur intérrogeant le ldap
121
$ldap_password    = $conf['LDAP_PASSWORD'];
128
						//par défaut : # password = mypass
122
$ldap_basedn      = $conf['LDAP_BASE'];
129
$ldap_basedn	= "";	//DN de base ou l'on recherchera les utilisateurs 
-
 
130
						//par défaut : basedn = "o=My Org,c=UA"
123
$ldap_filter      = $conf['LDAP_UID'];
131
$ldap_filter	= "";	//permet entre autre de déterminer l'attribut utilisé pour la recherche d'un utilisateur dans LDAP
-
 
132
						//attribut uid pour un ldap standard, samaccountname pour AD
-
 
133
						//par défaut : filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
-
 
134
$ldap_base_filter = "";	//
124
$ldap_base_filter = $conf['LDAP_FILTER'];
135
						//par défaut : # base_filter = "(objectclass=radiusprofile)"
-
 
136
 
125
 
137
/********************************************************
-
 
138
*Lecture Fichier de conf	*
-
 
139
*********************************************************/
-
 
140
//Lecture du fichier /usr/local/etc/alcasar.conf
-
 
141
//$ldap_server		= $ldap->host;		// others options only in alcasar 3.x ($ldap->server)
-
 
142
//$ldap_identity		= $ldap->identity;
-
 
143
//$ldap_password		= $ldap->password;
-
 
144
//$ldap_basedn		= $ldap->basedn;
-
 
145
//$ldap_filter		= $ldap->uid;		// others options only in alcasar 3.x ($ldap->filter)
-
 
146
//$ldap_base_filter	= $ldap->base_filter;
-
 
147
 
126
 
148
function ldap_test($f_ldap_server, $f_ldap_identity, $f_ldap_password, $f_ldap_basedn, $f_ldap_filter, $f_ldap_port = "389"){
127
function ldap_checkServerConfig($f_ldap_server, $f_ldap_identity, $f_ldap_password, $f_ldap_basedn, $f_ldap_filter, $f_ldap_port = 389) {
149
	// Test du serveur
128
	// Test connect to the LDAP server
150
	if (!$sock = @fsockopen($f_ldap_server, $f_ldap_port, $num, $error, 2)) {
129
	if (!$sock = @fsockopen($f_ldap_server, $f_ldap_port, $num, $error, 2)) {
151
		// no network connection
130
		// no network connection
152
		return -1;
131
		return -1;
153
	} else {
132
	}
154
		fclose($sock);
133
	fclose($sock);
-
 
134
 
155
		// Connexion au serveur LDAP
135
	// Test connect to the LDAP server
156
		$ldapconn = ldap_connect($f_ldap_server, $f_ldap_port);
136
	$ldapconn = ldap_connect($f_ldap_server, $f_ldap_port);
157
		ldap_set_option($ldapconn, LDAP_OPT_TIMELIMIT, 2);
137
	ldap_set_option($ldapconn, LDAP_OPT_TIMELIMIT, 2);
158
		if ($ldapconn) {
138
	if (!$ldapconn) {
159
			$ldapbind = ldap_bind($ldapconn, $f_ldap_identity, $f_ldap_password);
-
 
160
			if ($ldapbind) {
-
 
161
				// LDAP Bind success
139
		// LDAP connection failed
162
				//try search
-
 
163
				$query = $f_ldap_filter."=*";
-
 
164
				if($search = ldap_search($ldapconn, $f_ldap_basedn, $query)){
-
 
165
				 	ldap_unbind($ldapconn);      
-
 
166
					return 2;
140
		return -2;
167
				} else {
-
 
168
					ldap_unbind($ldapconn);
-
 
169
					return 1;
-
 
170
				}
141
	}
-
 
142
 
-
 
143
	$ldapbind = ldap_bind($ldapconn, $f_ldap_identity, $f_ldap_password);
171
			} else {
144
	if (!$ldapbind) {
172
				// Test LDAP Version 3
145
		// Test LDAP Version 3
173
				ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
146
		ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
174
				$ldapbind = ldap_bind($ldapconn, $f_ldap_identity, $f_ldap_password);
147
		$ldapbind = ldap_bind($ldapconn, $f_ldap_identity, $f_ldap_password);
-
 
148
 
175
				if ($ldapbind) {
149
		if (!$ldapbind) {
176
					// LDAP Bind success
-
 
177
					//try search
-
 
178
					$query = $f_ldap_filter."=*";
-
 
179
					if($search = ldap_search($ldapconn, $f_ldap_basedn, $query)){
-
 
180
						ldap_unbind($ldapconn);
-
 
181
						return 2;
-
 
182
					} else {
-
 
183
				ldap_unbind($ldapconn);
-
 
184
				return 1;
-
 
185
					}
-
 
186
				} else {
-
 
187
					// LDAP Bind failed
150
			// LDAP Bind failed
188
					return 0;
151
			return 0;
189
				}
152
		}
190
			}
153
	}
-
 
154
	ldap_unbind($ldapconn);
-
 
155
 
-
 
156
	// try search
-
 
157
	$query = $f_ldap_filter.'=*';
-
 
158
	if (ldap_search($ldapconn, $f_ldap_basedn, $query)) {
-
 
159
		return 2;
191
		} else {
160
	} else {
192
			// LDAP connection failed
-
 
193
			return -2;
161
		return 1;
-
 
162
	}
194
		}
163
}
195
 
164
 
-
 
165
// TODO : check LDAP PHP extension loaded?
-
 
166
// if (!extension_loaded('ldap')) {
-
 
167
// 	exit();
-
 
168
// }
-
 
169
 
-
 
170
$pos = strpos($ldap_server, '//');
-
 
171
if ($pos !== false) {
-
 
172
	// TODO : useless?
-
 
173
	$new_ldap_server = explode('//', $ldap_server); // pour discriminer le host et le protocole dans la notation "ldap://192.168.182.10" ou "ldaps://monldap.monentreperise.com"
-
 
174
} else {
-
 
175
	$new_ldap_server = $ldap_server;
196
	}
176
}
-
 
177
if ($ldap_status) {
-
 
178
	$serverCheckResult = ldap_checkServerConfig($new_ldap_server, $ldap_identity, $ldap_password, $ldap_basedn, $ldap_filter);
197
}
179
}
198
 
180
 
199
/********************************
-
 
200
*		TO DO		*
-
 
201
*********************************/
-
 
202
//internationnalisation à mettre en haut du fichier pour internationnaliser les erreurs de script!
-
 
203
?>
181
?>
204
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
 
205
<html><!-- written by steweb57 -->
182
<!DOCTYPE html>
-
 
183
<html>
206
<head>
184
<head>
207
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
185
	<meta charset="UTF-8">
208
<title><?php echo $l_ldap_title; ?></title>
186
	<title><?= $l_ldap_title ?></title>
209
<link rel="stylesheet" href="/css/style.css" type="text/css">
187
	<link type="text/css" href="/css/style.css" rel="stylesheet">
210
<link rel="stylesheet" href="/css/ldap.css" type="text/css">
188
	<link type="text/css" href="/css/acc.css" rel="stylesheet">
211
<script language="javascript">
189
	<link type="text/css" href="/css/ldap.css" rel="stylesheet">
212
function testLdapActif(){
190
	<script>
213
	//List des ID des éléments à désactiver
191
	function onLdapStatusChange() {
214
	var listToDisables = new Array("ldap_server","ldap_dn","ldap_filter","ldap_base_filter","ldap_user","ldap_password");
192
		var listToDisables = ['ldap_server', 'ldap_dn', 'ldap_filter', 'ldap_base_filter', 'ldap_user', 'ldap_password'];
215
 
193
 
216
	if (document.getElementById("auth_enable").value == "1"){
194
		if (document.getElementById("auth_enable").value === '1') {
217
		for (var i=0;i<listToDisables.length;i++){
195
			for (var i=0; i<listToDisables.length; i++) {
218
			document.getElementById(listToDisables[i]).style.backgroundColor ="#ffffff";
196
				document.getElementById(listToDisables[i]).style.backgroundColor = '#ffffff';
219
			document.getElementById(listToDisables[i]).disabled = false;
197
				document.getElementById(listToDisables[i]).disabled = false;
220
		}
198
			}
221
	} else {
199
		} else {
222
		for (var i=0;i<listToDisables.length;i++){
200
			for (var i=0; i<listToDisables.length; i++) {
223
			document.getElementById(listToDisables[i]).style.backgroundColor ="#c0c0c0";
201
				document.getElementById(listToDisables[i]).style.backgroundColor = '#c0c0c0';
224
			document.getElementById(listToDisables[i]).disabled = true;
202
				document.getElementById(listToDisables[i]).disabled = true;
225
		}
203
			}
226
	}
204
		}
227
}
205
	}
228
</script>
206
	</script>
229
</head>
207
</head>
230
<body onLoad="testLdapActif();">
208
<body onLoad="onLdapStatusChange();">
231
<table width="100%" border=0 cellspacing=0 cellpadding=0>
209
	<div class="panel">
232
<tr><th><?php echo $l_ldap_legend; ?></th></tr>
210
		<div class="panel-header"><?= $l_ldap_legend ?></div>
233
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr>
-
 
234
</table>
-
 
235
<table width="100%" border=1 cellspacing=0 cellpadding=1>
-
 
236
<tr><td valign="middle" align="left">
211
		<div class="panel-body">
237
<form name="config_ldap" method="post" action="update_ldap.php">
212
			<form name="config_ldap" method="post" action="update_ldap.php">
238
<fieldset>
213
				<fieldset>
239
<legend>
214
					<legend>
240
<?php
-
 
241
echo $message;
215
						<?= $message ?>
242
$pos = strpos($ldap_server, "//");
216
						<?php if ($ldap_status): ?>
243
if ($pos!==false){
-
 
244
	$new_ldap_server = explode("//",$ldap_server); //pour discriminer le host et le protocole dans la notation "ldap://192.168.182.10" ou "ldaps://monldap.monentreperise.com"
-
 
245
} else {
-
 
246
	$new_ldap_server = $ldap_server;
-
 
247
}
-
 
248
if (($ldap_on == "ldap") && (function_exists('ldap_connect'))){
-
 
249
	echo "<div align='center'><br>";	
217
							<div style="text-align: center"><br>
250
 
-
 
251
	switch(ldap_test($new_ldap_server, $ldap_identity, $ldap_password, $ldap_basedn, $ldap_filter)){
218
								<?php if ($serverCheckResult === -2): ?>
252
		case -2:
-
 
253
			echo "<font color='red'>".$l_ldap_test_connection_failed."</font>";
219
									<span style="color: red"><?= $l_ldap_test_connection_failed ?></span>
254
			break;
-
 
255
		case -1:
220
								<?php elseif ($serverCheckResult === -1): ?>
256
			echo "<font color='red'>".$l_ldap_test_network_failed."</font>";
221
									<span style="color: red"><?= $l_ldap_test_network_failed ?></span>
257
			break;
-
 
258
		case 0:
222
								<?php elseif ($serverCheckResult === 0): ?>
259
			echo "<font color='red'>".$l_ldap_test_bind_failed."</font>";
223
									<span style="color: red"><?= $l_ldap_test_bind_failed ?></span>
260
			break;
-
 
261
		case 1:
224
								<?php elseif ($serverCheckResult === 1): ?>
262
			echo "<font color='green'>".$l_ldap_test_bind_ok."</font>";
225
										<span style="color: green"><?= $l_ldap_test_bind_ok ?></span>
263
			echo "<br>";
226
										<br>";
264
			echo "<font color='red'>".$l_ldap_test_dn_failed."</font>";
227
										<span style="color: red"><?= $l_ldap_test_dn_failed ?></span>
265
			break;
-
 
266
		case 2:
228
								<?php elseif ($serverCheckResult === 2): ?>
267
			echo "<font color='green'>".$l_ldap_test_bind_ok."</font>";
229
										<span style="color: green"><?= $l_ldap_test_bind_ok ?></span>
268
			echo "<br>";
230
										<br>";
269
			echo "<font color='green'>".$l_ldap_test_dn_ok."</font>";
231
										<span style="color: green"><?= $l_ldap_test_dn_ok ?></span>
270
		break;
232
								<?php else: ?>
-
 
233
									<span><?= $l_ldap_error ?></span>
271
		default:
234
								<?php endif ?>
272
			echo "LDAP error";
235
								<br><br>
273
	}
236
							</div>
274
	echo "<br><br></div>"; 
237
						<?php endif ?>
275
}
-
 
276
?>
-
 
277
</legend>
238
					</legend>
278
<dl>
239
					<dl>
279
  <dt>
240
						<dt>
280
    <label for="auth_enable"><?php echo $l_ldap_auth_enable_label; ?></label>
241
							<label for="auth_enable"><?= $l_ldap_auth_enable_label ?></label>
281
  </dt>
242
						</dt>
282
  <dd>
243
						<dd>
283
    <select id="auth_enable" name="auth_enable" onchange="testLdapActif();">
244
							<select id="auth_enable" name="auth_enable" onchange="onLdapStatusChange();">
284
	<?php if ($ldap_on == "ldap") { 
-
 
285
      echo "<option value=\"1\" selected=\"selected\">$l_ldap_YES</option>";
245
								<option value="1"<?= ($ldap_status)  ? ' selected="selected"' : '' ?>><?= $l_ldap_YES ?></option>
286
      echo "<option value=\"0\">$l_ldap_NO</option>";	
-
 
287
	}else{
-
 
288
      echo "<option value=\"1\">$l_ldap_YES</option>";
-
 
289
      echo "<option value=\"0\" selected=\"selected\">$l_ldap_NO</option>";
246
								<option value="0"<?= (!$ldap_status) ? ' selected="selected"' : '' ?>><?= $l_ldap_NO ?></option>
290
	}?>
-
 
291
    </select>
247
							</select>
292
  </dd>
248
						</dd>
293
</dl>
249
					</dl>
294
<dl>
250
					<dl>
295
  <dt>
251
						<dt>
296
    <label for="ldap_server"><?php echo $l_ldap_server_label; ?></label>
252
							<label for="ldap_server"><?= $l_ldap_server_label ?></label><br>
297
    <br>
-
 
298
    <?php echo $l_ldap_server_text; ?></dt>
253
							<?= $l_ldap_server_text ?>
-
 
254
						</dt>
299
  <dd>
255
						<dd>
300
    <input id="ldap_server" size="40" name="ldap_server" value="<?php echo htmlspecialchars($ldap_server); ?>">
256
							<input id="ldap_server" size="40" name="ldap_server" value="<?= htmlspecialchars($ldap_server) ?>">
301
  </dd>
257
						</dd>
302
</dl>
258
					</dl>
303
<dl>
259
					<dl>
304
  <dt>
260
						<dt>
305
    <label for="ldap_dn"><?php echo $l_ldap_base_dn_label; ?></label>
261
							<label for="ldap_dn"><?= $l_ldap_base_dn_label ?></label><br>
306
    <br>
-
 
307
    <?php echo $l_ldap_base_dn_text; ?></dt>
262
							<?= $l_ldap_base_dn_text ?>
-
 
263
						</dt>
308
  <dd>
264
						<dd>
309
    <input id="ldap_dn" size="40" name="ldap_base_dn" value="<?php echo htmlspecialchars($ldap_basedn); ?>">
265
							<input id="ldap_dn" size="40" name="ldap_base_dn" value="<?= htmlspecialchars($ldap_basedn) ?>">
310
  </dd>
266
						</dd>
311
</dl>
267
					</dl>
312
<dl>
268
					<dl>
313
  <dt>
269
						<dt>
314
    <label for="ldap_filter"><?php echo $l_ldap_filter_label; ?></label>
270
							<label for="ldap_filter"><?= $l_ldap_filter_label ?></label><br>
315
    <br>
-
 
316
    <?php echo $l_ldap_filter_text; ?></dt>
271
							<?= $l_ldap_filter_text ?>
-
 
272
						</dt>
317
  <dd>
273
						<dd>
318
    <input id="ldap_filter" size="40" name="ldap_filter" value="<?php echo htmlspecialchars($ldap_filter); ?>">
274
							<input id="ldap_filter" size="40" name="ldap_filter" value="<?= htmlspecialchars($ldap_filter) ?>">
319
  </dd>
275
						</dd>
320
</dl>
276
					</dl>
321
<dl>
277
					<dl>
322
  <dt>
278
						<dt>
323
    <label for="ldap_base_filter"><?php echo $l_ldap_base_filter_label; ?></label>
279
							<label for="ldap_base_filter"><?= $l_ldap_base_filter_label ?></label><br>
324
    <br>
-
 
325
    <?php echo $l_ldap_base_filter_text; ?></dt>
280
							<?= $l_ldap_base_filter_text ?>
-
 
281
						</dt>
326
  <dd>
282
						<dd>
327
    <input id="ldap_base_filter" size="40" name="ldap_base_filter" value="<?php echo htmlspecialchars($ldap_base_filter); ?>">
283
							<input id="ldap_base_filter" size="40" name="ldap_base_filter" value="<?= htmlspecialchars($ldap_base_filter) ?>">
328
  </dd>
284
						</dd>
329
</dl>
285
					</dl>
330
<dl>
286
					<dl>
331
  <dt>
287
						<dt>
332
    <label for="ldap_user"><?php echo $l_ldap_user_label; ?></label>
288
							<label for="ldap_user"><?= $l_ldap_user_label ?></label><br>
333
    <br>
-
 
334
    <?php echo $l_ldap_user_text; ?></dt>
289
							<?= $l_ldap_user_text ?>
-
 
290
						</dt>
335
  <dd>
291
						<dd>
336
    <input id="ldap_user" size="40" name="ldap_user" value="<?php echo htmlspecialchars($ldap_identity); ?>">
292
							<input id="ldap_user" size="40" name="ldap_user" value="<?= htmlspecialchars($ldap_identity) ?>">
337
  </dd>
293
						</dd>
338
</dl>
294
					</dl>
339
<dl>
295
					<dl>
340
  <dt>
296
						<dt>
341
    <label for="ldap_password"><?php echo $l_ldap_password_label; ?></label>
297
							<label for="ldap_password"><?= $l_ldap_password_label ?></label><br>
342
    <br>
-
 
343
    <?php echo $l_ldap_password_text; ?></dt>
298
							<?= $l_ldap_password_text ?>
-
 
299
						</dt>
344
  <dd>
300
						<dd>
345
    <input id="ldap_password" type="password" size="40" name="ldap_password" value="<?php echo htmlspecialchars($ldap_password);?>">
301
							<input id="ldap_password" type="password" size="40" name="ldap_password" value="<?= htmlspecialchars($ldap_password) ?>">
346
  </dd>
302
						</dd>
347
</dl>
303
					</dl>
348
<p>
304
					<p>
349
  <input id="submit" type="submit" value="<?php echo $l_ldap_submit; ?>" name="submit">
305
						<input id="submit" type="submit" value="<?= $l_ldap_submit ?>" name="submit">
350
 
-
 
351
  <input id="reset" type="reset" value="<?php echo $l_ldap_reset; ?>" name="reset">
306
						<input id="reset" type="reset" value="<?= $l_ldap_reset ?>" name="reset">
352
</p>
307
					</p>
353
 
-
 
354
</fieldset>
308
				</fieldset>
355
</form>
309
			</form>
356
<br>
-
 
357
</td></tr>
310
		</div>
358
</table>
311
	</div>
359
</body>
312
</body>
360
</html>
313
</html>