Subversion Repositories ALCASAR

Rev

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

Rev 2013 Rev 2016
Line 34... Line 34...
34
	$l_ip_dns2		= "DNS2";
34
	$l_ip_dns2		= "DNS2";
35
	$l_dhcp_title		= "Service DHCP";
35
	$l_dhcp_title		= "Service DHCP";
36
	$l_dhcp_state		= "Mode actuel";
36
	$l_dhcp_state		= "Mode actuel";
37
	$l_DHCP_on		= "actif";
37
	$l_DHCP_on		= "actif";
38
	$l_DHCP_off		= "inactif";
38
	$l_DHCP_off		= "inactif";
39
	$l_chilliNTP_on		= "actif";
-
 
40
	$l_chilliNTP_off	= "inactif";
-
 
41
	$l_chilliNTP_explain	= "Activer l'option NTP dans les requêtes DHCP de coova-chilli ?<br> si oui, vous devez spécifier l'addresse IP du serveur NTP dans le fichier '/usr/local/etc/alcasar.conf' et changer la valeur de CHILLI_NTP_IP par l'ip de votre serveur NTP. Ensuite rendez le NTP 'actif' et appliquez.";
-
 
42
	$l_DHCP_off_explain	= "! Avant d'arrêter le serveur DHCP, vous devez renseigner les paramètres d'un serveur externe (cf. documentation).";
39
	$l_DHCP_off_explain	= "! Avant d'arrêter le serveur DHCP, vous devez renseigner les paramètres d'un serveur externe (cf. documentation).";
43
	$l_DHCP_explain		= "Activer le DHCP";
-
 
44
	$l_static_dhcp_title	= "Réservation d'adresses IP statiques";
40
	$l_static_dhcp_title	= "Réservation d'adresses IP statiques";
45
	$l_mac_address		= "Adresse MAC";
41
	$l_mac_address		= "Adresse MAC";
46
	$l_ip_address		= "Adresse IP";
42
	$l_ip_address		= "Adresse IP";
47
	$l_host_name		= "Nom d'hôte";
43
	$l_host_name		= "Nom d'hôte";
48
	$l_del			= "Supprimer de la liste";
44
	$l_del			= "Supprimer de la liste";
Line 71... Line 67...
71
	$l_dhcp_title		= "DHCP service";
67
	$l_dhcp_title		= "DHCP service";
72
	$l_dhcp_state		= "Current mode";
68
	$l_dhcp_state		= "Current mode";
73
	$l_DHCP_on		= "enabled";
69
	$l_DHCP_on		= "enabled";
74
	$l_DHCP_off		= "disabled";
70
	$l_DHCP_off		= "disabled";
75
	$l_DHCP_off_explain	= "! Before disabling the DHCP server, you must write the extern DHCP parameters in the config file (see Documentation)";
71
	$l_DHCP_off_explain	= "! Before disabling the DHCP server, you must write the extern DHCP parameters in the config file (see Documentation)";
76
	$l_DHCP_explain		= "Enable DHCP";
-
 
77
	$l_chilliNTP_on		= "enabled";
-
 
78
	$l_chilliNTP_off	= "disabled";
-
 
79
	$l_chilliNTP_explain	= "Would you like to enable NTP option in DHCP request of coova-chilli?<br> You have to specify IP address of NTP server in this file '/usr/local/etc/alcasar.conf' and change the value of CHILLI_NTP_IP by @IP of NTP server. Then select 'enabled' and 'Apply change'.";
-
 
80
	$l_static_dhcp_title	= "Static IP addresses reservation";
72
	$l_static_dhcp_title	= "Static IP addresses reservation";
81
	$l_mac_address		= "MAC Address";
73
	$l_mac_address		= "MAC Address";
82
	$l_ip_address		= "IP Address";
74
	$l_ip_address		= "IP Address";
83
	$l_host_name		= "Host name";
75
	$l_host_name		= "Host name";
84
	$l_del			= "Delete from list";
76
	$l_del			= "Delete from list";
Line 96... Line 88...
96
 
88
 
97
}
89
}
98
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
90
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
99
switch ($choix)
91
switch ($choix)
100
{
92
{
101
case 'chilliNTP_On' :
-
 
102
	exec ("sudo /usr/local/bin/alcasar-chilli_ntp.sh -on");
-
 
103
	break;
-
 
104
case 'chilliNTP_Off' :
-
 
105
	exec ("sudo /usr/local/bin/alcasar-chilli_ntp.sh -off");
-
 
106
	break;
-
 
107
case 'DHCP_On' :
93
case 'DHCP_On' :
108
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -on");
94
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -on");
109
	break;
95
	break;
110
case 'DHCP_Off' :
96
case 'DHCP_Off' :
111
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -off");
97
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -off");
Line 373... Line 359...
373
<tr><td colspan="2" valign="middle" align="left">
359
<tr><td colspan="2" valign="middle" align="left">
374
<?
360
<?
375
$dhcp_state=trim($conf["DHCP"]);
361
$dhcp_state=trim($conf["DHCP"]);
376
echo "<CENTER><H3>$l_dhcp_state : ${"l_DHCP_".$dhcp_state}</H3></CENTER>";
362
echo "<CENTER><H3>$l_dhcp_state : ${"l_DHCP_".$dhcp_state}</H3></CENTER>";
377
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
363
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
378
echo "<br><b>$l_DHCP_explain : </b><br>";
-
 
379
echo "<select name='choix'>";
364
echo "<select name='choix'>";
380
echo "<option value=\"DHCP_Off\" ";if (!strcmp($dhcp_state,"off")) echo "selected";echo ">$l_DHCP_off";
365
echo "<option value=\"DHCP_Off\" ";if (!strcmp($dhcp_state,"off")) echo "selected";echo ">$l_DHCP_off";
381
echo "<option value=\"DHCP_On\" ";if (!strcmp($dhcp_state,"on")) echo "selected";echo ">$l_DHCP_on";
366
echo "<option value=\"DHCP_On\" ";if (!strcmp($dhcp_state,"on")) echo "selected";echo ">$l_DHCP_on";
382
echo "</select>";
367
echo "</select>";
-
 
368
echo "<input type=submit value='$l_apply'>";
-
 
369
echo "<br>$l_DHCP_off_explain";
383
 
370
 
384
echo "<br>$l_DHCP_off_explain<br>";
-
 
385
 
-
 
386
//DHCP option NTP (as known as 'option 42') with coovachilli
-
 
387
if (!strcmp($dhcp_state,"on"))
-
 
388
{
-
 
389
$chilliNTP_state=trim($conf["CHILLI_NTP_ENABLED"]);
-
 
390
echo "<br><b>$l_chilliNTP_explain : </b><br>";
-
 
391
echo "<select name='chilliNTP_choix'>";
-
 
392
echo "<option value=\"chilliNTP_Off\" ";if (!strcmp($chilliNTP_state,"off")) echo "selected";echo ">$l_chilliNTP_off";
-
 
393
echo "<option value=\"chilliNTP_On\" ";if (!strcmp($chilliNTP_state,"on")) echo "selected";echo ">$l_chilliNTP_on";
-
 
394
echo "</select>";
-
 
395
}
-
 
396
 
-
 
397
echo "<br><br><input type=submit value='$l_apply'>";
-
 
398
echo "</FORM>";
371
echo "</FORM>";
399
echo "</td></tr>";
372
echo "</td></tr>";
400
if (strncmp($conf["DHCP"],"on",2) == 0) { require ('network2.php');}
373
if (strncmp($conf["DHCP"],"on",2) == 0) { require ('network2.php');}
401
else { echo "</TABLE>"; }
374
else { echo "</TABLE>"; }
402
$maxsize=100000;
375
$maxsize=100000;