Subversion Repositories ALCASAR

Rev

Rev 842 | Go to most recent revision | Details | Compare with Previous | 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";
842 richard 30
echo date ("F d Y", filemtime ('/etc/dansguardian/lists/blacklists/README'));
318 richard 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
	}
876 richard 72
echo "</form> ($l_wait)";
318 richard 73
?>
74
</td></tr>
876 richard 75
<tr><td valign="middle" align="left" colspan=10>
76
<FORM action='dns_filter.php' method=POST>
77
<input type='hidden' name='choix' value='MAJ_rehabilited'>
78
<?php
79
echo "<center><b>$l_maj_rehabilitated</b></center></td></tr>";
80
echo "<tr><td colspan=5 align=center>";
81
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns<BR>";
82
echo "<textarea name='OSSI_wl_domains' rows=5 cols=40>";
83
echo_file ("/etc/dansguardian/lists/exceptionsitelist");
84
echo "</textarea></td>";
85
echo "<td colspan=5 align=center>";
86
echo "<H3>$l_rehabilitated_url</H3>$l_rehabilitated_url_explain<BR>$l_one_url<BR>";
87
echo "<textarea name='OSSI_wl_urls' rows=5 cols=40>";
88
echo_file ("/etc/dansguardian/lists/exceptionurllist");
89
echo "</textarea></td></tr><tr><td colspan=10>";
90
echo "<input type='submit' value='$l_record'>";
91
echo "</form> ($l_wait)";
92
?>
93
</td></tr>
318 richard 94
</TABLE>
95
<table width="100%" border="0" cellspacing="0" cellpadding="0">
96
	<tr><th><?php echo $l_secondary_bl; ?></th></tr>
97
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
98
</table>
99
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
100
<FORM action='dns_filter.php' method='POST'>
876 richard 101
<?php
102
echo "<tr><td width=50% align=center>";
103
echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain<BR>";
318 richard 104
echo "<textarea name='OSSI_bl_domains' rows=5 cols=40>";
105
echo_file ("/etc/dansguardian/lists/blacklists/ossi/domains");
106
echo "</textarea></td><td  width=50% align=center>";
470 richard 107
echo "<H3>$l_forbidden_url</H3>$l_forbidden_url_explain<BR>";
318 richard 108
echo "<textarea name='OSSI_bl_urls' rows=5 cols=40>";
109
echo_file ("/etc/dansguardian/lists/blacklists/ossi/urls");
876 richard 110
echo "</textarea></td></tr>";
318 richard 111
?>
112
<tr><td colspan=2>
113
<input type='hidden' name='choix' value='MAJ_OSSI'>
359 richard 114
<input type='submit' value='<?php echo "$l_record"?>'>
115
</form> <? echo "($l_wait)";?>
318 richard 116
</td></tr>
117
</TABLE>