Subversion Repositories ALCASAR

Rev

Rev 314 | 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>
313 richard 39
<input type='hidden' name='choix' value='MAJ_cat'>
311 richard 40
<?php
41
echo "<center>$l_bl_categories</center></td></tr>";
42
//on lit et on interprete le fichier de catégories
313 richard 43
$cols=1; 
44
if (file_exists($bl_categories))
311 richard 45
	{
313 richard 46
	$pointeur=fopen($bl_categories,"r");
311 richard 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));
315 richard 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>";
311 richard 55
			echo "<input type='checkbox' name='chk-$categorie'";
56
			// si la ligne est commentée -> categorie non selectionnée
313 richard 57
			if (preg_match('/^#/',$ligne, $r)) { echo ">";}
58
			else { echo "checked>"; }
59
			echo "</td>";
311 richard 60
			$cols++;
313 richard 61
			if ($cols > 10) {
311 richard 62
				echo "</tr>";
313 richard 63
				$cols=1; }
311 richard 64
			}
65
		}
66
	fclose($pointeur);
67
	echo "<tr><td colspan=10><input type='submit' value='$l_record'>";
68
	}
69
else	{
313 richard 70
	echo "$l_error_open_file $bl_categories";
311 richard 71
	}
72
?>
73
</FORM>
74
</td></tr>
286 richard 75
</TABLE>
311 richard 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>
286 richard 80
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
308 richard 81
<FORM action='/admin/dns_filter.php' method='POST'>
311 richard 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>";
286 richard 85
echo_file ("/etc/dansguardian/lists/blacklists/ossi/domains");
311 richard 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>";
286 richard 89
echo_file ("/etc/dansguardian/lists/exceptionsitelist");
311 richard 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>";
286 richard 93
echo_file ("/etc/dansguardian/lists/blacklists/ossi/urls");
311 richard 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>";
286 richard 97
echo_file ("/etc/dansguardian/lists/exceptionurllist");
98
?>
99
</textarea>
100
</td></tr>
311 richard 101
<tr><td colspan=2>
286 richard 102
<input type='hidden' name='choix' value='MAJ_OSSI'>
311 richard 103
<input type='submit' value='<?php echo "$l_record"; ?>'>
286 richard 104
</FORM>
105
</td></tr>
106
</TABLE>