Subversion Repositories ALCASAR

Rev

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

Rev 2992 Rev 2993
Line 3... Line 3...
3
 
3
 
4
/* written by Joss_p & Rexy */
4
/* written by Joss_p & Rexy */
5
/****************************************************************
5
/****************************************************************
6
*			GLOBAL FILE PATHS			*
6
*			GLOBAL FILE PATHS			*
7
*****************************************************************/
7
*****************************************************************/
8
define('CONF_FILE', '/usr/local/etc/alcasar-mail.conf');
8
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
9
 
-
 
10
/****************************************************************
9
/****************************************************************
11
*			FILE reading test			*
10
*			Conf files reading test			*
12
*****************************************************************/
11
*****************************************************************/
13
$conf_files = array(CONF_FILE);
12
$conf_files = array(CONF_FILE);
14
foreach ($conf_files as $file) {
13
foreach ($conf_files as $file) {
15
	if (!file_exists($file)) {
14
	if (!file_exists($file)) {
16
		exit("Fichier $file non présent");
15
		exit("Fichier $file non présent");
17
	}
16
	}
18
	if (!is_readable($file)) {
17
	if (!is_readable($file)) {
19
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
18
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
20
	}
19
	}
21
}
20
}
22
 
-
 
23
/****************************************************************
21
/****************************************************************
24
*			Read CONF_FILE				*
22
*			Read CONF_FILE				*
25
*****************************************************************/
23
*****************************************************************/
26
$file_conf = fopen(CONF_FILE, 'r');
24
$file_conf = fopen(CONF_FILE, 'r');
27
if (!$file_conf) {
25
if (!$file_conf) {
Line 29... Line 27...
29
}
27
}
30
while (!feof($file_conf)) {
28
while (!feof($file_conf)) {
31
	$buffer = fgets($file_conf, 4096);
29
	$buffer = fgets($file_conf, 4096);
32
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
30
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
33
		$tmp = explode('=', $buffer, 2);
31
		$tmp = explode('=', $buffer, 2);
-
 
32
		$mail_conf[trim($tmp[0])] = trim($tmp[1]);
-
 
33
	}
-
 
34
}
-
 
35
fclose($file_conf);
-
 
36
 
-
 
37
$file_conf = fopen(CONF_FILE, 'r');
-
 
38
if (!$file_conf) {
-
 
39
	exit('Error opening the file '.CONF_FILE);
-
 
40
}
-
 
41
while (!feof($file_conf)) {
-
 
42
	$buffer = fgets($file_conf, 4096);
-
 
43
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
-
 
44
		$tmp = explode('=', $buffer, 2);
34
		$conf[trim($tmp[0])] = trim($tmp[1]);
45
		$conf[trim($tmp[0])] = trim($tmp[1]);
35
	}
46
	}
36
}
47
}
37
fclose($file_conf);
48
fclose($file_conf);
38
 
49
 
Line 43... Line 54...
43
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
54
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
44
	$Langue	  = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
55
	$Langue	  = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
45
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
56
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
46
}
57
}
47
if ($Language === 'fr') {
58
if ($Language === 'fr') {
48
	$l_mail_title			= "Authentification externe : Adresse mail";
59
	$l_mail_title			= "Inscription par Email";
49
	$l_mail_auth_enable_label	= "Activer l'authentification par mail :";
60
	$l_mail_registration	= "Activer l'inscription par Email :";
-
 
61
	$l_mail_choice			= "Quel type de service mail utiliser ?";
-
 
62
	$l_use_internal_server	= "Utiliser le serveur interne";
-
 
63
	$l_use_external_server	= "Relayer vers un serveur externe";
-
 
64
	$l_use_email_address	= "Utiliser une adresse mail";
-
 
65
	$l_email_address		= "Adresse mail utilisée pour l'envoi de mail";
-
 
66
	$l_email_password		= "Mot de passe";
-
 
67
	$l_email_password_confirm	= "Confirmez le mot de passe";
-
 
68
	$l_mail_service			= "Choisissez le service de messagerie";
50
	$l_mail_YES			= "OUI";
69
	$l_mail_YES				= "OUI";
51
	$l_mail_NO			= "NON";
70
	$l_mail_NO				= "NON";
-
 
71
	$l_mail_submit			= "Enregistrer";
52
} else {
72
} else {
53
	$l_mail_title			= "External authentication : Address mail";
73
	$l_mail_title			= "Registration by Email";
54
	$l_mail_auth_enable_label	= "Enable email authentication :";
74
	$l_mail_registration	= "Enable registration by Email :";
-
 
75
	$l_mail_choice			= "What type of mail service use ?";
-
 
76
	$l_internal_server		= "Use the internal server";
-
 
77
	$l_external_server		= "Relay to an external server";
-
 
78
	$l_email_address		= "Use an email address";
-
 
79
	$l_email_address		= "Email address used for sending mail";
-
 
80
	$l_email_password		= "Password";
-
 
81
	$l_email_password_confirm	= "Confirm password";
-
 
82
	$l_mail_service			= "Choose the mail service";
55
	$l_mail_YES			= "YES";
83
	$l_mail_YES				= "YES";
56
	$l_mail_NO			= "NO";
84
	$l_mail_NO				= "NO";
-
 
85
	$l_mail_submit			= "Save";
57
}
86
}
58
 
87
 
59
// Mail configuration params
88
// Mail configuration params
60
$mail_status        	= $conf['MAIL'];
89
$mail_status        	= $mail_conf['MAIL'];
61
$mail_type				= $conf['TYPE_MAIL'];
90
$mail_type				= $mail_conf['MAIL_TYPE'];
62
$mail_address_mail		= $conf['mailAddr'];
91
$mail_address_mail		= $mail_conf['MAIL_ADDR'];
63
$mail_smtp	        	= $conf['smtp'];
92
$mail_smtp	        	= $mail_conf['MAIL_SMTP'];
64
$mail_port				= $conf['port'];
93
$mail_port				= $mail_conf['MAIL_PORT'];
65
$mail_address_ip		= $conf['mailIP'];
94
$mail_address_ip		= $mail_conf['MAIL_SMTP_IP'];
66
$mail_server			= "";
95
$mail_server			= "";
67
$mail_password_mail 	= "";
96
$mail_password_mail 	= "";
68
$mail_password_mail_2	= "";
97
$mail_password_mail_2	= "";
69
$admin_address			= $conf['adminMail'];
98
$admin_address			= $mail_conf['MAIL_ADMIN'];
70
$mail_whitelist			= $conf['whiteDomain'];
99
$mail_whitelist			= $mail_conf['MAIL_WHITEDOMAIN'];
71
 
-
 
72
 
100
 
73
if(isset($_POST['submit'])){
101
if(isset($_POST['submit'])){
74
	if($_POST['auth_enable'] === '1')
102
	if($_POST['auth_enable'] === 'on')
75
	{
103
	{
76
		exec("systemctl start postfix");
104
//		exec("systemctl start postfix");
77
 
-
 
78
		$mail_status 	= $_POST['auth_enable'];
-
 
79
		$mail_type 		= $_POST['mail_type'];
105
		$mail_type 		= $_POST['mail_type'];
80
		$mail_address 	= $_POST['mail_address'];
106
		$mail_address 	= $_POST['mail_address'];
81
		$mail_ip 		= $_POST['mail_ip'];
107
		$mail_ip 		= $_POST['mail_ip'];
82
		$mail_server 	= $_POST['mail_server'];
108
		$mail_server 	= $_POST['mail_server'];
83
		$mail_mdp 		= $_POST['mail_mdp'];
109
		$mail_mdp 		= $_POST['mail_mdp'];
84
		$mail_mdp2 		= $_POST['mail_mdp2'];
110
		$mail_mdp2 		= $_POST['mail_mdp2'];
85
		$admin_enable	= $_POST['admin_enable'];
111
		$admin_enable	= $_POST['admin_enable'];
86
		$admin_address	= $_POST['admin_address'];
112
		$admin_address	= $_POST['admin_address'];
87
		$mail_whitelist	= $_POST['mail_whitelist'];
113
		$mail_whitelist	= $_POST['mail_whitelist'];
88
		
-
 
89
//		exec("cp /var/www/mail/header.php /var/www/html");
-
 
90
//		exec("cp /var/www/mail/inscription.php /var/www/html");
-
 
91
//		exec("cp /var/www/mail/inscription_traitement.php /var/www/html");
-
 
92
//		exec("cp /var/www/html/acc/admin/services.php /var/www/html/acc/admin/services.php.origin");
-
 
93
//		exec("cp /var/www/mail/services.php /var/www/html/acc/admin");
-
 
94
 
114
 
95
		if ($mail_mdp == $mail_mdp2) {
115
		if ($mail_mdp == $mail_mdp2) {
96
			switch ($mail_server) {
116
			switch ($mail_server) {
97
			case '1':
117
			case '1':
98
				$mail_smtp		= "smtp.orange.fr";
118
				$mail_smtp		= "smtp.orange.fr";
Line 128... Line 148...
128
				break;
148
				break;
129
			default:
149
			default:
130
				echo "Erreur dans la saisie !";
150
				echo "Erreur dans la saisie !";
131
				break;
151
				break;
132
			}
152
			}
133
			file_put_contents(CONF_FILE, str_replace('MAIL='.$conf['MAIL'],'MAIL='.$mail_status,file_get_contents(CONF_FILE)));
153
			file_put_contents(CONF_FILE, str_replace('MAIL='.$mail_conf['MAIL'],'MAIL=on',file_get_contents(CONF_FILE)));
134
			file_put_contents(CONF_FILE, str_replace('TYPE_MAIL='.$conf['TYPE_MAIL'],'TYPE_MAIL='.$mail_type,file_get_contents(CONF_FILE)));
154
			file_put_contents(CONF_FILE, str_replace('MAIL_TYPE='.$mail_conf['MAIL_TYPE'],'MAIL_TYPE='.$mail_type,file_get_contents(CONF_FILE)));
135
			file_put_contents(CONF_FILE, str_replace('mailAddr='.$conf['mailAddr'],'mailAddr='.$mail_address,file_get_contents(CONF_FILE)));
155
			file_put_contents(CONF_FILE, str_replace('MAIL_ADDR='.$mail_conf['MAIL_ADDR'],'MAIL_ADDR='.$mail_address,file_get_contents(CONF_FILE)));
136
			file_put_contents(CONF_FILE, str_replace('mailIP='.$conf['mailIP'],'mailIP='.$mail_ip,file_get_contents(CONF_FILE)));
156
			file_put_contents(CONF_FILE, str_replace('MAIL_SMTP_IP='.$mail_conf['MAIL_SMTP_IP'],'MAIL_SMTP_IP='.$mail_ip,file_get_contents(CONF_FILE)));
137
			file_put_contents(CONF_FILE, str_replace('smtp='.$conf['smtp'],'smtp='.$mail_smtp,file_get_contents(CONF_FILE)));
157
			file_put_contents(CONF_FILE, str_replace('MAIL_SMTP='.$mail_conf['MAIL_SMTP'],'MAIL_SMTP='.$mail_smtp,file_get_contents(CONF_FILE)));
138
			file_put_contents(CONF_FILE, str_replace('port='.$conf['port'],'port='.$mail_port,file_get_contents(CONF_FILE)));
158
			file_put_contents(CONF_FILE, str_replace('MAIL_PORT='.$mail_conf['MAIL_PORT'],'MAIL_PORT='.$mail_port,file_get_contents(CONF_FILE)));
139
			file_put_contents(CONF_FILE, str_replace('whiteDomain='.$conf['mail_whitelist'],'whiteDomain='.$mail_whitelist,file_get_contents(CONF_FILE)));
159
			file_put_contents(CONF_FILE, str_replace('MAIL_WHITEDOMAIN='.$mail_conf['MAIL_WHITEDOMAIN'],'MAIL_WHITEDOMAIN='.$mail_whitelist,file_get_contents(CONF_FILE)));
140
			if (isset($admin_address)) {
160
			if (isset($admin_address)) {
141
				file_put_contents(CONF_FILE, str_replace('adminMail='.$conf['admin_address'],'adminMail='.$admin_address,file_get_contents(CONF_FILE)));
161
				file_put_contents(CONF_FILE, str_replace('MAIL_ADMIN='.$mail_conf['MAIL_ADMIN'],'MAIL_ADMIN='.$admin_address,file_get_contents(CONF_FILE)));
142
			}
162
			}
143
			switch ($mail_type) {
163
			switch ($mail_type) {
144
				case '1':
164
				case '1':
145
					$mail_port = 25;
165
					$mail_port = 25;
146
					file_put_contents(CONF_FILE, str_replace('port='.$conf['port'],'port='.$mail_port,file_get_contents(CONF_FILE)));
166
					file_put_contents(CONF_FILE, str_replace('port='.$mail_conf['port'],'port='.$mail_port,file_get_contents(CONF_FILE)));
147
					if(isset($mail_admin)){
167
					if(isset($mail_admin)){
148
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install-V2.sh -1 -a $admin_address -w $mail_whitelist");
168
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install.sh -1 -a $admin_address -w $mail_whitelist");
149
					}
169
					}
150
					else {
170
					else {
151
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install-V2.sh -1 -w $mail_whitelist");
171
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install.sh -1 -w $mail_whitelist");
152
					}
172
					}
153
					break;
173
					break;
154
				case '2':
174
				case '2':
155
					if(isset($mail_admin)){
175
					if(isset($mail_admin)){
156
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install-V2.sh -2 -s $mail_smtp -p $mail_port -r $mail_ip -a $admin_address -w $mail_whitelist");
176
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install.sh -2 -s $mail_smtp -p $mail_port -r $mail_ip -a $admin_address -w $mail_whitelist");
157
					}
177
					}
158
					else {
178
					else {
159
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install-V2.sh -2 -s $mail_smtp -p $mail_port -r $mail_ip -w $mail_whitelist");
179
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install.sh -2 -s $mail_smtp -p $mail_port -r $mail_ip -w $mail_whitelist");
160
					}
180
					}
161
					break;
181
					break;
162
				case '3':
182
				case '3':
163
					if(isset($mail_admin)){
183
					if(isset($mail_admin)){
164
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install-V2.sh -3 -s $mail_smtp -p $mail_port -m $mail_address -o $mail_mdp -a $admin_address -w $mail_whitelist");
184
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install.sh -3 -s $mail_smtp -p $mail_port -m $mail_address -o $mail_mdp -a $admin_address -w $mail_whitelist");
165
					}
185
					}
166
					else {
186
					else {
167
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install-V2.sh -3 -s $mail_smtp -p $mail_port -m $mail_address -o $mail_mdp -w $mail_whitelist");
187
						exec("sudo /usr/bin/bash /usr/local/bin/alcasar-mail-install.sh -3 -s $mail_smtp -p $mail_port -m $mail_address -o $mail_mdp -w $mail_whitelist");
168
					}
188
					}
169
					break;
189
					break;
170
				default:
190
				default:
171
					echo "Erreur dans la saisie !";
191
					echo "Erreur dans la saisie !";
172
					break;
192
					break;
173
			}
193
			}
174
		}
194
		}
175
		else {
195
		else { // password are not the same
176
			echo "Erreur";
196
			echo "Erreur";
177
		}
197
		}
178
	}
198
	}
179
	else {
-
 
180
		exec("cp -f /etc/postfix/main.cf.origin  /etc/postfix/main.cf");
-
 
181
		exec("rm -rf /etc/postfix/sasl/");
-
 
182
		exec("cp -f /var/www/mail/alcasar-mail.conf /usr/local/etc/");
-
 
183
		exec("systemctl restart postfix");
199
	else { // switch email registation off
184
		exec("systemctl stop postfix");
-
 
185
		exec("sed -i '/SMTP_IP=/ s/^/#/g' /usr/local/etc/alcasar-iptables-local.sh");
-
 
186
		exec("sed -i '/SMTP_PORT=/ s/^/#/g' /usr/local/etc/alcasar-iptables-local.sh");
-
 
187
		exec("rm -f /var/www/html/header.php");
-
 
188
		exec("rm -f /var/www/html/inscription.php");
-
 
189
		exec("rm -f /var/www/html/inscription_traitement.php");
-
 
190
		exec("cp -f /var/www/html/acc/admin/services.php.origin /var/www/html/acc/admin/services.php");
-
 
191
		exec("sudo /usr/bin/bash /usr/local/bin/alcasar-iptables.sh");
200
		exec("/usr/local/bin/alcasar-mail-install.sh -0");
192
	}
201
	}
193
	header("Refresh:0");
202
	header("Refresh:0");
194
	exit;
203
	exit;
195
}
204
}
196
 
205
 
Line 208... Line 217...
208
		var listToDisables2 = ['mail_server','mail_type','admin_enable','admin_address','mail_whitelist','mail_ip'];
217
		var listToDisables2 = ['mail_server','mail_type','admin_enable','admin_address','mail_whitelist','mail_ip'];
209
		var listToDisables3 = ['mail_server','mail_mdp2','mail_mdp','mail_address','mail_type','admin_enable','admin_address','mail_whitelist'];
218
		var listToDisables3 = ['mail_server','mail_mdp2','mail_mdp','mail_address','mail_type','admin_enable','admin_address','mail_whitelist'];
210
		var formSubmit = document.querySelector('form input[type="submit"]');
219
		var formSubmit = document.querySelector('form input[type="submit"]');
211
		var btn_checkConf = document.getElementById('btn-checkconf');
220
		var btn_checkConf = document.getElementById('btn-checkconf');
212
		var isChecked = false;
221
		var isChecked = false;
213
		if (document.getElementById('auth_enable').value === '1') {
222
		if (document.getElementById('auth_enable').value === 'on') {
214
			for (var i=0; i<listToDisables1.length; i++) {
223
			for (var i=0; i<listToDisables1.length; i++) {
215
				document.getElementById(listToDisables1[i]).style.backgroundColor = '#c0c0c0';
224
				document.getElementById(listToDisables1[i]).style.backgroundColor = '#c0c0c0';
216
				document.getElementById(listToDisables1[i]).disabled = true;
225
				document.getElementById(listToDisables1[i]).disabled = true;
217
			}
226
			}
218
			for (var i=0; i<listToDisables2.length; i++) {
227
			for (var i=0; i<listToDisables2.length; i++) {
Line 223... Line 232...
223
				document.getElementById(listToDisables3[i]).style.backgroundColor = '#c0c0c0';
232
				document.getElementById(listToDisables3[i]).style.backgroundColor = '#c0c0c0';
224
				document.getElementById(listToDisables3[i]).disabled = true;
233
				document.getElementById(listToDisables3[i]).disabled = true;
225
			}
234
			}
226
			document.getElementById('mail_type').style.backgroundColor = null;
235
			document.getElementById('mail_type').style.backgroundColor = null;
227
			document.getElementById('mail_type').disabled = false;
236
			document.getElementById('mail_type').disabled = false;
228
			if (document.getElementById('mail_type').value === '1') {
237
			if (document.getElementById('mail_type').value === 'on') {
229
				for (var i=0; i<listToDisables1.length; i++) {
238
				for (var i=0; i<listToDisables1.length; i++) {
230
				document.getElementById(listToDisables1[i]).style.backgroundColor = null;
239
				document.getElementById(listToDisables1[i]).style.backgroundColor = null;
231
				document.getElementById(listToDisables1[i]).disabled = false;
240
				document.getElementById(listToDisables1[i]).disabled = false;
232
				}
241
				}
233
				if (document.getElementById('admin_enable').value === '0') {
242
				if (document.getElementById('admin_enable').value === '0') {
Line 276... Line 285...
276
	}
285
	}
277
	</script>
286
	</script>
278
</head>
287
</head>
279
<body onLoad="onMailStatusChange();">
288
<body onLoad="onMailStatusChange();">
280
	<div class="panel">
289
	<div class="panel">
281
		<div class="panel-header"><?= "Authentication Mail" ?></div>
290
		<div class="panel-header"><?= $l_mail_title ?></div>
282
		<div class="panel-body">
291
		<div class="panel-body">
283
			<form id="form-config_mail" name="config_mail" method="POST" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>" enctype="multipart/form-data">
292
			<form id="form-config_mail" name="config_mail" method="POST" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>" enctype="multipart/form-data">
284
				<fieldset>
293
				<fieldset>
285
					<legend>
294
					<legend>
286
						<br>
295
						<br>
287
						<div style="text-align: center">
296
						<div style="text-align: center">
288
						</div>
297
						</div>
289
					</legend>
298
					</legend>
290
					<dl>
299
					<dl>
291
						<dt>
300
						<dt>
292
							<label for="auth_enable"><?= "Activer l'authentification par mail :" ?></label>
301
							<label for="auth_enable"><?= $l_mail_registration ?></label>
293
						</dt>
302
						</dt>
294
						<dd>
303
						<dd>
295
							<select id="auth_enable" name="auth_enable" onchange="onMailStatusChange();">
304
							<select id="auth_enable" name="auth_enable" onchange="onMailStatusChange();">
296
								<option value="1"<?= ($mail_status)  ? ' selected="selected"' : '' ?>><?= $l_mail_YES ?></option>
305
								<option value="on"<?= ($mail_status == 'on')  ? ' selected="selected"' : '' ?>><?= $l_mail_YES ?></option>
297
								<option value="0"<?= (!$mail_status) ? ' selected="selected"' : '' ?>><?= $l_mail_NO ?></option>
306
								<option value="off"<?= ($mail_status == 'off') ? ' selected="selected"' : '' ?>><?= $l_mail_NO ?></option>
298
							</select>
307
							</select>
299
						</dd>
308
						</dd>
300
					</dl>
309
					</dl>
301
					<dl>
310
					<dl>
302
						<dt>
311
						<dt>
303
							<label for="mail_type"><?= "Type Messagerie" ?></label><br>
312
							<label for="mail_type"><?= $l_mail_choice ?></label><br>
304
							<?= "Choississez le type de messagerie a utiliser" ?><br>
-
 
305
						</dt>
313
						</dt>
306
						<dd>
314
						<dd>
307
							<select id="mail_type" name="mail_type" onchange="onMailStatusChange();">
315
							<select id="mail_type" name="mail_type" onchange="onMailStatusChange();">
308
								<option value=1>Nom de domaine</option>
316
								<option value=1><?= $l_use_internal_server ?></option>
309
								<option value=2>Serveur mail ou serveur SMTP</option>
317
								<option value=2><?= $l_use_external_server ?></option>
310
								<option value=3>Adresse de messagerie</option>
318
								<option value=3><?= $l_use_email_address ?></option>
311
							</select>
319
							</select>
312
						</dd>
320
						</dd>
313
					</dl>
321
					</dl>
314
					<dl>
322
					<dl>
315
						<dt>
323
						<dt>
316
							<label for="mail_address"><?= "Adresse Messagerie"?></label><br>
324
							<label for="mail_address"><?= $l_email_address ?></label><br>
317
							<?= "Adresse de messagerie utilisé pour l'envoi" ?>
-
 
318
						</dt>
325
						</dt>
319
						<dd>
326
						<dd>
320
							<input type="text" id="mail_address" size="40" name="mail_address" value="<?= $mail_address_mail ?>" oninput="onMailStatusChange();"> 
327
							<input type="text" id="mail_address" size="40" name="mail_address" value="<?= $mail_address_mail ?>" oninput="onMailStatusChange();"> 
321
						</dd>
328
						</dd>
322
					</dl>
329
					</dl>
323
					<dl>
330
					<dl>
324
						<dt>
331
						<dt>
325
							<label for="mail_mdp"><?= "Mot de passe Messagerie"?></label><br>
332
							<label for="mail_mdp"><?= $l_email_password ?></label><br>
326
							<?= "Mot de passe de la messagerie utilisé pour l'envoi" ?>
-
 
327
						</dt>
333
						</dt>
328
						<dd>
334
						<dd>
329
							<input type="text" id="mail_mdp" size="40" name="mail_mdp" value="<?= $mail_password_mail ?>" oninput="onMailStatusChange();"> 
335
							<input type="text" id="mail_mdp" size="40" name="mail_mdp" value="<?= $mail_password_mail ?>" oninput="onMailStatusChange();"> 
330
						</dd>
336
						</dd>
331
					</dl>
337
					</dl>
332
					<dl>
338
					<dl>
333
						<dt>
339
						<dt>
334
							<label for="mail_mdp2"><?= "Confirmer Mot de passe Messagerie"?></label><br>
340
							<label for="mail_mdp2"><?= $l_email_password_confirm ?></label><br>
335
							<?= "Confirmer le mot de passe de la messagerie utilisé pour l'envoi" ?>
-
 
336
						</dt>
341
						</dt>
337
						<dd>
342
						<dd>
338
							<input type="text" id="mail_mdp2" size="40" name="mail_mdp2" value="<?= $mail_password_mail_2 ?>" oninput="onMailStatusChange();"> 
343
							<input type="text" id="mail_mdp2" size="40" name="mail_mdp2" value="<?= $mail_password_mail_2 ?>" oninput="onMailStatusChange();"> 
339
						</dd>
344
						</dd>
340
					</dl>
345
					</dl>
341
					<dl>
346
					<dl>
342
						<dt>
347
						<dt>
343
							<label for="mail_server"><?= "CHoix Serveur SMTP" ?></label><br>
348
							<label for="mail_server"><?= $l_mail_service ?></label><br>
344
							<?= "Choissisiez le serveur SMTP correspondant à l'adress de messagerie" ?><br>
-
 
345
						</dt>
349
						</dt>
346
						<dd>
350
						<dd>
347
							<select id="mail_server" name="mail_server" onchange="onMailStatusChange();">
351
							<select id="mail_server" name="mail_server" onchange="onMailStatusChange();">
348
								<option value=1>Orange/Wanadoo</option>
352
								<option value=1>Orange/Wanadoo</option>
349
								<option value=2>Hotmail</option>
353
								<option value=2>Hotmail</option>
Line 394... Line 398...
394
						<dd>
398
						<dd>
395
							<input type="text" id="mail_whitelist" size="40" name="mail_whitelist" value="<?= $mail_whitelist ?>" oninput="onMailStatusChange();"> 
399
							<input type="text" id="mail_whitelist" size="40" name="mail_whitelist" value="<?= $mail_whitelist ?>" oninput="onMailStatusChange();"> 
396
						</dd>
400
						</dd>
397
					</dl>
401
					</dl>
398
					<p>
402
					<p>
399
						<!--<button id="btn-checkconf" onclick="checkConfig(); return false;"><?= $l_check ?></button>-->
-
 
400
						<input id="submit" type="submit" value="<?= $l_mail_submit ?>" name="submit">
403
						<input id="submit" type="submit" value="<?= $l_mail_submit ?>" name="submit">
401
					</p>
404
					</p>
402
				</fieldset>
405
				</fieldset>
403
			</form>
406
			</form>
404
		</div>
407
		</div>