Subversion Repositories ALCASAR

Rev

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

Rev 1733 Rev 1740
Line 42... Line 42...
42
	$l_add_to_list		= "Ajouter";
42
	$l_add_to_list		= "Ajouter";
43
	$l_apply		= "Appliquer les changements";
43
	$l_apply		= "Appliquer les changements";
44
	$l_import_cert		= "Import de certificat";
44
	$l_import_cert		= "Import de certificat";
45
	$l_private_key		= "Clé privée (.key) :";
45
	$l_private_key		= "Clé privée (.key) :";
46
	$l_certificate		= "Certificat (.crt) :";
46
	$l_certificate		= "Certificat (.crt) :";
47
	$l_server_chain		= "Server-chain (Si nécéssaire : .crt) :";
47
	$l_server_chain		= "Chaîne de certification (si nécéssaire : .crt) :";
48
	$l_default_cert		= "Retourner aux certificat par défaut";
48
	$l_default_cert		= "Revenir au certificat d'origine";
-
 
49
	$l_import		= "Importer";
49
 
50
 
50
} else {
51
} else {
51
	$l_network_title	= "Network configuration";
52
	$l_network_title	= "Network configuration";
52
	$l_extif_legend		= " (Internet connected interface)";
53
	$l_extif_legend		= " (Internet connected interface)";
53
	$l_intif_legend		= " (Private network)";
54
	$l_intif_legend		= " (Private network)";
Line 70... Line 71...
70
	$l_add_to_list		= "Add";
71
	$l_add_to_list		= "Add";
71
	$l_apply		= "Apply changes";
72
	$l_apply		= "Apply changes";
72
	$l_import_cert		= "Certificate import";
73
	$l_import_cert		= "Certificate import";
73
	$l_private_key		= "Private key (.key) :";
74
	$l_private_key		= "Private key (.key) :";
74
	$l_certificate		= "Certificate (.crt) :";
75
	$l_certificate		= "Certificate (.crt) :";
75
	$l_server_chain		= "Server-chain (If necessary : .crt) :";
76
	$l_server_chain		= "Server-chain (if necessary : .crt) :";
76
	$l_default_cert		= "Back to default certificate";
77
	$l_default_cert		= "Back to default certificate";
-
 
78
	$l_import		= "Import";
77
}
79
}
78
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
80
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
79
switch ($choix)
81
switch ($choix)
80
{
82
{
81
case 'DHCP_On' :
83
case 'DHCP_On' :
Line 179... Line 181...
179
/************************
181
/************************
180
*	TO DO		*
182
*	TO DO		*
181
*************************/
183
*************************/
182
//modification de la conf réseau  --> V3.0
184
//modification de la conf réseau  --> V3.0
183
 
185
 
-
 
186
?>
184
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
187
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
185
<html><!-- written by steweb57 & rexy -->
188
<html><!-- written by steweb57 & rexy -->
186
<head>
189
<head>
187
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
190
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
188
<title><?php echo $l_network_title; ?></title>
191
<title><?php echo $l_network_title; ?></title>
189
<link rel="stylesheet" href="/css/style.css" type="text/css">
192
<link rel="stylesheet" href="/css/style.css" type="text/css">
Line 268... Line 271...
268
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
271
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
269
</table>
272
</table>
270
<table width="100%" border="1" cellspacing="0" cellpadding="0">
273
<table width="100%" border="1" cellspacing="0" cellpadding="0">
271
	<tr><td>
274
	<tr><td>
272
	<form method="post" action="network.php" enctype="multipart/form-data">
275
	<form method="post" action="network.php" enctype="multipart/form-data">
273
	<?php echo $l_private_key;?><input type="file" name="key"/><br/>
276
	<?php echo $l_private_key;?><input type="file" name="key"><br>
274
	<?php echo $l_certificate;?><input type="file" name="crt"/><br/>
277
	<?php echo $l_certificate;?><input type="file" name="crt"><br>
275
	<?php echo $l_server_chain;?><input type="file" name="sc"/>
278
	<?php echo $l_server_chain;?><input type="file" name="sc">
276
	<input type="hidden" name="MAX_FILE_SIZE" value=<?php echo $maxsize;?> /><br/>
279
	<input type="hidden" name="MAX_FILE_SIZE" value=<?php echo $maxsize;?>><br>
277
	<input type="submit" value="Valider"/>
280
	<input type="submit" <?php echo "value=\"".$l_import."\""?>>
278
	</form>
281
	</form>
279
	</td><td>
282
	</td><td>
280
	<form method="post" action="network.php">
283
	<form method="post" action="network.php">
281
	<input type="hidden" name="default"/>
284
	<input type="hidden" name="default">
282
	<input type="submit" <?php echo "value=\"".$l_default_cert."\""?>/>
285
	<input type="submit" <?php echo "value=\"".$l_default_cert."\""?>>
283
	</form>
286
	</form>
284
	</td>
287
	</td>
285
	</tr>
288
	</tr>
286
</table>
289
</table>
287
 
290
 
288
</body>
291
</body>
289
</html>
292
</html>
290
 
293
 
291
<?php
294
<?php
292
if(isset($_POST['default'])){
295
if(isset($_POST['default'])){
293
	echo "Retour au certificats par défaut";
296
	echo "$l_default_cert";
294
	exec("sudo alcasar-importcert.sh -d");
297
	exec("sudo alcasar-importcert.sh -d");
295
}
298
}
296
if(isset($_POST['MAX_FILE_SIZE'])){
299
if(isset($_POST['MAX_FILE_SIZE'])){
297
	echo "changement";
300
	echo "changement";
298
	$maxsize = 100000;
301
	$maxsize = 100000;
Line 304... Line 307...
304
			{
307
			{
305
				$scpath = "";
308
				$scpath = "";
306
				if(isset($_FILES['sc']) && pathinfo($_FILES['sc']['name'])['extension'] == 'crt')
309
				if(isset($_FILES['sc']) && pathinfo($_FILES['sc']['name'])['extension'] == 'crt')
307
				{
310
				{
308
					$scpath = $dest."server-chain.crt";
311
					$scpath = $dest."server-chain.crt";
309
					move_uploaded_file($_FILES['key']['tmp_name'], $scpath);
312
					move_uploaded_file($_FILES['sc']['tmp_name'], $scpath);
310
				}
313
				}
311
				$keypath = $dest."alcasar.key";
314
				$keypath = $dest."alcasar.key";
312
				$crtpath = $dest."alcasar.crt";
315
				$crtpath = $dest."alcasar.crt";
313
				move_uploaded_file($_FILES['key']['tmp_name'], $keypath);
316
				move_uploaded_file($_FILES['key']['tmp_name'], $keypath);
314
				move_uploaded_file($_FILES['crt']['tmp_name'], $crtpath);
317
				move_uploaded_file($_FILES['crt']['tmp_name'], $crtpath);