3 # Edit which addresses are allowed or denied for connection to the server
5 require './jabber-lib.pl';
6 &ui_print_header(undef, $text{'ips_title'}, "", "ips");
8 $conf = &get_jabber_config();
9 $io = &find("io", $conf);
10 @allow = &find("allow", $io);
11 @deny = &find("deny", $io);
13 print "<form action=save_ips.cgi>\n";
14 print "<table border width=100%>\n";
15 print "<tr $tb> <td><b>$text{'ips_header'}</b></td> </tr>\n";
16 print "<tr $cb> <td><table width=100%>\n";
18 print "<tr> <td><b>$text{'ips_allow'}</b></td> ",
19 "<td><b>$text{'ips_deny'}</b></td> </tr>\n";
21 printf "<tr> <td><input type=radio name=allow_def value=1 %s> %s\n",
22 @allow ? "" : "checked", $text{'ips_all'};
23 printf "<input type=radio name=allow_def value=0 %s> %s<br>\n",
24 @allow ? "checked" : "", $text{'ips_sel'};
25 print "<textarea name=allow rows=8 cols=30>\n";
27 local $ip = &find_value("ip", $a), $nm = &find_value("mask", $a);
28 if ($nm) { print "$ip/$nm\n"; }
29 else { print "$ip\n"; }
31 print "</textarea></td>\n";
33 printf "<td><input type=radio name=deny_def value=1 %s> %s\n",
34 @deny ? "" : "checked", $text{'ips_none'};
35 printf "<input type=radio name=deny_def value=0 %s> %s<br>\n",
36 @deny ? "checked" : "", $text{'ips_sel'};
37 print "<textarea name=deny rows=8 cols=30>\n";
39 local $ip = &find_value("ip", $a), $nm = &find_value("mask", $a);
40 if ($nm) { print "$ip/$nm\n"; }
41 else { print "$ip\n"; }
43 print "</textarea></td> </tr>\n";
45 print "</table></td></tr></table>\n";
46 print "<input type=submit value='$text{'save'}'></form>\n";
48 &ui_print_footer("", $text{'index_return'});