Handle hostnames with upper-case letters
[webmin.git] / itsecur-firewall / list_pat.cgi
1 #!/usr/bin/perl
2 # list_pat.cgi
3 # Show table of incoming forwarded ports
4
5 require './itsecur-lib.pl';
6 &can_use_error("pat");
7 &header($text{'pat_title'}, "",
8         undef, undef, undef, undef, &apply_button());
9 print "<hr>\n";
10
11 @forwards = &get_pat();
12 print "<form action=save_pat.cgi>\n";
13 print "<table border>\n";
14 print "<tr $tb> <td><b>$text{'pat_header'}</b></td> </tr>\n";
15 print "<tr $cb> <td><table>\n";
16
17 print "<tr> <td valign=top><b>$text{'pat_forward'}</b></td> ",
18       "<td><table border>\n";
19 print "<tr $tb> <td><b>$text{'pat_service'}</b></td> ",
20       "<td><b>$text{'pat_host'}</b></td> ",
21       "<td><b>$text{'pat_iface'}</b></td> </tr>\n";
22 $j = 0;
23 foreach $f (@forwards, { }, { }, { }) {
24         print "<tr $cb>\n";
25         print "<td>",&service_input("service_$j", $f->{'service'}, 1),"</td>\n";
26         print "<td><input name=host_$j size=30 value='$f->{'host'}'></td>\n";
27         print "<td>",&iface_input("iface_$j", $f->{'iface'},
28                                   0, 1, 1),"</td>\n";
29         print "</tr>\n";
30         $j++;
31         }
32 print "</table></td> </tr>\n";
33
34 print "</table></td></tr></table>\n";
35 print "<input type=submit value='$text{'save'}'></form>\n";
36 &can_edit_disable("pat");
37
38 print "<hr>\n";
39 &footer("", $text{'index_return'});