]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/proxy.cgi
GeƤndert:
[ipfire-2.x.git] / html / cgi-bin / proxy.cgi
index c921ef59fc032ab436ec86356fd9f14bde285f18..269ce36a2fa497519c90cc6f5b80a04b908ba24e 100644 (file)
@@ -130,6 +130,12 @@ open FILE, $browserdb;
 @useragentlist = sort { reverse(substr(reverse(substr($a,index($a,',')+1)),index(reverse(substr($a,index($a,','))),',')+1)) cmp reverse(substr(reverse(substr($b,index($b,',')+1)),index(reverse(substr($b,index($b,','))),',')+1))} grep !/(^$)|(^\s*#)/,<FILE>;
 close(FILE);
 
+my %filtersettings=();
+$filtersettings{'CHILDREN'} = '5';
+if (-e "${General::swroot}/urlfilter/settings") {
+       &General::readhash("${General::swroot}/urlfilter/settings", \%filtersettings);
+}
+
 &General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
 
@@ -152,6 +158,7 @@ if ($updacclrtr_addon) {
 
 &Header::showhttpheaders();
 
+$proxysettings{'ENABLE_FILTER'} = 'off';
 $proxysettings{'ACTION'} = '';
 $proxysettings{'VALID'} = '';
 
@@ -338,6 +345,15 @@ if (($proxysettings{'ACTION'} eq $Lang::tr{'save'}) || ($proxysettings{'ACTION'}
                $errormessage = $Lang::tr{'invalid maximum outgoing size'};
                goto ERROR;
        }
+       if ($proxysettings{'ENABLE_FILTER'} eq 'on')
+       {
+               print FILE <<END
+redirect_program /usr/bin/squidGuard
+redirect_children $filtersettings{'CHILDREN'}
+
+END
+               ;
+       }
        if (!($proxysettings{'TIME_TO_HOUR'}.$proxysettings{'TIME_TO_MINUTE'} gt $proxysettings{'TIME_FROM_HOUR'}.$proxysettings{'TIME_FROM_MINUTE'}))
        {
                $errormessage = $Lang::tr{'advproxy errmsg time restriction'};
@@ -865,6 +881,14 @@ print <<END
        </select>
        </td>
 </tr>
+<tr>
+       <td colspan='4'><hr /><b>$Lang::tr{'urlfilter url filter'}</b></td>
+</tr>
+<tr>
+       <td width='25%' class='base'>$Lang::tr{'urlfilter enabled'}</td>
+       <td><input type='checkbox' name='ENABLE_FILTER' $checked{'ENABLE_FILTER'}{'on'} /></td>
+       <td colspan='2'>&nbsp;</td>
+</tr>
 </table>
 <hr size='1'>
 <table width='100%'>
@@ -1414,23 +1438,6 @@ print <<END
 END
 ;
 
-if ($urlfilter_addon) {
-       print <<END
-<table width='100%'>
-<tr>
-        <td colspan='4'><b>$Lang::tr{'advproxy url filter'}</b></td>
-</tr>
-<tr>
-        <td class='base' width='25%'>$Lang::tr{'advproxy enabled'}:</td>
-        <td><input type='checkbox' name='ENABLE_FILTER' $checked{'ENABLE_FILTER'}{'on'} /></td>
-        <td>&nbsp;</td>
-        <td>&nbsp;</td>
-</tr>
-</table>
-<hr size='1'>
-END
-; }
-
 if (($updacclrtr_addon) && (!($urlfilter_addon))) {
        print <<END
 <table width='100%'>
@@ -3414,7 +3421,7 @@ END
                if ($proxysettings{'ENABLE_FILTER'} eq 'on')
                {
                        print FILE <<END
-redirect_program /usr/sbin/squidGuard
+redirect_program /usr/bin/squidGuard
 redirect_children $filtersettings{'CHILDREN'}
 
 END