3 # A form for editing admin options
5 require './squid-lib.pl';
6 $access{'admopts'} || &error($text{'eadm_ecannot'});
7 &ui_print_header(undef, $text{'eadm_header'}, "", "edit_admin", 0, 0, 0, &restart_button());
10 print "<form action=save_admin.cgi>\n";
11 print "<table border width=100%>\n";
12 print "<tr $tb> <td><b>$text{'eadm_aao'}</b></td> </tr>\n";
13 print "<tr $cb> <td><table width=100%>\n";
15 if ($squid_version < 2) {
17 $v = &find_config("cache_effective_user", $conf);
18 print "<td><b>$text{'eadm_runasuu'}</b></td> <td colspan=3>\n";
19 printf "<input type=radio name=effective_def value=1 %s> $text{'eadm_nochange'}\n",
21 printf " <input type=radio name=effective_def value=0 %s>\n",
23 print $text{'eadm_user'} ,&unix_user_input("effective_u",
24 $v->{'values'}->[0]),"\n";
25 print $text{'eadm_group'} ,&unix_group_input("effective_g",
26 $v->{'values'}->[1]),"\n";
27 print "</td> </tr>\n";
31 print &opt_input($text{'eadm_runasuu'}, "cache_effective_user", $conf,
32 $text{'eadm_nochange'}, 8,
33 &user_chooser_button("cache_effective_user", 0));
34 print &opt_input($text{'eadm_runasug'}, "cache_effective_group", $conf,
35 $text{'eadm_nochange'}, 8,
36 &group_chooser_button("cache_effective_group", 0));
41 print &opt_input($text{'eadm_cmemail'}, "cache_mgr",
42 $conf, $text{'eadm_default'}, 35);
46 print &opt_input($text{'eadm_vhost'}, "visible_hostname",
47 $conf, $text{'eadm_auto'}, 35);
50 if ($squid_version < 2) {
52 print &opt_input($text{'eadm_annto'}, "announce_to",
53 $conf, $text{'eadm_default'}, 40);
57 print &opt_input($text{'eadm_every'}, "cache_announce", $conf,
58 $text{'eadm_never'}, 6, "hours");
63 print &opt_input($text{'eadm_uniq'}, "unique_hostname",
64 $conf, $text{'eadm_auto'}, 35);
67 if ($squid_version >= 2.4) {
69 print &opt_input($text{'eadm_haliases'}, "hostname_aliases",
70 $conf, $text{'eadm_none'}, 35);
75 print &opt_input($text{'eadm_cah'}, "announce_host", $conf,
76 $text{'eadm_default'}, 20);
77 print &opt_input($text{'eadm_cap'}, "announce_port", $conf,
78 $text{'eadm_default'}, 6);
82 print &opt_input($text{'eadm_caf'}, "announce_file", $conf,
83 $text{'eadm_none'}, 35, &file_chooser_button("announce_file"));
87 print &opt_time_input($text{'eadm_annp'}, "announce_period", $conf,
88 $text{'eadm_default'}, 4);
92 print "</table></td></tr></table>\n";
93 print "<input type=submit value=$text{'eadm_buttsave'}></form>\n";
95 &ui_print_footer("", $text{'eadm_return'});