#!/usr/local/bin/perl # edit_ext.cgi # Display a form for creating or editing an external ACL type require './squid-lib.pl'; $access{'actrl'} || &error($text{'eacl_ecannot'}); &ReadParse(); $conf = &get_config(); if ($in{'new'}) { &ui_print_header(undef, $text{'ext_title1'}, "", undef, 0, 0, 0, &restart_button()); } else { &ui_print_header(undef, $text{'ext_title2'}, "", undef, 0, 0, 0, &restart_button()); $ext = $conf->[$in{'index'}]; $ea = &parse_external($ext); } print "
\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
$text{'ext_header'}
\n"; print "\n"; printf "\n", $ea->{'name'}; print "\n"; printf "\n", &html_escape($ea->{'format'}); $o = $ea->{'opts'}; foreach $on ('ttl', 'negative_ttl', 'concurrency', 'cache') { print "\n"; printf "\n", $on, $o->{$on}, $text{'ext_'.$on.'_u'}; } print "\n"; printf "\n", &html_escape(join(" ", $ea->{'program'}, @{$ea->{'args'}})); print "
$text{'ext_name'}
$text{'ext_format'}
",$text{'ext_'.$on}," %s\n", $on, defined($o->{$on}) ? "" : "checked", $text{'default'}; printf "\n", $on, defined($o->{$on}) ? "checked" : ""; printf " %s
$text{'ext_program'}
\n"; print "\n"; print "\n" if (!$in{'new'}); print "
\n"; &ui_print_footer("edit_acl.cgi?mode=external", $text{'acl_return'});