2 # Show access control options
4 require './frox-lib.pl';
5 &ui_print_header(undef, $text{'acl_title'}, "");
8 print &ui_form_start("save_acl.cgi", "post");
9 print &ui_table_start($text{'acl_header'}, "width=100%", 4);
11 print &config_opt_textbox($conf, "Timeout", 5);
13 print &config_opt_textbox($conf, "MaxForks", 5);
15 print &config_opt_textbox($conf, "MaxForksPerHost", 5);
17 print &config_opt_textbox($conf, "MaxTransferRate", 5, 1, $text{'acl_bps'});
19 print &config_yesno($conf, "DoNTP", undef, undef, "no");
21 print &ui_table_row("", "");
23 print &config_opt_textbox($conf, "NTPAddress", 30, 3, $text{'acl_same'});
27 @acl = &find("ACL", $conf);
28 $table = "<table border width=100%>\n".
30 "<td><b>$text{'acl_action'}</b></td> ".
31 "<td><b>$text{'acl_src'}</b></td> ".
32 "<td><b>$text{'acl_dest'}</b></td> ".
33 "<td><b>$text{'acl_ports'}</b></td> ".
36 foreach $a (@acl, { }, { }, { }) {
37 $table .= "<tr $cb>\n";
38 $table .= "<td>".&ui_select("action_$i",
41 [ "Allow", $text{'acl_allow'} ],
42 [ "Deny", $text{'acl_deny'} ] ]).
44 $table .= "<td>".&ui_opt_textbox("src_$i",
45 $a->{'words'}->[1] eq "*" ? "" :
47 20, $text{'acl_any'})."</td>\n";
48 $table .= "<td>".&ui_opt_textbox("dest_$i",
49 $a->{'words'}->[3] eq "*" ? "" :
51 20, $text{'acl_any'})."</td>\n";
52 $table .= "<td>".&ui_opt_textbox("ports_$i",
53 $a->{'words'}->[4] eq "*" ? "" :
55 10, $text{'acl_any'})."</td>\n";
59 $table .= "</table>\n";
60 print &ui_table_row(undef, $table, 4);
62 print &ui_table_end();
63 print &ui_form_end([ [ 'save', $text{'save'} ] ], "100%");
65 &ui_print_footer("", $text{'index_return'});