Subversion Repositories ALCASAR

Rev

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

Rev 1960 Rev 2013
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.";
39
	$l_DHCP_off_explain	= "! Avant d'arrêter le serveur DHCP, vous devez renseigner les paramètres d'un serveur externe (cf. documentation).";
42
	$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";
40
	$l_static_dhcp_title	= "Réservation d'adresses IP statiques";
44
	$l_static_dhcp_title	= "Réservation d'adresses IP statiques";
41
	$l_mac_address		= "Adresse MAC";
45
	$l_mac_address		= "Adresse MAC";
42
	$l_ip_address		= "Adresse IP";
46
	$l_ip_address		= "Adresse IP";
43
	$l_host_name		= "Nom d'hôte";
47
	$l_host_name		= "Nom d'hôte";
44
	$l_del			= "Supprimer de la liste";
48
	$l_del			= "Supprimer de la liste";
Line 67... Line 71...
67
	$l_dhcp_title		= "DHCP service";
71
	$l_dhcp_title		= "DHCP service";
68
	$l_dhcp_state		= "Current mode";
72
	$l_dhcp_state		= "Current mode";
69
	$l_DHCP_on		= "enabled";
73
	$l_DHCP_on		= "enabled";
70
	$l_DHCP_off		= "disabled";
74
	$l_DHCP_off		= "disabled";
71
	$l_DHCP_off_explain	= "! Before disabling the DHCP server, you must write the extern DHCP parameters in the config file (see Documentation)";
75
	$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'.";
72
	$l_static_dhcp_title	= "Static IP addresses reservation";
80
	$l_static_dhcp_title	= "Static IP addresses reservation";
73
	$l_mac_address		= "MAC Address";
81
	$l_mac_address		= "MAC Address";
74
	$l_ip_address		= "IP Address";
82
	$l_ip_address		= "IP Address";
75
	$l_host_name		= "Host name";
83
	$l_host_name		= "Host name";
76
	$l_del			= "Delete from list";
84
	$l_del			= "Delete from list";
Line 88... Line 96...
88
 
96
 
89
}
97
}
90
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
98
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
91
switch ($choix)
99
switch ($choix)
92
{
100
{
-
 
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;
93
case 'DHCP_On' :
107
case 'DHCP_On' :
94
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -on");
108
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -on");
95
	break;
109
	break;
96
case 'DHCP_Off' :
110
case 'DHCP_Off' :
97
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -off");
111
	exec ("sudo /usr/local/bin/alcasar-dhcp.sh -off");
Line 359... Line 373...
359
<tr><td colspan="2" valign="middle" align="left">
373
<tr><td colspan="2" valign="middle" align="left">
360
<?
374
<?
361
$dhcp_state=trim($conf["DHCP"]);
375
$dhcp_state=trim($conf["DHCP"]);
362
echo "<CENTER><H3>$l_dhcp_state : ${"l_DHCP_".$dhcp_state}</H3></CENTER>";
376
echo "<CENTER><H3>$l_dhcp_state : ${"l_DHCP_".$dhcp_state}</H3></CENTER>";
363
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
377
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
-
 
378
echo "<br><b>$l_DHCP_explain : </b><br>";
364
echo "<select name='choix'>";
379
echo "<select name='choix'>";
365
echo "<option value=\"DHCP_Off\" ";if (!strcmp($dhcp_state,"off")) echo "selected";echo ">$l_DHCP_off";
380
echo "<option value=\"DHCP_Off\" ";if (!strcmp($dhcp_state,"off")) echo "selected";echo ">$l_DHCP_off";
366
echo "<option value=\"DHCP_On\" ";if (!strcmp($dhcp_state,"on")) echo "selected";echo ">$l_DHCP_on";
381
echo "<option value=\"DHCP_On\" ";if (!strcmp($dhcp_state,"on")) echo "selected";echo ">$l_DHCP_on";
367
echo "</select>";
382
echo "</select>";
-
 
383
 
368
echo "<input type=submit value='$l_apply'>";
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"]);
369
echo "<br>$l_DHCP_off_explain";
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'>";
370
echo "</FORM>";
398
echo "</FORM>";
371
echo "</td></tr>";
399
echo "</td></tr>";
372
if (strncmp($conf["DHCP"],"on",2) == 0) { require ('network2.php');}
400
if (strncmp($conf["DHCP"],"on",2) == 0) { require ('network2.php');}
373
else { echo "</TABLE>"; }
401
else { echo "</TABLE>"; }
374
$maxsize=100000;
402
$maxsize=100000;
Line 494... Line 522...
494
			}
522
			}
495
		}
523
		}
496
	}
524
	}
497
}
525
}
498
?>
526
?>
-
 
527