Subversion Repositories ALCASAR

Rev

Rev 314 | Go to most recent revision | Blame | Last modification | View Log

<?php
function echo_file ($filename)
        {
        if (file_exists($filename))
                {
                if (filesize($filename) != 0)
                        {
                        $pointeur=fopen($filename,"r");
                        $tampon = fread($pointeur, filesize($filename));
                        fclose($pointeur);
                        echo $tampon;
                        }
                }
        else
                {
                echo "$l_error_openfile $filename";
                }
        }
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><th><?php echo $l_main_bl; ?></th></tr>
        <tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td valign="middle" align="left" colspan=10>
<FORM action='/admin/dns_filter.php' method=POST>
<input type='hidden' name='choix' value='MAJ_bl'>
<?php
echo "<center>$l_bl_version";
echo_file ("/var/www/html/VERSION-BL");
echo "</center><BR>";
echo "<input type='submit' value='$l_download'>";
echo " ($l_warning)";
?>
</FORM>
</td></tr>
<tr><td valign="middle" align="left" colspan=10>
<FORM action='/admin/dns_filter.php' method=POST>
<input type='hidden' name='choix' value='MAJ_cat'>
<?php
echo "<center>$l_bl_categories</center></td></tr>";
//on lit et on interprete le fichier de catégories
$cols=1; 
if (file_exists($bl_categories))
        {
        $pointeur=fopen($bl_categories,"r");
        while (!feof ($pointeur))
                {
                $ligne=fgets($pointeur, 4096);
                if ($ligne)
                        {
                        if ($cols == 1) { echo "<tr>";}
                        $categorie=trim(basename($ligne));
                        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>";
                        echo "<input type='checkbox' name='chk-$categorie'";
                        // si la ligne est commentée -> categorie non selectionnée
                        if (preg_match('/^#/',$ligne, $r)) { echo ">";}
                        else { echo "checked>"; }
                        echo "</td>";
                        $cols++;
                        if ($cols > 10) {
                                echo "</tr>";
                                $cols=1; }
                        }
                }
        fclose($pointeur);
        echo "<tr><td colspan=10><input type='submit' value='$l_record'>";
        }
else    {
        echo "$l_error_open_file $bl_categories";
        }
?>
</FORM>
</td></tr>
</TABLE>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><th><?php echo $l_secondary_bl; ?></th></tr>
        <tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</table>
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
<FORM action='/admin/dns_filter.php' method='POST'>
<tr><td width=50% align=center>
<?php echo "<H3>$l_forbidden_dns</H3>$l_forbidden_dns_explain";
echo "<textarea name='OSSI_bl_domains' rows=5 cols=40>";
echo_file ("/etc/dansguardian/lists/blacklists/ossi/domains");
echo "</textarea></td><td  width=50% align=center>";
echo "<H3>$l_rehabilitated_dns</H3>$l_rehabilitated_dns_explain<BR>$l_one_dns";
echo "<textarea name='OSSI_wl_domains' rows=5 cols=40>";
echo_file ("/etc/dansguardian/lists/exceptionsitelist");
echo "</textarea></td></tr><tr><td width=50% align=center>";
echo "<H3>$l_forbidden_url</H3>$l_forbidden_url_explain";
echo "<textarea name='OSSI_bl_urls' rows=5 cols=40>";
echo_file ("/etc/dansguardian/lists/blacklists/ossi/urls");
echo "</textarea></td><td  width=50% align=center>";
echo "<H3>$l_rehabilitated_url</H3>$l_rehabilitated_url_explain<BR>$l_one_url";
echo "<textarea name='OSSI_wl_urls' rows=5 cols=40>";
echo_file ("/etc/dansguardian/lists/exceptionurllist");
?>
</textarea>
</td></tr>
<tr><td colspan=2>
<input type='hidden' name='choix' value='MAJ_OSSI'>
<input type='submit' value='<?php echo "$l_record"; ?>'>
</FORM>
</td></tr>
</TABLE>