#!/usr/local/bin/perl # http_access.cgi # A form for editing or creating a proxy access restriction require './squid-lib.pl'; $access{'actrl'} || &error($text{'eacl_ecannot'}); &ReadParse(); $conf = &get_config(); if (!defined($in{'index'})) { &ui_print_header(undef, $text{'ahttp_header'}, "", undef, 0, 0, 0, &restart_button()); } else { &ui_print_header(undef, $text{'ahttp_header1'}, "", undef, 0, 0, 0, &restart_button()); @http = @{$conf->[$in{'index'}]->{'values'}}; } print "
\n"; if (@http) { print "\n"; } print "\n"; print "\n"; print "
$text{'ahttp_pr'}
\n"; print "\n", $http[0] eq "allow" ? "" : "checked"; for($i=1; $i<@http; $i++) { $match{$http[$i]}++; } @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf); unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3); $r = @acls; $r = 10 if ($r > 10); print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'ahttp_a'} \n"; printf " $text{'ahttp_a1'}\n", $http[0] eq "allow" ? "checked" : ""; printf " $text{'ahttp_d'}
$text{'ahttp_ma'}$text{'ahttp_dma'}
\n"; print "\n"; if (@http) { print "\n"; } print "
\n"; &ui_print_footer("edit_acl.cgi?mode=http", $text{'ahttp_return'}, "", $text{'index_return'});