Line 31... |
Line 31... |
31 |
$l_bl_version="Version actuelle :";
|
31 |
$l_bl_version="Version actuelle :";
|
32 |
$l_bl_categories="Choix des catégories à filtrer";
|
32 |
$l_bl_categories="Choix des catégories à filtrer";
|
33 |
$l_download_bl="Télécharger la dernière version";
|
33 |
$l_download_bl="Télécharger la dernière version";
|
34 |
$l_fingerprint="L'empreinte numérique du fichier téléchargé est : ";
|
34 |
$l_fingerprint="L'empreinte numérique du fichier téléchargé est : ";
|
35 |
$l_fingerprint2="Vérifiez-là en suivant ce lien (ligne 'blacklists.tar.gz') : ";
|
35 |
$l_fingerprint2="Vérifiez-là en suivant ce lien (ligne 'blacklists.tar.gz') : ";
|
36 |
$l_activate_bl="Activer cette version";
|
36 |
$l_activate_bl="Activer la nouvelle version";
|
- |
|
37 |
$l_reject_bl="Rejeter";
|
37 |
$l_warning="Temps estimé : une minute.";
|
38 |
$l_warning="Temps estimé : une minute.";
|
38 |
$l_specific_filtering="Filtrage special";
|
39 |
$l_specific_filtering="Filtrage special";
|
39 |
$l_forbidden_dns="Noms de domaine filtrés";
|
40 |
$l_forbidden_dns="Noms de domaine filtrés";
|
40 |
$l_forbidden_dns_explain="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
41 |
$l_forbidden_dns_explain="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
41 |
$l_one_dns="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
42 |
$l_one_dns="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
Line 49... |
Line 50... |
49 |
$l_rehabilitated_url_explain="Entrez ici des URL bloquées par la liste noire <BR> que vous souhaitez réhabiliter.";
|
50 |
$l_rehabilitated_url_explain="Entrez ici des URL bloquées par la liste noire <BR> que vous souhaitez réhabiliter.";
|
50 |
$l_one_url="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)";
|
51 |
$l_one_url="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)";
|
51 |
$l_record="Enregistrer les modifications";
|
52 |
$l_record="Enregistrer les modifications";
|
52 |
$l_wait="Une fois validées, 30 secondes sont nécessaires pour traiter vos modifications";
|
53 |
$l_wait="Une fois validées, 30 secondes sont nécessaires pour traiter vos modifications";
|
53 |
$l_ip_filtering="Filtrer les URLs contenant une adresse IP au lien d'un nom de domaine (ex: http://25.56.58.59/index.htm)";
|
54 |
$l_ip_filtering="Filtrer les URLs contenant une adresse IP au lien d'un nom de domaine (ex: http://25.56.58.59/index.htm)";
|
54 |
$l_safe_searching="Activer le contrôle scolaire/parentale pour les moteurs de recherche suivants : google, yahoo, bing, alltheweb, lycos, metacrawler et Youtube.";
|
55 |
$l_safe_searching="Activer le contrôle scolaire/parentale des moteurs de recherche : google, yahoo, bing, metacrawler et Youtube.";
|
- |
|
56 |
$l_safe_youtube="Pour Youtube, entrez votre identifiant ici : ";
|
55 |
$l_safe_youtube="Pour Youtube, créez un ID et entrez le ici : ";
|
57 |
$l_youtube_id="(<a href='http://www.youtube.com/education_signup' target='cat_help' onclick=window.open('http://www.youtube.com/education_signup','cat_help','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes') title='Youtube for school'>lien pour créer un identifiant Youtube (Id)</a>)";
|
56 |
}
|
58 |
}
|
57 |
else {
|
59 |
else {
|
58 |
$l_title1 = "Domain names and URL filtering";
|
60 |
$l_title1 = "Domain names and URL filtering";
|
59 |
$l_error_open_file="Error opening the file";
|
61 |
$l_error_open_file="Error opening the file";
|
60 |
$l_dnsfilter_on="Actually, the Domain name and URL filter is on";
|
62 |
$l_dnsfilter_on="Actually, the Domain name and URL filter is on";
|
Line 65... |
Line 67... |
65 |
$l_bl_version="Current version : ";
|
67 |
$l_bl_version="Current version : ";
|
66 |
$l_bl_categories="Choice of filtered categories";
|
68 |
$l_bl_categories="Choice of filtered categories";
|
67 |
$l_download_bl="Download the last version";
|
69 |
$l_download_bl="Download the last version";
|
68 |
$l_fingerprint="The digital fingerprint of the downloaded blacklist is : ";
|
70 |
$l_fingerprint="The digital fingerprint of the downloaded blacklist is : ";
|
69 |
$l_fingerprint2="Verify it with this link (line 'blacklists.tar.gz') : ";
|
71 |
$l_fingerprint2="Verify it with this link (line 'blacklists.tar.gz') : ";
|
70 |
$l_activate_bl="Activate this version";
|
72 |
$l_activate_bl="Activate the new version";
|
- |
|
73 |
$l_reject_bl="Reject";
|
71 |
$l_warning="Estimated time : one minute.";
|
74 |
$l_warning="Estimated time : one minute.";
|
72 |
$l_specific_filtering="Specific filtering";
|
75 |
$l_specific_filtering="Specific filtering";
|
73 |
$l_forbidden_dns="Filtered domain names";
|
76 |
$l_forbidden_dns="Filtered domain names";
|
74 |
$l_forbidden_dns_explain="Enter one domain name per row (exemple : .domain.org)";
|
77 |
$l_forbidden_dns_explain="Enter one domain name per row (exemple : .domain.org)";
|
75 |
$l_one_dns="Enter one domain name per row (example : .domain.org)";
|
78 |
$l_one_dns="Enter one domain name per row (example : .domain.org)";
|
Line 83... |
Line 86... |
83 |
$l_rehabilitated_url_explain="Enter here URL that are blocked by the blacklist <BR> and you want to rehabilitate.";
|
86 |
$l_rehabilitated_url_explain="Enter here URL that are blocked by the blacklist <BR> and you want to rehabilitate.";
|
84 |
$l_one_url="Enter one URL per row (example : www.domaine.org/perso/index.htm)";
|
87 |
$l_one_url="Enter one URL per row (example : www.domaine.org/perso/index.htm)";
|
85 |
$l_record="Save changes";
|
88 |
$l_record="Save changes";
|
86 |
$l_wait="Once validated, 30 seconds is necessary to compute your modifications";
|
89 |
$l_wait="Once validated, 30 seconds is necessary to compute your modifications";
|
87 |
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)";
|
90 |
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)";
|
88 |
$l_safe_searching="Enabling school/parental control for the following search engines : google, yahoo, bing, alltheweb, lycos, metacrawler and Youtube.";
|
91 |
$l_safe_searching="Enabling school/parental control for the search engines google, yahoo, bing, metacrawler and Youtube.";
|
- |
|
92 |
$l_safe_youtube="For Youtube, enter your ID here : ";
|
89 |
$l_safe_youtube="For Youtube, create an ID and write it here : ";
|
93 |
$l_youtube_id="(<a href='http://www.youtube.com/education_signup' target='cat_help' onclick=window.open('http://www.youtube.com/education_signup','cat_help','width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes') title='Youtube for school'>link to create a Youtube Id</a>)";
|
90 |
}
|
94 |
}
|
91 |
$bl_categories="/usr/local/etc/alcasar-bl-categories";
|
95 |
$bl_categories="/usr/local/etc/alcasar-bl-categories";
|
92 |
$bl_categories_enabled="/usr/local/etc/alcasar-bl-categories-enabled";
|
96 |
$bl_categories_enabled="/usr/local/etc/alcasar-bl-categories-enabled";
|
93 |
$dir_blacklist="/etc/dansguardian/lists/blacklist/";
|
97 |
$dir_blacklist="/etc/dansguardian/lists/blacklist/";
|
94 |
$conf_file="/usr/local/etc/alcasar.conf";
|
98 |
$conf_file="/usr/local/etc/alcasar.conf";
|
95 |
$urlregex_file="/etc/dansguardian/lists/urlregexplist";
|
99 |
$urlregex_file="/etc/dansguardian/lists/urlregexplist";
|
96 |
$bannedsite_file="/etc/dansguardian/lists/bannedsitelist";
|
100 |
$bannedsite_file="/etc/dansguardian/lists/bannedsitelist";
|
- |
|
101 |
$dir_tmp="/tmp/blacklists";
|
- |
|
102 |
# default values
|
- |
|
103 |
if (is_file ($conf_file))
|
- |
|
104 |
{
|
- |
|
105 |
$tab=file($conf_file);
|
- |
|
106 |
if ($tab)
|
- |
|
107 |
{
|
- |
|
108 |
foreach ($tab as $line)
|
- |
|
109 |
{
|
- |
|
110 |
$field=explode("=", $line);
|
- |
|
111 |
if ($field[0] == "DNS_FILTERING") {$DNS_FILTERING=trim($field[1]);}
|
- |
|
112 |
if ($field[0] == "YOUTUBE_ID") {$YOUTUBE_ID=trim($field[1]);}
|
- |
|
113 |
}
|
- |
|
114 |
}
|
- |
|
115 |
}
|
- |
|
116 |
else { echo "$l_error_open_file $conf_file";}
|
97 |
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; }
|
117 |
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; }
|
98 |
switch ($choix)
|
118 |
switch ($choix)
|
99 |
{
|
119 |
{
|
100 |
case 'BL_On' :
|
120 |
case 'BL_On' :
|
101 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --on");
|
121 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --on");
|
Line 108... |
Line 128... |
108 |
break;
|
128 |
break;
|
109 |
case 'Active_bl' :
|
129 |
case 'Active_bl' :
|
110 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --adapt");
|
130 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --adapt");
|
111 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload");
|
131 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload");
|
112 |
break;
|
132 |
break;
|
- |
|
133 |
case 'Reject_bl' :
|
- |
|
134 |
unlink ("$dir_tmp/blacklists.tar.gz"); unlink ("$dir_tmp/md5sum");
|
- |
|
135 |
break;
|
113 |
case 'MAJ_cat' :
|
136 |
case 'MAJ_cat' :
|
114 |
$tab=file($bl_categories_enabled);
|
137 |
$tab=file($bl_categories_enabled);
|
115 |
if ($tab)
|
138 |
if ($tab)
|
116 |
{
|
139 |
{
|
117 |
$pointeur=fopen($bl_categories_enabled, "w+");
|
140 |
$pointeur=fopen($bl_categories_enabled, "w+");
|
Line 149... |
Line 172... |
149 |
foreach ($_POST as $key => $value)
|
172 |
foreach ($_POST as $key => $value)
|
150 |
{
|
173 |
{
|
151 |
if (strstr($key,'chk-ip')) $pureip="-pureip_on";
|
174 |
if (strstr($key,'chk-ip')) $pureip="-pureip_on";
|
152 |
if (strstr($key,'chk-safesearch')) $safesearch="-safesearch_on";
|
175 |
if (strstr($key,'chk-safesearch')) $safesearch="-safesearch_on";
|
153 |
}
|
176 |
}
|
- |
|
177 |
if ($_POST['Youtube_ID'] == '') { $New_ID="ABCD1234567890abcdef";} // default ID (no action)
|
154 |
echo "$pureip, $safesearch";
|
178 |
else {$New_ID=$_POST['Youtube_ID'];}
|
- |
|
179 |
file_put_contents($conf_file, str_replace("YOUTUBE_ID=$YOUTUBE_ID", "YOUTUBE_ID=$New_ID", file_get_contents($conf_file)));
|
- |
|
180 |
$YOUTUBE_ID=$New_ID;
|
- |
|
181 |
exec ("sudo /usr/local/sbin/alcasar-url_filter.sh $safesearch $pureip");
|
155 |
break;
|
182 |
break;
|
156 |
}
|
183 |
}
|
157 |
?>
|
184 |
?>
|
158 |
</TABLE>
|
185 |
</TABLE>
|
159 |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
|
186 |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
|
160 |
<tr><th><?php echo "$l_title1"; ?></th></tr>
|
187 |
<tr><th><?php echo "$l_title1"; ?></th></tr>
|
161 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr>
|
188 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr>
|
162 |
</TABLE>
|
189 |
</TABLE>
|
163 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
|
190 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
|
164 |
<tr><td valign="middle" align="left">
|
191 |
<tr><td valign="middle" align="left">
|
165 |
<?php
|
192 |
<?php
|
166 |
# default values
|
- |
|
167 |
if (is_file ($conf_file))
|
- |
|
168 |
{
|
- |
|
169 |
$tab=file($conf_file);
|
- |
|
170 |
if ($tab)
|
- |
|
171 |
{
|
- |
|
172 |
foreach ($tab as $line)
|
- |
|
173 |
{
|
- |
|
174 |
$field=explode("=", $line);
|
- |
|
175 |
if ($field[0] == "DNS_FILTERING") {$DNS_FILTERING=trim($field[1]);}
|
- |
|
176 |
}
|
- |
|
177 |
}
|
- |
|
178 |
}
|
- |
|
179 |
else { echo "$l_error_open_file $conf_file";}
|
- |
|
180 |
if ($DNS_FILTERING == "on")
|
193 |
if ($DNS_FILTERING == "on")
|
181 |
{
|
194 |
{
|
182 |
echo "<CENTER><H3>$l_dnsfilter_on</H3></CENTER>";
|
195 |
echo "<CENTER><H3>$l_dnsfilter_on</H3></CENTER>";
|
183 |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
|
196 |
echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
|
184 |
echo "<input type=hidden name='choix' value=\"BL_Off\">";
|
197 |
echo "<input type=hidden name='choix' value=\"BL_Off\">";
|