Subversion Repositories ALCASAR

Rev

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

Rev 1339 Rev 1377
Line 12... Line 12...
12
$Language = 'en';
12
$Language = 'en';
13
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
13
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
14
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
14
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
15
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
15
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
16
if($Language == 'fr'){
16
if($Language == 'fr'){
17
  $l_title_antivir = "Antivirus de flux WEB";
-
 
18
  $l_antivir_on="L'antivirus de flux WEB est actuellement activé";
-
 
19
  $l_antivir_off="L'antivirus de flux WEB est actuellement désactivé";
-
 
20
  $l_switch_antivir_on="Activer l'antivirus";
-
 
21
  $l_switch_antivir_off="Désactiver l'antivirus";
-
 
22
  $l_remove="Retirer de la liste";
17
  $l_remove="Retirer de la liste";
23
  $l_title_proto = "Filtrage de protocoles réseau";
18
  $l_title_proto = "Filtrage de protocoles réseau";
24
  $l_netfilter_on="Le filtrage de protocoles réseau est actuellement activé";
19
  $l_netfilter_on="Le filtrage de protocoles réseau est actuellement activé";
25
  $l_netfilter_off="Le filtrage de protocoles réseau est actuellement désactiv&eacute";
20
  $l_netfilter_off="Le filtrage de protocoles réseau est actuellement désactiv&eacute";
26
  $l_switch_on="Activer le filtrage";
21
  $l_switch_on="Activer le filtrage";
Line 34... Line 29...
34
  $l_enabled="Autorisé";
29
  $l_enabled="Autorisé";
35
  $l_add_to_list="Ajouter à la liste";
30
  $l_add_to_list="Ajouter à la liste";
36
  $l_save="Enregistrer les modifications";
31
  $l_save="Enregistrer les modifications";
37
}
32
}
38
else {
33
else {
39
  $l_title_antivir = "WEB antivirus";
-
 
40
  $l_antivir_on="Actually, the WEB antivirus is on";
-
 
41
  $l_antivir_off="Actually, the WEB antivirus is off";
-
 
42
  $l_switch_antivir_on="Switch the antivirus on";
-
 
43
  $l_switch_antivir_off="Switch the antivirus off";
-
 
44
  $l_remove="Remove from list";
34
  $l_remove="Remove from list";
45
  $l_title_proto = "Network protocols filter";
35
  $l_title_proto = "Network protocols filter";
46
  $l_netfilter_on="Actually, the network protocols filter is enable";
36
  $l_netfilter_on="Actually, the network protocols filter is enable";
47
  $l_netfilter_off="Actually, the network protocols filter is disable";
37
  $l_netfilter_off="Actually, the network protocols filter is disable";
48
  $l_switch_on="Switch the Filter on";
38
  $l_switch_on="Switch the Filter on";
Line 87... Line 77...
87
}
77
}
88
 
78
 
89
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
79
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
90
switch ($choix)
80
switch ($choix)
91
{
81
{
92
case 'AV_On' :
-
 
93
	exec ("sudo /usr/local/sbin/alcasar-havp.sh -on");
-
 
94
	break;
-
 
95
case 'AV_Off' :
-
 
96
	exec ("sudo /usr/local/sbin/alcasar-havp.sh -off");
-
 
97
	break;
-
 
98
case 'NF_On' :
82
case 'NF_On' :
99
	exec ("sudo /usr/local/sbin/alcasar-nf.sh -on");
83
	exec ("sudo /usr/local/sbin/alcasar-nf.sh -on");
100
	break;
84
	break;
101
case 'NF_Off' :
85
case 'NF_Off' :
102
	exec ("sudo /usr/local/sbin/alcasar-nf.sh -off");
86
	exec ("sudo /usr/local/sbin/alcasar-nf.sh -off");
Line 176... Line 160...
176
		{
160
		{
177
		foreach ($tab as $line)
161
		foreach ($tab as $line)
178
			{
162
			{
179
			$field=explode("=", $line);
163
			$field=explode("=", $line);
180
			if ($field[0] == "PROTOCOLS_FILTERING")	{$PROTOCOLS_FILTERING=trim($field[1]);}
164
			if ($field[0] == "PROTOCOLS_FILTERING")	{$PROTOCOLS_FILTERING=trim($field[1]);}
181
			if ($field[0] == "WEB_ANTIVIRUS")	{$WEB_ANTIVIRUS=trim($field[1]);}
-
 
182
			}
165
			}
183
		}
166
		}
184
	}
167
	}
185
echo "<tr><th>$l_title_antivir</th></tr>";
-
 
186
?>
168
?>
187
<tr bgcolor=#FFCC66><td><img src=/images/pix.gif width=1 height=2></td></tr>
-
 
188
</TABLE>
-
 
189
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
-
 
190
	<tr><td valign="middle" align="left">
-
 
191
<?php
-
 
192
if ($WEB_ANTIVIRUS == "on")
-
 
193
	{
-
 
194
	echo "<CENTER><H3>$l_antivir_on</H3></CENTER>";
-
 
195
 	echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
-
 
196
	echo "<input type=hidden name='choix' value=\"AV_Off\">";
-
 
197
	echo "<input type=submit value=\"$l_switch_antivir_off\">";
-
 
198
}
-
 
199
else
-
 
200
	{
-
 
201
	echo "<CENTER><H3>$l_antivir_off</H3></CENTER>";
-
 
202
 	echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
-
 
203
	echo "<input type=hidden name='choix' value=\"AV_On\">";
-
 
204
	echo "<input type=submit value=\"$l_switch_antivir_on\">";
-
 
205
	}
-
 
206
?>
-
 
207
</FORM>
-
 
208
</td></tr>
-
 
209
</table>
-
 
210
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
169
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
211
<tr><th><?echo "$l_title_proto";?></th></tr>
170
<tr><th><?echo "$l_title_proto";?></th></tr>
212
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
171
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
213
</table>
172
</table>
214
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
173
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>