Subversion Repositories ALCASAR

Rev

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

Rev 860 Rev 861
Line 37... Line 37...
37
  $l_error_open_file="Erreur d'ouverture du fichier";
37
  $l_error_open_file="Erreur d'ouverture du fichier";
38
  $l_port="Numéro de port";
38
  $l_port="Numéro de port";
39
  $l_proto="Nom du protocole";
39
  $l_proto="Nom du protocole";
40
  $l_enabled="Autorisé";
40
  $l_enabled="Autorisé";
41
  $l_add_to_list="Ajouter à la liste";
41
  $l_add_to_list="Ajouter à la liste";
42
  $l_save_modif="Enregistrer les modifications";
42
  $l_save="Enregistrer les modifications";
43
}
43
}
44
else {
44
else {
45
  $l_title_antivir = "WEB antivirus";
45
  $l_title_antivir = "WEB antivirus";
46
  $l_antivir_on="Actually, the WEB antivirus is on";
46
  $l_antivir_on="Actually, the WEB antivirus is on";
47
  $l_antivir_off="Actually, the WEB antivirus is off";
47
  $l_antivir_off="Actually, the WEB antivirus is off";
Line 66... Line 66...
66
  $l_error_open_file="Error opening the file";
66
  $l_error_open_file="Error opening the file";
67
  $l_port="Port number";
67
  $l_port="Port number";
68
  $l_proto="protocol name";
68
  $l_proto="protocol name";
69
  $l_enabled="Authorized";
69
  $l_enabled="Authorized";
70
  $l_add_to_list="Add to the list";
70
  $l_add_to_list="Add to the list";
71
  $l_save_modif="Save modifications";
71
  $l_save="Save changes";
72
}
72
}
73
/********************
73
/********************
74
*  TEST CONF FILES  *
74
*  TEST CONF FILES  *
75
*********************/
75
*********************/
76
define ("SERVICES_LIST", "/usr/local/etc/alcasar-services");
76
define ("SERVICES_LIST", "/usr/local/etc/alcasar-services");
Line 81... Line 81...
81
if (!file_exists($file)){
81
if (!file_exists($file)){
82
	exit("Requested file ".$file." isn't present");}
82
	exit("Requested file ".$file." isn't present");}
83
if (!is_readable($file)){
83
if (!is_readable($file)){
84
	exit("Can't read the file ".$file);}
84
	exit("Can't read the file ".$file);}
85
}
85
}
-
 
86
/**********************************
-
 
87
*	Read ALCASAR CONF_FILE    *
-
 
88
***********************************/
-
 
89
$ouvre=fopen(CONF_FILE,"r");
-
 
90
if ($ouvre){
-
 
91
	while (!feof ($ouvre))
-
 
92
	{
-
 
93
		$tampon = fgets($ouvre, 4096);
-
 
94
		if (strpos($tampon,"=")!==false){
-
 
95
			$tmp = explode("=",$tampon);
-
 
96
			$conf[$tmp[0]] = $tmp[1];
-
 
97
		}
-
 
98
	}
-
 
99
}else{
-
 
100
	exit("Erreur d'ouverture du fichier ".CONF_FILE);
-
 
101
}
-
 
102
fclose($ouvre);
86
 
103
 
87
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
104
if (isset($_POST['choix'])){$choix=$_POST['choix'];} else {$choix="";}
88
switch ($choix)
105
switch ($choix)
89
{
106
{
90
case 'AV_On' :
107
case 'AV_On' :
Line 302... Line 319...
302
			echo "<td><input type='checkbox' name='chk-$ip_addr'";
319
			echo "<td><input type='checkbox' name='chk-$ip_addr'";
303
			if (preg_match('/^#/',$line, $r)) {
320
			if (preg_match('/^#/',$line, $r)) {
304
				echo ">";}
321
				echo ">";}
305
			else {
322
			else {
306
				echo "checked>";}
323
				echo "checked>";}
-
 
324
			echo "<td>";
-
 
325
			if (strcmp (trim($ip_addr),trim($conf["PUBLIC_IP"]))) {
307
			echo "<td><input type='checkbox' name='del-$ip_addr'>";
326
				echo "<input type='checkbox' name='del-$ip_addr'>";}
-
 
327
			else {
-
 
328
				echo "&nbsp;";}
308
			echo "</tr>";
329
			echo "</tr>";
309
			}
330
			}
310
		}
331
		}
311
	}
332
	}
312
?>
333
?>
313
</table>
334
</table>
314
<input type='hidden' name='choix' value='change_ip'>
335
<input type='hidden' name='choix' value='change_ip'>
315
<input type='submit' value='<?echo"$l_save_modif";?>'>
336
<input type='submit' value='<?echo"$l_save";?>'>
316
</form></td><td valign='middle' align='center'>
337
</form></td><td valign='middle' align='center'>
317
<form action='<?echo"$_SERVER[PHP_SELF]"?>' method='POST'>
338
<form action='<?echo"$_SERVER[PHP_SELF]"?>' method='POST'>
318
<table cellspacing=2 cellpadding=3 border=1>
339
<table cellspacing=2 cellpadding=3 border=1>
319
<tr><th><?echo"$l_ip_address<th>$l_blocked_ip_address_comment";?>
340
<tr><th><?echo"$l_ip_address<th>$l_blocked_ip_address_comment";?>
320
<td></td></tr>
341
<td></td></tr>