Subversion Repositories ALCASAR

Rev

Rev 311 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 311 Rev 313
Line 34... Line 34...
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='/admin/dns_filter.php' method=POST>
38
<FORM action='/admin/dns_filter.php' method=POST>
39
<input type='hidden' name='choix' value='MAJ_OSSI'>
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; $filename="/usr/local/etc/alcasar-bl-categories-available";
43
$cols=1; 
44
if (file_exists($filename))
44
if (file_exists($bl_categories))
45
	{
45
	{
46
	$pointeur=fopen($filename,"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>$categorie<br>";
54
			echo "<td><a href='categorie_help.php?cat=$categorie' target='cat_help' onclick=window.open('categorie_help.php','cat_help','width=600','height=250','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)) {
57
			if (preg_match('/^#/',$ligne, $r)) { echo ">";}
58
				echo ">";}
-
 
59
			else {
-
 
60
				echo "checked>";}
58
			else { echo "checked>"; }
61
				echo "</td>";
59
			echo "</td>";
62
 
-
 
63
			}
-
 
64
			$cols++;
60
			$cols++;
65
			if ($cols > 10){
61
			if ($cols > 10) {
66
				echo "</tr>";
62
				echo "</tr>";
67
				$cols=1;
63
				$cols=1; }
68
			}
64
			}
69
		}
65
		}
70
	fclose($pointeur);
66
	fclose($pointeur);
71
	echo "<tr><td colspan=10><input type='submit' value='$l_record'>";
67
	echo "<tr><td colspan=10><input type='submit' value='$l_record'>";
72
	}
68
	}
73
else	{
69
else	{
74
	echo "$l_error_open_file $filename";
70
	echo "$l_error_open_file $bl_categories";
75
	}
71
	}
76
?>
72
?>
77
</FORM>
73
</FORM>
78
</td></tr>
74
</td></tr>
79
</TABLE>
75
</TABLE>