#!/usr/local/bin/perl # list_authgroups.cgi # Displays a list of groups and their members require './apache-lib.pl'; require './auth-lib.pl'; $conf = &get_config(); &ReadParse(); &allowed_auth_file($in{'file'}) || &error(&text('authg_ecannot', $in{'file'})); $desc = &text('authg_header', "$in{'file'}"); &ui_print_header($desc, $text{'authg_title'}, ""); $f = &server_root($in{'file'}, $conf); @groups = sort { $a->{'name'} cmp $b->{'name'} } &list_authgroups($in{'file'}); if (@groups) { print "\n"; print "\n"; print "
",&text('authg_header2', "$f"), "
\n"; print " ", "\n"; for($i=0; $i<@groups; $i++) { $g = $groups[$i]->{'group'}; @m = @{$groups[$i]->{'members'}}; if (@m > 15) { @m = @m[0..14]; } printf "\n", &urlize($f), &urlize(&this_url()); printf "\n", @m ? join(" , ", @m) : "None"; } print "
$text{'authg_group'}$text{'authg_mems'}
$g%s
\n"; } else { print "",&text('authg_none', "$f"),"

\n"; } printf "%s

\n", &urlize($f), &urlize(&this_url()), $text{'authg_add'}; &ui_print_footer($in{'url'}, $text{'auth_return'});