3 # Display network-related options
5 require './wuftpd-lib.pl';
6 &ui_print_header(undef, $text{'net_title'}, "", "net");
8 $conf = &get_ftpaccess();
9 @class = &find_value("class", $conf);
11 print "<form action=save_net.cgi>\n";
12 print "<table border>\n";
13 print "<tr $tb> <td><b>$text{'net_header'}</b></td> </tr>\n";
14 print "<tr $cb> <td><table width=100%>\n";
16 # Display TCP window options
17 @tcp = ( &find_value('tcpwindow', $conf), [ ] );
18 print "<tr> <td valign=top><b>$text{'net_tcp'}</b></td>\n";
19 print "<td colspan=3><table border>\n";
20 print "<tr $tb> <td><b>$text{'net_tsize'}</b></td> ",
21 "<td><b>$text{'net_tclass'}</b></td> </tr>\n";
25 print "<td><input name=tsize_$i size=5 value='$t->[0]'></td>\n";
26 print "<td><select name=tclass_$i>\n";
27 printf "<option value='' %s>%s\n",
28 $t->[1] ? '' : 'checked', $text{'net_tall'};
30 printf "<option %s>%s\n",
31 $t->[1] eq $c->[0] ? 'selected' : '', $c->[0];
33 print "</select></td> </tr>\n";
36 print "</table></td>\n";
37 print "<tr> <td colspan=4><hr></td> </tr>\n";
39 # passive address options
40 @pasv = ( ( grep { $_->[0] eq 'address' } &find_value('passive', $conf) ), [ ]);
41 print "<tr> <td valign=top><b>$text{'net_pasvaddr'}</b></td>\n";
42 print "<td colspan=3><table border>\n";
43 print "<tr $tb> <td><b>$text{'net_pip'}</b></td> ",
44 "<td><b>$text{'net_pcidr'}</b></td> </tr>\n";
48 print "<td><input name=aip_$i size=15 value='$p->[1]'></td>\n";
49 local @ci = split(/\//, $p->[2]);
50 print "<td><input name=anet_$i size=15 value='$ci[0]'> /\n";
51 print "<input name=acidr_$i size=2 value='$ci[1]'></td>\n";
55 print "</table></td></tr>\n";
57 # passive port options
58 @pasv = ( ( grep { $_->[0] eq 'ports' } &find_value('passive', $conf) ), [ ] );
59 print "<tr> <td valign=top><b>$text{'net_pasvport'}</b></td>\n";
60 print "<td colspan=3><table border>\n";
61 print "<tr $tb> <td><b>$text{'net_prange'}</b></td> ",
62 "<td><b>$text{'net_pcidr'}</b></td> </tr>\n";
66 print "<td><input name=pmin_$i size=5 value='$p->[2]'> -\n";
67 print "<input name=pmax_$i size=5 value='$p->[3]'></td>\n";
68 local @ci = split(/\//, $p->[1]);
69 print "<td><input name=pnet_$i size=15 value='$ci[0]'> /\n";
70 print "<input name=pcidr_$i size=2 value='$ci[1]'></td>\n";
74 print "</table></td></tr>\n";
76 print "</table></td></tr></table>\n";
77 print "<input type=submit value=\"$text{'save'}\"></form>\n";
79 &ui_print_footer("", $text{'index_return'});