| Line 19... |
Line 19... |
| 19 |
$Language = 'en';
|
19 |
$Language = 'en';
|
| 20 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
20 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
| 21 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
21 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
| 22 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
22 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
| 23 |
if($Language == 'fr'){
|
23 |
if($Language == 'fr'){
|
| 24 |
$l_title1 = "Filtrage de noms de domaine et d'URL";
|
24 |
$l_title1="Filtrage de noms de domaine et d'URL";
|
| 25 |
$l_error_open_file="Erreur d'ouverture du fichier";
|
- |
|
| 26 |
$l_dnsfilter_on="Le filtrage de noms de domaine et d'URL est actuellement activé";
|
25 |
$l_dnsfilter_on="Le filtrage de noms de domaine et d'URL est actuellement activé";
|
| 27 |
$l_dnsfilter_off="Le filtrage de noms de domaine et d'URL est actuellement désactivé";
|
26 |
$l_dnsfilter_off="Le filtrage de noms de domaine et d'URL est actuellement désactivé";
|
| 28 |
$l_switch_filtering_on="Activer le filtrage";
|
27 |
$l_switch_filtering_on="Activer le filtrage";
|
| 29 |
$l_switch_filtering_off="Désactiver le filtrage";
|
28 |
$l_switch_filtering_off="Désactiver le filtrage";
|
| 30 |
$l_main_bl="Liste noire";
|
29 |
$l_bl="Liste noire";
|
| - |
|
30 |
$l_wl="Liste blanche";
|
| 31 |
$l_bl_version="Version actuelle :";
|
31 |
$l_list_version="Version de la liste : ";
|
| 32 |
$l_bl_categories="Choix des catégories à filtrer";
|
32 |
$l_bl_categories="Sélectionnez les catégories à filtrer";
|
| - |
|
33 |
$l_wl_categories="Sélectionnez les catégories à autoriser";
|
| 33 |
$l_download_bl="Télécharger la dernière version";
|
34 |
$l_download_bl="Télécharger la dernière version";
|
| 34 |
$l_fingerprint="L'empreinte numérique du fichier téléchargé est : ";
|
35 |
$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') : ";
|
36 |
$l_fingerprint2="Vérifiez-là en suivant ce lien (ligne 'blacklists.tar.gz') : ";
|
| 36 |
$l_activate_bl="Activer la nouvelle version";
|
37 |
$l_activate_bl="Activer la nouvelle version";
|
| 37 |
$l_reject_bl="Rejeter";
|
38 |
$l_reject_bl="Rejeter";
|
| 38 |
$l_warning="Temps estimé : une minute.";
|
39 |
$l_warning="Temps estimé : une minute.";
|
| 39 |
$l_specific_filtering="Filtrage special";
|
40 |
$l_specific_filtering="Filtrage special";
|
| 40 |
$l_forbidden_dns="Noms de domaine filtrés";
|
41 |
$l_forbidden_dns="Noms de domaine filtrés";
|
| 41 |
$l_forbidden_dns_explain="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
42 |
$l_forbidden_dns_explain="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
| - |
|
43 |
$l_allowed_dns="Noms de domaine autorisés";
|
| 42 |
$l_one_dns="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
44 |
$l_one_dns="Entrez un nom de domaine par ligne (exemple : .domaine.org)";
|
| 43 |
$l_maj_rehabilitated="Noms de domaine ou URLs réhabilités";
|
45 |
$l_maj_rehabilitated="Noms de domaine ou URLs réhabilités";
|
| 44 |
$l_rehabilitated_dns="Noms de domaine réhabilités";
|
46 |
$l_rehabilitated_dns="Noms de domaine réhabilités";
|
| 45 |
$l_rehabilitated_dns_explain="Entrez ici des noms de domaine bloqués par la liste noire <BR> que vous souhaitez réhabiliter.";
|
47 |
$l_rehabilitated_dns_explain="Entrez ici des noms de domaine bloqués par la liste noire <BR> que vous souhaitez réhabiliter.";
|
| 46 |
$l_add_to_bl="Noms de domaine ou URLs ajoutés à la liste noire";
|
48 |
$l_add_to_bl="Noms de domaine ou URLs ajoutés à la liste noire";
|
| - |
|
49 |
$l_add_to_wl="Noms de domaine ou URLs ajoutés à la liste blanche";
|
| 47 |
$l_forbidden_url="URL filtrés";
|
50 |
$l_forbidden_url="URL filtrés";
|
| 48 |
$l_forbidden_url_explain="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)";
|
51 |
$l_forbidden_url_explain="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)";
|
| - |
|
52 |
$l_allowed_url="URL authorisés";
|
| 49 |
$l_rehabilitated_url="URL réhabilités";
|
53 |
$l_rehabilitated_url="URL réhabilités";
|
| 50 |
$l_rehabilitated_url_explain="Entrez ici des URL bloquées par la liste noire <BR> que vous souhaitez réhabiliter.";
|
54 |
$l_rehabilitated_url_explain="Entrez ici des URL bloquées par la liste noire <BR> que vous souhaitez réhabiliter.";
|
| 51 |
$l_one_url="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)";
|
55 |
$l_one_url="Entrez une URL par ligne (exemple : www.domaine.org/perso/index.htm)";
|
| 52 |
$l_record="Enregistrer les modifications";
|
56 |
$l_record="Enregistrer les modifications";
|
| 53 |
$l_wait="Une fois validées, 30 secondes sont nécessaires pour traiter vos modifications";
|
57 |
$l_wait="Une fois validées, 30 secondes sont nécessaires pour traiter vos modifications";
|
| Line 55... |
Line 59... |
| 55 |
$l_safe_searching="Activer le contrôle scolaire/parental des moteurs de recherche : google, yahoo, bing, metacrawler et Youtube.";
|
59 |
$l_safe_searching="Activer le contrôle scolaire/parental des moteurs de recherche : google, yahoo, bing, metacrawler et Youtube.";
|
| 56 |
$l_safe_youtube="Pour Youtube, entrez votre identifiant ici : ";
|
60 |
$l_safe_youtube="Pour Youtube, entrez votre identifiant 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>)";
|
61 |
$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>)";
|
| 58 |
}
|
62 |
}
|
| 59 |
else {
|
63 |
else {
|
| 60 |
$l_title1 = "Domain names and URL filtering";
|
64 |
$l_title1="Domain names and URL filtering";
|
| 61 |
$l_error_open_file="Error opening the file";
|
- |
|
| 62 |
$l_dnsfilter_on="Actually, the Domain name and URL filter is on";
|
65 |
$l_dnsfilter_on="Actually, the Domain name and URL filter is on";
|
| 63 |
$l_dnsfilter_off="Actually, the Domain name and URL filter is off";
|
66 |
$l_dnsfilter_off="Actually, the Domain name and URL filter is off";
|
| 64 |
$l_switch_filtering_on="Switch the Filter on";
|
67 |
$l_switch_filtering_on="Switch the Filter on";
|
| 65 |
$l_switch_filtering_off="Switch the Filter off";
|
68 |
$l_switch_filtering_off="Switch the Filter off";
|
| 66 |
$l_main_bl="Blacklist";
|
69 |
$l_bl="BlackList";
|
| - |
|
70 |
$l_wl="WhiteList";
|
| 67 |
$l_bl_version="Current version : ";
|
71 |
$l_list_version="List version : ";
|
| 68 |
$l_bl_categories="Choice of filtered categories";
|
72 |
$l_bl_categories="Select the categories to filter";
|
| - |
|
73 |
$l_wl_categories="Select the categories to allow";
|
| 69 |
$l_download_bl="Download the last version";
|
74 |
$l_download_bl="Download the last version";
|
| 70 |
$l_fingerprint="The digital fingerprint of the downloaded blacklist is : ";
|
75 |
$l_fingerprint="The digital fingerprint of the downloaded blacklist is : ";
|
| 71 |
$l_fingerprint2="Verify it with this link (line 'blacklists.tar.gz') : ";
|
76 |
$l_fingerprint2="Verify it with this link (line 'blacklists.tar.gz') : ";
|
| 72 |
$l_activate_bl="Activate the new version";
|
77 |
$l_activate_bl="Activate the new version";
|
| 73 |
$l_reject_bl="Reject";
|
78 |
$l_reject_bl="Reject";
|
| 74 |
$l_warning="Estimated time : one minute.";
|
79 |
$l_warning="Estimated time : one minute.";
|
| 75 |
$l_specific_filtering="Specific filtering";
|
80 |
$l_specific_filtering="Specific filtering";
|
| 76 |
$l_forbidden_dns="Filtered domain names";
|
81 |
$l_forbidden_dns="Filtered domain names";
|
| 77 |
$l_forbidden_dns_explain="Enter one domain name per row (exemple : .domain.org)";
|
82 |
$l_forbidden_dns_explain="Enter one domain name per row (exemple : .domain.org)";
|
| - |
|
83 |
$l_allowed_dns="Allowed domain names";
|
| 78 |
$l_one_dns="Enter one domain name per row (example : .domain.org)";
|
84 |
$l_one_dns="Enter one domain name per row (example : .domain.org)";
|
| 79 |
$l_maj_rehabilitated="Domain names or URLs rehabilitated";
|
85 |
$l_maj_rehabilitated="Domain names or URLs rehabilitated";
|
| 80 |
$l_rehabilitated_dns="Rehabilitated domain names";
|
86 |
$l_rehabilitated_dns="Rehabilitated domain names";
|
| 81 |
$l_rehabilitated_dns_explain="Enter here domain names that are blocked by the blacklist <BR> and you want to rehabilitate.";
|
87 |
$l_rehabilitated_dns_explain="Enter here domain names that are blocked by the blacklist <BR> and you want to rehabilitate.";
|
| 82 |
$l_add_to_bl="Domain names or URLs to add to blacklist";
|
88 |
$l_add_to_bl="Domain names or URLs to add to blacklist";
|
| - |
|
89 |
$l_add_to_wl="Domain names or URLs to add to whitelist";
|
| 83 |
$l_forbidden_url="Filtered URL";
|
90 |
$l_forbidden_url="Filtered URL";
|
| 84 |
$l_forbidden_url_explain="Enter one URL per row (example : www.domaine.org/perso/index.htm)";
|
91 |
$l_forbidden_url_explain="Enter one URL per row (example : www.domaine.org/perso/index.htm)";
|
| - |
|
92 |
$l_allowed_url="Allowed URL";
|
| 85 |
$l_rehabilitated_url="Rehabilitated URL";
|
93 |
$l_rehabilitated_url="Rehabilitated URL";
|
| 86 |
$l_rehabilitated_url_explain="Enter here URL that are blocked by the blacklist <BR> and you want to rehabilitate.";
|
94 |
$l_rehabilitated_url_explain="Enter here URL that are blocked by the blacklist <BR> and you want to rehabilitate.";
|
| 87 |
$l_one_url="Enter one URL per row (example : www.domaine.org/perso/index.htm)";
|
95 |
$l_one_url="Enter one URL per row (example : www.domaine.org/perso/index.htm)";
|
| 88 |
$l_record="Save changes";
|
96 |
$l_record="Save changes";
|
| 89 |
$l_wait="Once validated, 30 seconds is necessary to compute your modifications";
|
97 |
$l_wait="Once validated, 30 seconds is necessary to compute your modifications";
|
| 90 |
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)";
|
98 |
$l_ip_filtering="Filtering URLs that contain an IP address instead of a domain name (ie: http://25.56.58.59/index.htm)";
|
| 91 |
$l_safe_searching="Enabling school/parental control for the search engines google, yahoo, bing, metacrawler and Youtube.";
|
99 |
$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 : ";
|
100 |
$l_safe_youtube="For Youtube, enter your ID 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>)";
|
101 |
$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>)";
|
| 94 |
}
|
102 |
}
|
| - |
|
103 |
$dir_etc="/usr/local/etc/";
|
| - |
|
104 |
$dir_dg="/etc/dansguardian/lists/";
|
| 95 |
$bl_categories="/usr/local/etc/alcasar-bl-categories";
|
105 |
$bl_categories=$dir_etc."alcasar-bl-categories";
|
| 96 |
$bl_categories_enabled="/usr/local/etc/alcasar-bl-categories-enabled";
|
106 |
$bl_categories_enabled=$dir_etc."alcasar-bl-categories-enabled";
|
| 97 |
$dir_blacklist="/etc/dansguardian/lists/blacklist/";
|
107 |
$wl_categories=$dir_etc."alcasar-wl-categories";
|
| - |
|
108 |
$wl_categories_enabled=$dir_etc."alcasar-wl-categories-enabled";
|
| 98 |
$conf_file="/usr/local/etc/alcasar.conf";
|
109 |
$conf_file=$dir_etc."alcasar.conf";
|
| - |
|
110 |
$dir_blacklist=$dir_dg."blacklist/";
|
| 99 |
$urlregex_file="/etc/dansguardian/lists/urlregexplist";
|
111 |
$urlregex_file=$dir_dg."urlregexplist";
|
| 100 |
$bannedsite_file="/etc/dansguardian/lists/bannedsitelist";
|
112 |
$bannedsite_file=$dir_dg."bannedsitelist";
|
| 101 |
$dir_tmp="/tmp/blacklists";
|
113 |
$dir_tmp="/tmp/blacklists";
|
| 102 |
# default values
|
114 |
# default values
|
| 103 |
if (is_file ($conf_file))
|
115 |
if (is_file ($conf_file))
|
| 104 |
{
|
116 |
{
|
| 105 |
$tab=file($conf_file);
|
117 |
$tab=file($conf_file);
|
| Line 123... |
Line 135... |
| 123 |
break;
|
135 |
break;
|
| 124 |
case 'BL_Off' :
|
136 |
case 'BL_Off' :
|
| 125 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --off");
|
137 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --off");
|
| 126 |
$DNS_FILTERING="off";
|
138 |
$DNS_FILTERING="off";
|
| 127 |
break;
|
139 |
break;
|
| 128 |
case 'Download_bl' :
|
140 |
case 'Download_list' :
|
| 129 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --download");
|
141 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --download");
|
| 130 |
break;
|
142 |
break;
|
| 131 |
case 'Active_bl' :
|
143 |
case 'Active_list' :
|
| 132 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --adapt");
|
144 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --adapt");
|
| 133 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload");
|
145 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload");
|
| 134 |
break;
|
146 |
break;
|
| 135 |
case 'Reject_bl' :
|
147 |
case 'Reject_list' :
|
| 136 |
unlink ("$dir_tmp/blacklists.tar.gz"); unlink ("$dir_tmp/md5sum");
|
148 |
unlink ("$dir_tmp/blacklists.tar.gz"); unlink ("$dir_tmp/md5sum");
|
| 137 |
break;
|
149 |
break;
|
| 138 |
case 'MAJ_cat' :
|
150 |
case 'MAJ_cat_bl' :
|
| 139 |
$tab=file($bl_categories_enabled);
|
151 |
$tab=file($bl_categories_enabled);
|
| 140 |
if ($tab)
|
152 |
if ($tab)
|
| 141 |
{
|
153 |
{
|
| 142 |
$pointeur=fopen($bl_categories_enabled, "w+");
|
154 |
$pointeur=fopen($bl_categories_enabled, "w+");
|
| 143 |
foreach ($_POST as $key => $value)
|
155 |
foreach ($_POST as $key => $value)
|
| Line 149... |
Line 161... |
| 149 |
}
|
161 |
}
|
| 150 |
}
|
162 |
}
|
| 151 |
fclose($pointeur);
|
163 |
fclose($pointeur);
|
| 152 |
}
|
164 |
}
|
| 153 |
else {echo "$l_error_open_file $bl_categories_enabled";}
|
165 |
else {echo "$l_error_open_file $bl_categories_enabled";}
|
| 154 |
$fichier=fopen("/etc/dansguardian/lists/blacklists/ossi/domains","w+");
|
166 |
$fichier=fopen($dir_dg."blacklists/ossi/domains","w+");
|
| 155 |
fputs($fichier, form_filter($_POST['OSSI_bl_domains']));
|
167 |
fputs($fichier, form_filter($_POST['OSSI_bl_domains']));
|
| 156 |
fclose($fichier);
|
168 |
fclose($fichier);
|
| 157 |
unset($_POST['OSSI_bl_domains']);
|
169 |
unset($_POST['OSSI_bl_domains']);
|
| 158 |
$fichier=fopen("/etc/dansguardian/lists/exceptionsitelist","w+");
|
170 |
$fichier=fopen($dir_dg."exceptionsitelist","w+");
|
| 159 |
fputs($fichier, form_filter($_POST['OSSI_wl_domains']));
|
171 |
fputs($fichier, form_filter($_POST['BL_rehabilited_domains']));
|
| 160 |
fclose($fichier);
|
172 |
fclose($fichier);
|
| 161 |
unset($_POST['OSSI_wl_domains']);
|
173 |
unset($_POST['BL_rehabilited_domains']);
|
| 162 |
$fichier=fopen("/etc/dansguardian/lists/blacklists/ossi/urls","w+");
|
174 |
$fichier=fopen($dir_dg."blacklists/ossi/urls","w+");
|
| 163 |
fputs($fichier, form_filter($_POST['OSSI_bl_urls']));
|
175 |
fputs($fichier, form_filter($_POST['OSSI_bl_urls']));
|
| 164 |
fclose($fichier);
|
176 |
fclose($fichier);
|
| 165 |
unset($_POST['OSSI_bl_urls']);
|
177 |
unset($_POST['OSSI_bl_urls']);
|
| 166 |
$fichier=fopen("/etc/dansguardian/lists/exceptionurllist","w+");
|
178 |
$fichier=fopen($dir_dg."exceptionurllist","w+");
|
| - |
|
179 |
fputs($fichier, form_filter($_POST['BL_rehabilited_urls']));
|
| - |
|
180 |
fclose($fichier);
|
| - |
|
181 |
unset($_POST['BL_rehabilited_urls']);
|
| - |
|
182 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload");
|
| - |
|
183 |
break;
|
| - |
|
184 |
case 'MAJ_cat_wl' :
|
| - |
|
185 |
$tab=file($wl_categories_enabled);
|
| - |
|
186 |
if ($tab)
|
| - |
|
187 |
{
|
| - |
|
188 |
$pointeur=fopen($wl_categories_enabled, "w+");
|
| - |
|
189 |
foreach ($_POST as $key => $value)
|
| - |
|
190 |
{
|
| - |
|
191 |
if (strstr($key,'chk-'))
|
| - |
|
192 |
{
|
| - |
|
193 |
$line=str_replace('chk-','',$key)."\n";
|
| - |
|
194 |
fwrite($pointeur,$line);
|
| - |
|
195 |
}
|
| - |
|
196 |
}
|
| - |
|
197 |
fclose($pointeur);
|
| - |
|
198 |
}
|
| - |
|
199 |
else {echo "$l_error_open_file $wl_categories_enabled";}
|
| - |
|
200 |
$fichier=fopen($dir_dg."blacklists/ossi/domains_wl","w+");
|
| - |
|
201 |
fputs($fichier, form_filter($_POST['OSSI_wl_domains']));
|
| - |
|
202 |
fclose($fichier);
|
| - |
|
203 |
unset($_POST['OSSI_wl_domains']);
|
| - |
|
204 |
$fichier=fopen($dir_dg."blacklists/ossi/urls_wl","w+");
|
| 167 |
fputs($fichier, form_filter($_POST['OSSI_wl_urls']));
|
205 |
fputs($fichier, form_filter($_POST['OSSI_wl_urls']));
|
| 168 |
fclose($fichier);
|
206 |
fclose($fichier);
|
| 169 |
unset($_POST['OSSI_wl_urls']);
|
207 |
unset($_POST['OSSI_wl_urls']);
|
| 170 |
exec ("sudo /usr/local/sbin/alcasar-bl.sh --reload");
|
- |
|
| 171 |
break;
|
208 |
break;
|
| 172 |
case 'Specific_filtering' :
|
209 |
case 'Specific_filtering' :
|
| 173 |
$pureip="-pureip_off"; $safesearch="-safesearch_off"; ;
|
210 |
$pureip="-pureip_off"; $safesearch="-safesearch_off"; ;
|
| 174 |
foreach ($_POST as $key => $value)
|
211 |
foreach ($_POST as $key => $value)
|
| 175 |
{
|
212 |
{
|