Handle hostnames with upper-case letters
[webmin.git] / wuftpd / edit_alias.cgi
1 #!/usr/local/bin/perl
2 # edit_alias.cgi
3 # Display alias and cd path options
4
5 require './wuftpd-lib.pl';
6 &ui_print_header(undef, $text{'alias_title'}, "", "alias");
7 $conf = &get_ftpaccess();
8
9 print "<form action=save_alias.cgi>\n";
10 print "<table border>\n";
11 print "<tr $tb> <td><b>$text{'alias_header'}</b></td> </tr>\n";
12 print "<tr $cb> <td><table width=100%>\n";
13
14 # display alias options
15 @alias = ( &find_value('alias', $conf), [ ] );
16 print "<tr> <td valign=top><b>$text{'alias_alias'}</b></td>\n";
17 print "<td><table border>\n";
18 print "<tr $tb> <td><b>$text{'alias_from'}</b></td> ",
19       "<td><b>$text{'alias_to'}</b></td> </tr>\n";
20 $i = 0;
21 foreach $a (@alias) {
22         print "<tr $cb>\n";
23         print "<td><input name=from_$i size=15 value='$a->[0]'></td>\n";
24         print "<td><input name=to_$i size=25 value='$a->[1]'></td>\n";
25         print "</tr>\n";
26         $i++;
27         }
28 print "</table></td> </tr>\n";
29
30 # display cdpath options
31 @cdpath = map { $_->[0] } &find_value('cdpath', $conf);
32 print "<tr> <td valign=top><b>$text{'alias_cdpath'}</b></td>\n";
33 print "<td><textarea name=cdpath rows=5 cols=40>",
34         join("\n", @cdpath),"</textarea></td> </tr>\n";
35
36 print "</table></td></tr></table>\n";
37 print "<input type=submit value=\"$text{'save'}\"></form>\n";
38
39 &ui_print_footer("", $text{'index_return'});
40