Subversion Repositories ALCASAR

Rev

Rev 308 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
286 richard 1
<?php
2
function echo_file ($filename)
3
	{
4
	if (file_exists($filename))
5
		{
6
		if (filesize($filename) != 0)
7
			{
8
			$pointeur=fopen($filename,"r");
9
			$tampon = fread($pointeur, filesize($filename));
10
			fclose($pointeur);
11
			echo $tampon;
12
			}
13
		}
14
	else
15
		{
311 richard 16
		echo "$l_error_openfile $filename";
286 richard 17
		}
18
	}
19
?>
311 richard 20
<table width="100%" border="0" cellspacing="0" cellpadding="0">
21
	<tr><th><?php echo $l_main_bl; ?></th></tr>
22
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
23
</table>
286 richard 24
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
311 richard 25
<tr><td valign="middle" align="left" colspan=10>
308 richard 26
<FORM action='/admin/dns_filter.php' method=POST>
286 richard 27
<input type='hidden' name='choix' value='MAJ_bl'>
28
<?php
311 richard 29
echo "<center>$l_bl_version";
286 richard 30
echo_file ("/var/www/html/VERSION-BL");
311 richard 31
echo "</center><BR>";
286 richard 32
echo "<input type='submit' value='$l_download'>";
33
echo " ($l_warning)";
34
?>
35
</FORM>
36
</td></tr>
311 richard 37
<tr><td valign="middle" align="left" colspan=10>
38
<FORM action='/admin/dns_filter.php' method=POST>
39
<input type='hidden' name='choix' value='MAJ_OSSI'>
40
<?php
41
echo "<center>$l_bl_categories</center></td></tr>";
42
//on lit et on interprete le fichier de catégories
43
$cols=1; $filename="/usr/local/etc/alcasar-bl-categories-available";
44
if (file_exists($filename))
45
	{
46
	$pointeur=fopen($filename,"r");
47
	while (!feof ($pointeur))
48
		{
49
		$ligne=fgets($pointeur, 4096);
50
		if ($ligne)
51
			{
52
			if ($cols == 1) { echo "<tr>";}
53
			$categorie=trim(basename($ligne));
54
			echo "<td>$categorie<br>";
55
			echo "<input type='checkbox' name='chk-$categorie'";
56
			// si la ligne est commentée -> categorie non selectionnée
57
			if (preg_match('/^#/',$ligne, $r)) {
58
				echo ">";}
59
			else {
60
				echo "checked>";}
61
				echo "</td>";
62
 
63
			}
64
			$cols++;
65
			if ($cols > 10){
66
				echo "</tr>";
67
				$cols=1;
68
			}
69
		}
70
	fclose($pointeur);
71
	echo "<tr><td colspan=10><input type='submit' value='$l_record'>";
72
	}
73
else	{
74
	echo "$l_error_open_file $filename";
75
	}
76
?>
77
</FORM>
78
</td></tr>
286 richard 79
</TABLE>
311 richard 80
<table width="100%" border="0" cellspacing="0" cellpadding="0">
81
	<tr><th><?php echo $l_secondary_bl; ?></th></tr>
82
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
83
</table>
286 richard 84
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
308 richard 85
<FORM action='/admin/dns_filter.php' method='POST'>
311 richard 86
<tr><td width=50% align=center>
87
<?php echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain";
88
echo "<textarea name='OSSI_bl_domains' rows=5 cols=40>";
286 richard 89
echo_file ("/etc/dansguardian/lists/blacklists/ossi/domains");
311 richard 90
echo "</textarea></td><td  width=50% align=center>";
91
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns";
92
echo "<textarea name='OSSI_wl_domains' rows=5 cols=40>";
286 richard 93
echo_file ("/etc/dansguardian/lists/exceptionsitelist");
311 richard 94
echo "</textarea></td></tr><tr><td width=50% align=center>";
95
echo "<H3>$l_forbidden_url</H3>$l_forbidden_url_explain";
96
echo "<textarea name='OSSI_bl_urls' rows=5 cols=40>";
286 richard 97
echo_file ("/etc/dansguardian/lists/blacklists/ossi/urls");
311 richard 98
echo "</textarea></td><td  width=50% align=center>";
99
echo "<H3>$l_rehabilitated_url</H3>$l_rehabilitated_url_explain<BR>$l_one_url";
100
echo "<textarea name='OSSI_wl_urls' rows=5 cols=40>";
286 richard 101
echo_file ("/etc/dansguardian/lists/exceptionurllist");
102
?>
103
</textarea>
104
</td></tr>
311 richard 105
<tr><td colspan=2>
286 richard 106
<input type='hidden' name='choix' value='MAJ_OSSI'>
311 richard 107
<input type='submit' value='<?php echo "$l_record"; ?>'>
286 richard 108
</FORM>
109
</td></tr>
110
</TABLE>