Handle hostnames with upper-case letters
[webmin.git] / postfix / master.cgi
1 #!/usr/local/bin/perl
2 # Show a table of Postfix server processes
3
4 require './postfix-lib.pl';
5
6 $access{'master'} || &error($text{'master_ecannot'});
7 &ui_print_header(undef, $text{'master_title'}, "", "master");
8 $master = &get_master_config();
9
10 print "<a href='edit_master.cgi?new=1'>$text{'master_add'}</a><br>\n";
11 print &ui_columns_start([ $text{'master_name'},
12                           $text{'master_enabled'},
13                           $text{'master_type'},
14                           $text{'master_private'},
15                           $text{'master_unpriv'},
16                           $text{'master_chroot'},
17                           $text{'master_max'} ], "100%");
18 foreach $m (@$master) {
19         print &ui_columns_row([
20                 "<a href='edit_master.cgi?name=".&urlize($m->{'name'}).
21                  "&type=".&urlize($m->{'type'})."'>".
22                  $m->{'name'}."</a>",
23                 $m->{'enabled'} ? $text{'yes'} :
24                         "<font color=#ff0000>$text{'no'}</font>",
25                 $text{'master_'.$m->{'type'}},
26                 $m->{'private'} eq 'n' ? $text{'no'} : $text{'yes'},
27                 $m->{'unpriv'} eq 'n' ? $text{'no'} : $text{'yes'},
28                 $m->{'chroot'} eq 'n' ? $text{'no'} : $text{'yes'},
29                 $m->{'maxprocs'} eq "-" ? $text{'default'} :
30                  $m->{'maxprocs'} eq "0" ? $text{'master_unlimit'} :
31                                           $m->{'maxprocs'},
32                         ]);
33         }
34 print &ui_columns_end();
35 print "<a href='edit_master.cgi?new=1'>$text{'master_add'}</a><br>\n";
36
37 &ui_print_footer("", $text{'index_return'});