Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
318 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
		{
16
		echo "$l_error_openfile $filename";
17
		}
18
	}
19
?>
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>
24
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
25
<tr><td valign="middle" align="left" colspan=10>
26
<FORM action='dns_filter.php' method=POST>
27
<input type='hidden' name='choix' value='MAJ_bl'>
28
<?php
29
echo "<center>$l_bl_version";
30
echo_file ("/var/www/html/VERSION-BL");
31
echo "</center><BR>";
32
echo "<input type='submit' value='$l_download'>";
33
echo " ($l_warning)";
34
?>
35
</FORM>
36
</td></tr>
37
<tr><td valign="middle" align="left" colspan=10>
38
<FORM action='dns_filter.php' method=POST>
39
<input type='hidden' name='choix' value='MAJ_cat'>
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; 
44
if (file_exists($bl_categories))
45
	{
46
	$pointeur=fopen($bl_categories,"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><a href='bl_categories_help.php?cat=$categorie' target='cat_help' onclick=window.open('bl_categories_help.php','cat_help','width=600,height=150,toolbar=no,scrollbars=no,resizable=yes') title='categories help page'>$categorie</a><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)) { echo ">";}
58
			else { echo "checked>"; }
59
			echo "</td>";
60
			$cols++;
61
			if ($cols > 10) {
62
				echo "</tr>";
63
				$cols=1; }
64
			}
65
		}
66
	fclose($pointeur);
67
	echo "<tr><td colspan=10><input type='submit' value='$l_record'>";
68
	}
69
else	{
70
	echo "$l_error_open_file $bl_categories";
71
	}
72
?>
73
</FORM>
74
</td></tr>
75
</TABLE>
76
<table width="100%" border="0" cellspacing="0" cellpadding="0">
77
	<tr><th><?php echo $l_secondary_bl; ?></th></tr>
78
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
79
</table>
80
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
81
<FORM action='dns_filter.php' method='POST'>
82
<tr><td width=50% align=center>
83
<?php echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain";
84
echo "<textarea name='OSSI_bl_domains' rows=5 cols=40>";
85
echo_file ("/etc/dansguardian/lists/blacklists/ossi/domains");
86
echo "</textarea></td><td  width=50% align=center>";
87
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns";
88
echo "<textarea name='OSSI_wl_domains' rows=5 cols=40>";
89
echo_file ("/etc/dansguardian/lists/exceptionsitelist");
90
echo "</textarea></td></tr><tr><td width=50% align=center>";
91
echo "<H3>$l_forbidden_url</H3>$l_forbidden_url_explain";
92
echo "<textarea name='OSSI_bl_urls' rows=5 cols=40>";
93
echo_file ("/etc/dansguardian/lists/blacklists/ossi/urls");
94
echo "</textarea></td><td  width=50% align=center>";
95
echo "<H3>$l_rehabilitated_url</H3>$l_rehabilitated_url_explain<BR>$l_one_url";
96
echo "<textarea name='OSSI_wl_urls' rows=5 cols=40>";
97
echo_file ("/etc/dansguardian/lists/exceptionurllist");
98
?>
99
</textarea>
100
</td></tr>
101
<tr><td colspan=2>
102
<input type='hidden' name='choix' value='MAJ_OSSI'>
103
<input type='submit' value='<?php echo "$l_record"; ?>'>
104
</FORM>
105
</td></tr>
106
</TABLE>