Handle hostnames with upper-case letters
[webmin.git] / webmin / edit_blocked.cgi
1 #!/usr/local/bin/perl
2 # Show a list of blocked users and hosts
3
4 require './webmin-lib.pl';
5 &ui_print_header(undef, $text{'blocked_title'}, "");
6 &get_miniserv_config(\%miniserv);
7 @blocked = &get_blocked_users_hosts(\%miniserv);
8
9 if (@blocked) {
10         print &ui_columns_start([ $text{'blocked_type'},
11                                   $text{'blocked_who'},
12                                   $text{'blocked_fails'},
13                                   $text{'blocked_when'},
14                                 ]);
15         foreach $b (@blocked) {
16                 print &ui_columns_row([
17                         $text{'blocked_'.$b->{'type'}},
18                         $b->{'user'} || $b->{'host'},
19                         $b->{'fails'},
20                         &make_date($b->{'when'}),
21                         ]);
22                 }
23         print &ui_columns_end();
24         print &ui_hr();
25         print &ui_buttons_start();
26         print &ui_buttons_row("clear_blocked.cgi",
27                               $text{'blocked_clear'},
28                               $text{'blocked_cleardesc'});
29         print &ui_buttons_end();
30         }
31 else {
32         print "<b>$text{'blocked_none'}</b><p>\n";
33         }
34
35 &ui_print_footer("", $text{'index_return'});