Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1732 → Rev 1733

/web/acc/admin/network.php
2,7 → 2,7
/* written by steweb57 & Rexy */
 
/********************
* CONF FILES EXIST *
* TEST CONF FILES *
*********************/
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
define ("ETHERS_FILE", "/usr/local/etc/alcasar-ethers");
24,12 → 24,12
$l_extif_legend = " (Interface connectée à Internet)";
$l_intif_legend = " (Réseau de consultation)";
$l_internet_legend = "INTERNET";
$l_ip_adr = "Adresse IP";
$l_ip_mask = "Masque";
$l_ip_adr = "Adresse IP";
$l_ip_mask = "Masque";
$l_ip_router = "Passerelle";
$l_ip_public = "Adresse IP publique";
$l_ip_dns1 = "DNS1";
$l_ip_dns2 = "DNS2";
$l_ip_dns1 = "DNS1";
$l_ip_dns2 = "DNS2";
$l_dhcp_title = "Service DHCP";
$l_dhcp_state = "Mode actuel";
$l_DHCP_on = "actif";
38,9 → 38,14
$l_static_dhcp_title = "Réservation d'adresses IP statiques";
$l_mac_address = "Adresse MAC";
$l_ip_address = "Adresse IP";
$l_mac_del = "Supprimer de la liste";
$l_mac_del = "Supprimer de la liste";
$l_add_to_list = "Ajouter";
$l_apply = "Appliquer les changements";
$l_apply = "Appliquer les changements";
$l_import_cert = "Import de certificat";
$l_private_key = "Clé privée (.key) :";
$l_certificate = "Certificat (.crt) :";
$l_server_chain = "Server-chain (Si nécéssaire : .crt) :";
$l_default_cert = "Retourner aux certificat par défaut";
 
} else {
$l_network_title = "Network configuration";
47,12 → 52,12
$l_extif_legend = " (Internet connected interface)";
$l_intif_legend = " (Private network)";
$l_internet_legend = "INTERNET";
$l_ip_adr = "IP Address";
$l_ip_mask = "Mask";
$l_ip_adr = "IP Address";
$l_ip_mask = "Mask";
$l_ip_router = "Gateway";
$l_ip_public = "Public IP address";
$l_ip_dns1 = "DNS1 :";
$l_ip_dns2 = "DNS2";
$l_ip_dns1 = "DNS1";
$l_ip_dns2 = "DNS2";
$l_dhcp_title = "DHCP service";
$l_dhcp_state = "Current mode";
$l_DHCP_on = "enabled";
61,9 → 66,14
$l_static_dhcp_title = "Static IP addresses reservation";
$l_mac_address = "MAC Address";
$l_ip_address = "IP Address";
$l_mac_del = "Delete from list";
$l_mac_del = "Delete from list";
$l_add_to_list = "Add";
$l_apply = "Apply changes";
$l_apply = "Apply changes";
$l_import_cert = "Certificate import";
$l_private_key = "Private key (.key) :";
$l_certificate = "Certificate (.crt) :";
$l_server_chain = "Server-chain (If necessary : .crt) :";
$l_default_cert = "Back to default certificate";
}
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
switch ($choix)
97,7 → 107,7
}
}
}
if ($insert == "True")
if ($insert == "True")
{
$line = trim($_POST['add_mac']) . " " . trim($_POST['add_ip']) . "\n";
$pointeur=fopen(ETHERS_FILE,"a");
139,7 → 149,7
$port = "80";
//var $num; //not used
//var $error; //not used
 
if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
return false;
} else {
254,22 → 264,22
?>
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Import de certificat</th></tr>
<tr><th><?php echo $l_import_cert;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr><td>
<form method="post" action="network.php" enctype="multipart/form-data">
Clé privée (.key): <input type="file" name="key"/><br/>
Certificat (.crt):<input type="file" name="crt"/><br/>
Server-chain (Recommandé : .crt):<input type="file" name="sc"/>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $maxsize ?>" /><br/>
<?php echo $l_private_key;?><input type="file" name="key"/><br/>
<?php echo $l_certificate;?><input type="file" name="crt"/><br/>
<?php echo $l_server_chain;?><input type="file" name="sc"/>
<input type="hidden" name="MAX_FILE_SIZE" value=<?php echo $maxsize;?> /><br/>
<input type="submit" value="Valider"/>
</form>
</td><td>
<form method="post" action="network.php">
<input type="hidden" name="default"/>
<input type="submit" value="Retourner aux certificats par défaut"/>
<input type="submit" <?php echo "value=\"".$l_default_cert."\""?>/>
</form>
</td>
</tr>
281,7 → 291,7
<?php
if(isset($_POST['default'])){
echo "Retour au certificats par défaut";
exec("sudo alcasar-defaultcert.sh");
exec("sudo alcasar-importcert.sh -d");
}
if(isset($_POST['MAX_FILE_SIZE'])){
echo "changement";
308,4 → 318,3
}
}
?>