Handle hostnames with upper-case letters
[webmin.git] / samba / edit_epass.cgi
1 #!/usr/local/bin/perl
2 # edit_epass.cgi
3 # Display a list of samba users for editing
4
5 require './samba-lib.pl';
6 # check acls
7
8 &error_setup("<blink><font color=red>$text{'eacl_aviol'}</font></blink>");
9 &error("$text{'eacl_np'} $text{'eacl_pvusers'}")
10         unless $access{'view_users'};
11 # display
12 &ui_print_header(undef, $text{'smbuser_title'}, "");
13
14 &check_user_enabled($text{'smbuser_cannot'});
15
16 @ulist = &list_users();
17 @ulist = sort { $a->{'name'} cmp $b->{'name'} } @ulist
18         if ($config{'sort_mode'});
19 if (@ulist) {
20         @grid = ( );
21         for($i=0; $i<@ulist; $i++) {
22                 $u = $ulist[$i];
23                 push(@grid, "<a href='edit_euser.cgi?idx=$u->{'index'}'>".
24                             &html_escape($u->{'name'})."</a>");
25                 }
26         print &ui_grid_table(\@grid, 4, 100,
27                 [ "width=25%", "width=25%", "width=25%", "width=25%" ],
28                 undef, $text{'smbuser_list'});
29         }
30 else {
31         print "<b>$text{'smbuser_nouser'}</b> <p>\n";
32         }
33
34 &ui_print_footer("", $text{'index_sharelist'});