Posted on: 03/31/05 07:56pm
By: Anonymous (ohNoes!)
Posted on: 04/01/05 01:23am
By: Dirk
Posted on: 04/01/05 09:20am
By: Anonymous (ohNoes!)
Posted on: 04/01/05 12:50pm
By: Dirk
Posted on: 04/01/05 07:01pm
By: Anonymous (ohNoes!)
Posted on: 04/02/05 07:16pm
By: lgriffin
/*** * List group members (recursive) - 'List Group Members' Block * Srikanth Bedathur v1.0 December 25, 2003 * Many thanks to Blaine Lang */ function phpblock_groupMembers () { global $PHP_SELF,$_CONF, $HTTP_POST_VARS,$_TABLES, $_USER; $checked = array (); $retval = '<form action="' .$_CONF['site_url']. '/index.php" method="POST">'; $retval .= '<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">'; $retval .= '<tr>'; $retval .= '<td colspan="3" height="30" align="left"><font size="-2">Select Group to list members</font><br></td>'; $retval .= '</tr><tr>'; $retval .= '<td align="left" STYLE="width:55px"><b>Group:</b></td>'; $retval .= '<td colspan="2" align="left" height="25">'; $retval .= '<select name="groupid" STYLE="width:130px">'; $retval .= COM_optionList ($_TABLES['groups'],'grp_id,grp_name',$HTTP_POST_VARS['groupid']) . '</select> '; $retval .= '</td>'; $retval .= '</tr>'; $retval .= '<tr><td colspan"2" STYLE="width:55px"> </td>'; $retval .= '<td colspan="2" align="left" width="100%" height="30" ><input type=submit name="getMemberList" value="List"></td>'; $retval .= '<tr><td align="left" valign="top" STYLE="width:55px"><b>Members: </b></td><td>'; $retval .= '<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">'; if (isset($HTTP_POST_VARS['getMemberList'])) { $groups = getMemberGroups($HTTP_POST_VARS['groupid'], $checked); $ngroups = count( $groups ); COM_errorLOG("Num of groups found: '. $ngroups"); $chkretval =""; $profileurl = '<a href="/users.php?mode=profile&uid='; if ($ngroups > 0) { $mygrouplist = implode (',' , $groups ); $sql = "FROM {$_TABLES['users']},{$_TABLES['group_assignments']} WHERE {$_TABLES['users']}.uid > 1 AND {$_TABLES['users']}.uid = {$_TABLES['group_assignments']}.ug_uid AND ({$_TABLES['group_assignments']}.ug_main_grp_id IN ({$mygrouplist}))"; $result = DB_query ("SELECT DISTINCT username, uid " . $sql. " ORDER BY username "); $nrows = DB_numRows ($result); for ($i = 0; $i < $nrows; $i++) { $A = DB_fetchArray ($result); $chkretval = $chkretval.'<tr><td colspan="2" align="left"><font size="-2"> '. $profileurl. $A['uid'].'">'. $A['username'] . '</a></font></td></tr>'; } } $retval .= $chkretval . '</table></td></tr>'; } else { $retval .= '</table></td></tr>'; } $retval .= '</table>'; $retval .= '</form>'; return $retval; }
Posted on: 04/16/05 07:42pm
By: sharon
Posted on: 05/09/05 11:56am
By: sharon
Posted on: 05/09/05 08:55pm
By: drshakagee