#!/usr/local/bin/perl # edit_sports.cgi # A form for editing simple networking options require './squid-lib.pl'; $access{'portsnets'} || &error($text{'eports_ecannot'}); &ui_print_header(undef, $text{'eports_header'}, "", "", 0, 0, 0, &restart_button()); $conf = &get_config(); print "
\n"; print "\n"; print "\n"; print "
$text{'eports_pano'}
\n"; print "\n"; if ($squid_version >= 2.3) { print "\n"; print "\n"; } else { print &opt_input($text{'eports_pp'}, "http_port", $conf, $text{'default'}, 6); print &opt_input($text{'eports_ita'}, "tcp_incoming_address", $conf, $text{'eports_a'}, 15); print "\n"; } print "\n"; print &opt_input($text{'emisc_sdta'}, "dns_testnames", $conf, $text{'default'}, 40); print "\n"; print "\n"; print "\n"; print &opt_input($text{'emisc_hah'}, "httpd_accel_host", $conf, $text{'default'}, 50); print "\n"; print &opt_input($text{'emisc_hap'}, "httpd_accel_port", $conf, $text{'default'}, 10); print "\n"; print &choice_input($text{'emisc_hawp'}, "httpd_accel_with_proxy", $conf, "off", $text{'on'}, "on", $text{'off'}, "off"); print &choice_input($text{'emisc_hauhh'}, "httpd_accel_uses_host_header", $conf, "off", $text{'yes'}, "on", $text{'no'}, "off"); print "\n"; print "
$text{'eports_paap'}\n"; print "\n", "\n"; foreach $p (&find_config('http_port', $conf)) { push(@ports, @{$p->{'values'}}); } $i = 0; foreach $p (@ports, '') { print "\n"; printf "\n", $p =~ /^(\S+):/ ? $1 : ''; print "\n"; $i++; } print "
$text{'eports_p'}$text{'eports_hia'}
\n", $p =~ /(\d+)$/ ? $1 : ''; printf " All\n", $p =~ /:/ ? '' : 'checked'; printf "\n", $p =~ /:/ ? 'checked' : ''; printf "

\n"; print "
\n"; &ui_print_footer("", $text{'eports_return'});