Subversion Repositories ALCASAR

Rev

Rev 1031 | Rev 1042 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1031 Rev 1041
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<HTML><!-- written by Rexy -->
2
<HTML><!-- written by Rexy -->
3
<HEAD>
3
<HEAD>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
<TITLE>ALCASAR DNS filtering</TITLE>
5
<TITLE>ALCASAR DNS filtering</TITLE>
6
<link rel="stylesheet" href="/css/style.css" type="text/css">
6
<link rel="stylesheet" href="/css/style.css" type="text/css">
7
</HEAD>
7
</HEAD>
8
<body>
8
<body>
9
<?
9
<?
10
function form_filter ($form_content)
10
function form_filter ($form_content)
11
{
11
{
12
// réencodage iso + format unix + rc fin de ligne (ouf...)
12
// réencodage iso + format unix + rc fin de ligne (ouf...)
13
	$list = str_replace("\r\n", "\n", utf8_decode($form_content));
13
	$list = str_replace("\r\n", "\n", utf8_decode($form_content));
14
	if (strlen($list) != 0){
14
	if (strlen($list) != 0){
15
		if ($list[strlen($list)-1] != "\n") { $list[strlen($list)]="\n";} ;} ;
15
		if ($list[strlen($list)-1] != "\n") { $list[strlen($list)]="\n";} ;} ;
16
	return $list;
16
	return $list;
17
}
17
}
18
# Choice of language
18
# Choice of language
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";
54
  $l_ip_filtering="Filtrer les URLs contenant une adresse IP au lieu d'un nom de domaine (ex: http://25.56.58.59/index.htm)";
58
  $l_ip_filtering="Filtrer les URLs contenant une adresse IP au lieu d'un nom de domaine (ex: http://25.56.58.59/index.htm)";
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);
106
	if ($tab)
118
	if ($tab)
107
		{
119
		{
108
		foreach ($tab as $line)
120
		foreach ($tab as $line)
109
			{
121
			{
110
			$field=explode("=", $line);
122
			$field=explode("=", $line);
111
			if ($field[0] == "DNS_FILTERING")	{$DNS_FILTERING=trim($field[1]);}
123
			if ($field[0] == "DNS_FILTERING")	{$DNS_FILTERING=trim($field[1]);}
112
			if ($field[0] == "YOUTUBE_ID")		{$YOUTUBE_ID=trim($field[1]);}
124
			if ($field[0] == "YOUTUBE_ID")		{$YOUTUBE_ID=trim($field[1]);}
113
			}
125
			}
114
		}
126
		}
115
	}
127
	}
116
else { echo "$l_error_open_file $conf_file";}
128
else { echo "$l_error_open_file $conf_file";}
117
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; }
129
if (isset($_POST['choix'])){ $choix=$_POST['choix']; } else { $choix=""; }
118
switch ($choix)
130
switch ($choix)
119
{
131
{
120
case 'BL_On' :
132
case 'BL_On' :
121
	exec ("sudo /usr/local/sbin/alcasar-bl.sh --on");
133
	exec ("sudo /usr/local/sbin/alcasar-bl.sh --on");
122
	$DNS_FILTERING="on";
134
	$DNS_FILTERING="on";
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)
144
			{
156
			{
145
			if (strstr($key,'chk-'))
157
			if (strstr($key,'chk-'))
146
				{	
158
				{	
147
				$line=str_replace('chk-','',$key)."\n";
159
				$line=str_replace('chk-','',$key)."\n";
148
				fwrite($pointeur,$line);
160
				fwrite($pointeur,$line);
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
	{
176
		if (strstr($key,'chk-ip')) $pureip="-pureip_on";
213
		if (strstr($key,'chk-ip')) $pureip="-pureip_on";
177
		if (strstr($key,'chk-safesearch')) $safesearch="-safesearch_on";
214
		if (strstr($key,'chk-safesearch')) $safesearch="-safesearch_on";
178
	}
215
	}
179
	if ($_POST['Youtube_ID'] == '') { $New_ID="ABCD1234567890abcdef";} // default ID (no action) 
216
	if ($_POST['Youtube_ID'] == '') { $New_ID="ABCD1234567890abcdef";} // default ID (no action) 
180
	else {$New_ID=$_POST['Youtube_ID'];}
217
	else {$New_ID=$_POST['Youtube_ID'];}
181
	file_put_contents($conf_file, str_replace("YOUTUBE_ID=$YOUTUBE_ID", "YOUTUBE_ID=$New_ID", file_get_contents($conf_file)));
218
	file_put_contents($conf_file, str_replace("YOUTUBE_ID=$YOUTUBE_ID", "YOUTUBE_ID=$New_ID", file_get_contents($conf_file)));
182
	$YOUTUBE_ID=$New_ID;
219
	$YOUTUBE_ID=$New_ID;
183
	exec ("sudo /usr/local/sbin/alcasar-url_filter.sh $safesearch $pureip");
220
	exec ("sudo /usr/local/sbin/alcasar-url_filter.sh $safesearch $pureip");
184
       	break;
221
       	break;
185
}
222
}
186
?>
223
?>
187
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
224
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
188
<tr><th><?php echo "$l_title1"; ?></th></tr>
225
<tr><th><?php echo "$l_title1"; ?></th></tr>
189
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr>
226
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width=1 height=2></td></tr>
190
</TABLE>
227
</TABLE>
191
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
228
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
192
	<tr><td valign="middle" align="left">
229
	<tr><td valign="middle" align="left">
193
<?php
230
<?php
194
if ($DNS_FILTERING == "on")
231
if ($DNS_FILTERING == "on")
195
	{
232
	{
196
	echo "<CENTER><H3>$l_dnsfilter_on</H3></CENTER>";
233
	echo "<CENTER><H3>$l_dnsfilter_on</H3></CENTER>";
197
 	echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
234
 	echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
198
	echo "<input type=hidden name='choix' value=\"BL_Off\">";
235
	echo "<input type=hidden name='choix' value=\"BL_Off\">";
199
	echo "<input type=submit value=\"$l_switch_filtering_off\">";
236
	echo "<input type=submit value=\"$l_switch_filtering_off\">";
200
}
237
}
201
else
238
else
202
	{
239
	{
203
	echo "<CENTER><H3>$l_dnsfilter_off</H3></CENTER>";
240
	echo "<CENTER><H3>$l_dnsfilter_off</H3></CENTER>";
204
 	echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
241
 	echo "<FORM action='$_SERVER[PHP_SELF]' method=POST>";
205
	echo "<input type=hidden name='choix' value=\"BL_On\">";
242
	echo "<input type=hidden name='choix' value=\"BL_On\">";
206
	echo "<input type=submit value=\"$l_switch_filtering_on\">";
243
	echo "<input type=submit value=\"$l_switch_filtering_on\">";
207
	}
244
	}
208
echo "</FORM>";
245
echo "</FORM>";
209
echo "</td></tr>";
246
echo "</td></tr>";
210
echo "</TABLE>";
247
echo "</TABLE>";
211
if ($DNS_FILTERING == "on") require ('bl_filter2.php');
248
if ($DNS_FILTERING == "on") require ('bl_filter2.php');
212
?>
249
?>
213
</BODY>
250
</BODY>
214
</HTML>
251
</HTML>
215
 
252