cabal_box
|
|
By hurstdog , Section Code [] Posted on Mon Mar 19, 2001 at 12:00:00 PM PST
|
|
First, I must remind you. TINK5C, really. Except for this one, but thats beside the point. Anyway, here is the cabal_box, what it does is list every user with permissions above an Anonymous user and a regular User. The box is posted below.
|
## begin cabal_box
return '' unless ($S->have_perm('edit_user'));
my $select = qq{ select * from users where perm_group!='Anonymous' and perm_group != 'Users'};
my ($rv, $sth) = $S->db_select({
FROM => 'users',
WHAT => '*',
WHERE => qq{perm_group!='Anonymous' and perm_group != 'Users'},
});
return '' unless $rv;
my $retval = "";
while( my $user = $sth->fetchrow_hashref ) {
$retval .= qq{ + ($user->{perm_group})
<a href="|rootdir|?op=user;tool=info;nick=$user->{nickname}">$user->{nickname}</a><br> };
}
return $retval;
## end cabal_box
So thats it, its pretty simple. Shouldn't be too hard to get it to show whatever groups you want, too. Ok, that looks horrible unless your browser supports <code> So I'm going to set up scoop.k5 to allow <pre> too, then I'll fix the formatting (since it looks horrible in my browser) |
|
Story Views
|
38 Scoop users have viewed this story.
|
|