Subversion Repositories ALCASAR

Rev

Rev 318 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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