Handle hostnames with upper-case letters
[webmin.git] / proftpd / edit_vserv.cgi
1 #!/usr/local/bin/perl
2 # edit_vserv.cgi
3 # Edit <VirtualHost> section details
4
5 require './proftpd-lib.pl';
6 &ReadParse();
7 $vconf = &get_config()->[$in{'virt'}];
8 $desc = &text('virt_header1', $vconf->{'value'});
9 &ui_print_header($desc, $text{'vserv_title'}, "",
10         undef, undef, undef, undef, &restart_button());
11
12 $name = &find_directive("ServerName", $vconf->{'members'});
13 $port = &find_directive("Port", $vconf->{'members'});
14
15 print "<form action=save_vserv.cgi>\n";
16 print "<input type=hidden name=virt value=$in{'virt'}>\n";
17 print "<table border>\n";
18 print "<tr $tb> <td><b>$text{'vserv_title'}</b></td> </tr>\n";
19 print "<tr $cb> <td><table>\n";
20
21 print "<tr> <td><b>$text{'vserv_addr'}</b></td>\n";
22 printf "<td><input name=addr size=30 value='%s'></td> </tr>\n",
23         $vconf->{'value'};
24
25 print "<tr> <td><b>$text{'vserv_name'}</b></td>\n";
26 print "<td>",&opt_input($name, "ServerName", $text{'default'}, 30),
27       "</td> </tr>\n";
28
29 print "<tr> <td><b>$text{'vserv_port'}</b></td>\n";
30 print "<td>",&opt_input($port, "Port", $text{'default'}, 6),
31       "</td> </tr>\n";
32
33 print "<tr> <td colspan=2 align=right>\n";
34 print "<input type=submit value=\"$text{'save'}\">\n";
35 print "<input type=submit value=\"$text{'vserv_delete'}\" name=delete>\n";
36 print "</td> </tr>\n";
37
38 print "</table> </td></tr></table><p>\n";
39 print "</form>\n";
40
41 &ui_print_footer("virt_index.cgi?virt=$in{'virt'}", $text{'virt_return'},
42         "", $text{'index_return'});
43