| Line 31... |
Line 31... |
| 31 |
$l_ip_public = "Adresse IP publique";
|
31 |
$l_ip_public = "Adresse IP publique";
|
| 32 |
$l_ip_dns1 = "DNS1";
|
32 |
$l_ip_dns1 = "DNS1";
|
| 33 |
$l_ip_dns2 = "DNS2";
|
33 |
$l_ip_dns2 = "DNS2";
|
| 34 |
$l_dhcp_title = "Service DHCP";
|
34 |
$l_dhcp_title = "Service DHCP";
|
| 35 |
$l_dhcp_state = "Mode actuel";
|
35 |
$l_dhcp_state = "Mode actuel";
|
| 36 |
$l_dhcp_mode = "Les différents modes sont les suivants :";
|
- |
|
| 37 |
$l_DHCP_full = "DHCP complet";
|
- |
|
| 38 |
$l_DHCP_half = "Demi DHCP ";
|
36 |
$l_DHCP_on = "actif";
|
| 39 |
$l_DHCP_off = "Sans DHCP";
|
37 |
$l_DHCP_off = "inactif";
|
| 40 |
$l_DHCP_full_explain = "Le serveur DHCP couvre la totalité des adresses du réseau. Des adresses statiques peuvent être réservées (cf. ci-dessous).";
|
38 |
$l_DHCP_off_explain = "! Avant d'arréter le serveur DHCP, vous devez renseigner les paramêtres d'un serveur externe (cf. documentation).";
|
| 41 |
$l_DHCP_half_explain = "La première moitié du réseau est réservé à l'adressage statique, l'autre moitié est en adressage dynamique (DHCP).";
|
- |
|
| 42 |
$l_DHCP_off_explain = "Le serveur DHCP est arrêté.";
|
- |
|
| 43 |
$l_static_dhcp_title = "Réservation d'adresses IP statiques";
|
39 |
$l_static_dhcp_title = "Réservation d'adresses IP statiques";
|
| 44 |
$l_mac_address = "Adresse MAC";
|
40 |
$l_mac_address = "Adresse MAC";
|
| 45 |
$l_ip_address = "Adresse IP";
|
41 |
$l_ip_address = "Adresse IP";
|
| 46 |
$l_mac_del = "Supprimer de la liste";
|
42 |
$l_mac_del = "Supprimer de la liste";
|
| 47 |
$l_add_to_list = "Ajouter";
|
43 |
$l_add_to_list = "Ajouter";
|
| Line 58... |
Line 54... |
| 58 |
$l_ip_public = "Public IP address";
|
54 |
$l_ip_public = "Public IP address";
|
| 59 |
$l_ip_dns1 = "DNS1 :";
|
55 |
$l_ip_dns1 = "DNS1 :";
|
| 60 |
$l_ip_dns2 = "DNS2";
|
56 |
$l_ip_dns2 = "DNS2";
|
| 61 |
$l_dhcp_title = "DHCP service";
|
57 |
$l_dhcp_title = "DHCP service";
|
| 62 |
$l_dhcp_state = "Current mode";
|
58 |
$l_dhcp_state = "Current mode";
|
| 63 |
$l_dhcp_mode = "The different modes are the following :";
|
- |
|
| 64 |
$l_DHCP_full = "Full DHCP";
|
59 |
$l_DHCP_on = "enabled";
|
| 65 |
$l_DHCP_half = "Half DHCP ";
|
- |
|
| 66 |
$l_DHCP_off = "No DHCP";
|
60 |
$l_DHCP_off = "disabled";
|
| 67 |
$l_DHCP_full_explain = "The DHCP server manage all equipments in DHCP mode. Some static addresses can be reserved (see bellow).";
|
61 |
$l_DHCP_off_explain = "! Before disabling the DHCP server, you must write the extern DHCP parameters in the config file (see Documentation)";
|
| 68 |
$l_DHCP_half_explain = "The first half of LAN's equipments are in static mode, the other are in dynamic mode (DHCP).";
|
- |
|
| 69 |
$l_DHCP_off_explain = "The DHCP server is off.";
|
- |
|
| 70 |
$l_static_dhcp_title = "Static IP addresses reservation";
|
62 |
$l_static_dhcp_title = "Static IP addresses reservation";
|
| 71 |
$l_mac_address = "MAC Address";
|
63 |
$l_mac_address = "MAC Address";
|
| 72 |
$l_ip_address = "IP Address";
|
64 |
$l_ip_address = "IP Address";
|
| 73 |
$l_mac_del = "Delete from list";
|
65 |
$l_mac_del = "Delete from list";
|
| 74 |
$l_add_to_list = "Add";
|
66 |
$l_add_to_list = "Add";
|
| 75 |
$l_apply = "Apply changes";
|
67 |
$l_apply = "Apply changes";
|
| 76 |
}
|
68 |
}
|
| 77 |
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
|
69 |
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
|
| 78 |
switch ($choix)
|
70 |
switch ($choix)
|
| 79 |
{
|
71 |
{
|
| 80 |
case 'DHCP_Full' :
|
72 |
case 'DHCP_On' :
|
| 81 |
exec ("sudo /usr/local/sbin/alcasar-dhcp.sh -full");
|
73 |
exec ("sudo /usr/local/sbin/alcasar-dhcp.sh -on");
|
| 82 |
break;
|
74 |
break;
|
| 83 |
case 'DHCP_Off' :
|
75 |
case 'DHCP_Off' :
|
| 84 |
exec ("sudo /usr/local/sbin/alcasar-dhcp.sh -off");
|
76 |
exec ("sudo /usr/local/sbin/alcasar-dhcp.sh -off");
|
| 85 |
break;
|
77 |
break;
|
| 86 |
case 'DHCP_Half' :
|
- |
|
| 87 |
exec ("sudo /usr/local/sbin/alcasar-dhcp.sh -half");
|
- |
|
| 88 |
break;
|
- |
|
| 89 |
case 'new_mac' :
|
78 |
case 'new_mac' :
|
| 90 |
if ((trim($_POST['add_mac']) != "") and (trim($_POST['add_ip']) != ""))
|
79 |
if ((trim($_POST['add_mac']) != "") and (trim($_POST['add_ip']) != ""))
|
| 91 |
{
|
80 |
{
|
| 92 |
$tab=file(ETHERS_FILE);
|
81 |
$tab=file(ETHERS_FILE);
|
| 93 |
$insert="True";
|
82 |
$insert="True";
|
| Line 249... |
Line 238... |
| 249 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
238 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 250 |
<tr><th><?php echo $l_dhcp_title;?></th></tr>
|
239 |
<tr><th><?php echo $l_dhcp_title;?></th></tr>
|
| 251 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
240 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
|
| 252 |
</table>
|
241 |
</table>
|
| 253 |
<table width="100%" border=1 cellspacing=0 cellpadding=0>
|
242 |
<table width="100%" border=1 cellspacing=0 cellpadding=0>
|
| 254 |
<tr><td valign="middle" align="left">
|
243 |
<tr><td colspan="2" valign="middle" align="left">
|
| 255 |
<?
|
244 |
<?
|
| 256 |
$dhcp_state=trim($conf["DHCP"]);
|
245 |
$dhcp_state=trim($conf["DHCP"]);
|
| 257 |
echo "<CENTER><H3>$l_dhcp_state : ${"l_DHCP_".$dhcp_state}</H3></CENTER>";
|
246 |
echo "<CENTER><H3>$l_dhcp_state : ${"l_DHCP_".$dhcp_state}</H3></CENTER>";
|
| 258 |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
|
247 |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
|
| 259 |
echo "<select name='choix'>";
|
248 |
echo "<select name='choix'>";
|
| 260 |
echo "<option value=\"DHCP_Off\" ";if (!strcmp($dhcp_state,"off")) echo "selected";echo ">$l_DHCP_off";
|
249 |
echo "<option value=\"DHCP_Off\" ";if (!strcmp($dhcp_state,"off")) echo "selected";echo ">$l_DHCP_off";
|
| 261 |
echo "<option value=\"DHCP_Half\" ";if (!strcmp($dhcp_state,"half")) echo "selected";echo ">$l_DHCP_half";
|
- |
|
| 262 |
echo "<option value=\"DHCP_Full\" ";if (!strcmp($dhcp_state,"full")) echo "selected";echo ">$l_DHCP_full";
|
250 |
echo "<option value=\"DHCP_On\" ";if (!strcmp($dhcp_state,"on")) echo "selected";echo ">$l_DHCP_on";
|
| 263 |
echo "</select>";
|
251 |
echo "</select>";
|
| 264 |
echo "<input type=submit value='$l_apply'>";
|
252 |
echo "<input type=submit value='$l_apply'>";
|
| 265 |
echo "<td valign='middle' align='left'><center><H3>$l_dhcp_mode</h3></center>";
|
- |
|
| 266 |
echo "$l_DHCP_off : $l_DHCP_off_explain<br>$l_DHCP_half : $l_DHCP_half_explain<br>$l_DHCP_full : $l_DHCP_full_explain";
|
- |
|
| 267 |
echo "</td>";
|
253 |
echo "<br>$l_DHCP_off_explain";
|
| 268 |
echo "</FORM>";
|
254 |
echo "</FORM>";
|
| 269 |
echo "</td></tr>";
|
255 |
echo "</td></tr>";
|
| 270 |
if (strncmp($conf["DHCP"],"full",2) == 0) { require ('network2.php');}
|
256 |
if (strncmp($conf["DHCP"],"on",2) == 0) { require ('network2.php');}
|
| 271 |
else { echo "</TABLE>"; }
|
257 |
else { echo "</TABLE>"; }
|
| 272 |
?>
|
258 |
?>
|
| 273 |
</body>
|
259 |
</body>
|
| 274 |
</html>
|
260 |
</html>
|