Handle hostnames with upper-case letters
[webmin.git] / apache / edit_mods.cgi
1 #!/usr/local/bin/perl
2 # Show Apache modules that are enabled by the distro config files
3
4 require './apache-lib.pl';
5 &ReadParse();
6 $access{'global'} == 1 || &error($text{'mods_ecannot'});
7 &ui_print_header(undef, $text{'mods_title'}, "");
8
9 print $text{'mods_desc'},"<p>\n";
10
11 # Show a table of modules, in two columns
12 print &ui_form_start("save_mods.cgi", "post");
13 @mods = &list_configured_apache_modules();
14
15 $sp = int(@mods/2);
16 foreach my $ms ([ @mods[0..$sp] ], [ @mods[$sp+1..$#mods] ]) {
17         @tds = ( "width=5" );
18         $g = &ui_columns_start([ "",
19                                  $text{'mods_mod'},
20                                  $text{'mods_state'} ], undef, 0, \@tds);
21         foreach $m (@$ms) {
22                 $g .= &ui_checked_columns_row([
23                         $m->{'mod'},
24                         $m->{'enabled'} ? $text{'mods_enabled'} :
25                          $m->{'disabled'} ? $text{'mods_disabled'} :
26                                             $text{'mods_available'}
27                         ], \@tds, "m", $m->{'mod'}, $m->{'enabled'});
28                 }
29         $g .= &ui_columns_end();
30         push(@grid, $g);
31         }
32 print &ui_grid_table(\@grid, 2, 100);
33 print &ui_form_end([ [ undef, $text{'mods_save'} ] ]);
34
35 &ui_print_footer("", $text{'index_return'});
36