Handle hostnames with upper-case letters
[webmin.git] / foobar / index.cgi
1 #!/usr/bin/perl
2 # Show all Foobar webserver websites
3
4 require 'foobar-lib.pl';
5
6 ui_print_header(undef, $module_info{'desc'}, "", undef, 1, 1);
7
8 # Build table contents
9 my @sites = list_foobar_websites();
10 my @table = ( );
11 foreach my $s (@sites) {
12         push(@table, [ "<a href='edit.cgi?domain=".urlize($s->{'domain'}).
13                        "'>".html_escape($s->{'domain'})."</a>",
14                        html_escape($s->{'directory'})
15                      ]);
16         }
17
18 # Show the table with add links
19 print ui_form_columns_table(
20         undef,
21         undef,
22         0,
23         [ [ 'edit.cgi?new=1', $text{'index_add'} ] ],
24         undef,
25         [ $text{'index_domain'}, $text{'index_directory'} ],
26         100,
27         \@table,
28         undef,
29         0,
30         undef,
31         $text{'index_none'},
32         );
33
34 ui_print_footer('/', $text{'index'});