<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: members.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."members.php";
add_to_title($locale['global_200'].$locale['400']);
opentable($locale['400']);
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
$rows = dbcount("(user_id)", DB_USERS." WHERE user_status='0'");
if ($rows) {
$i = 0;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='tbl2'><strong>".$locale['401']."</strong></td>\n";
echo "<td class='tbl2'><strong>".$locale['405']."</strong></td>\n";
echo "</tr>\n";
$result = dbquery("SELECT user_id, user_name, user_status, user_level, user_groups FROM ".DB_USERS." WHERE user_status='0' ORDER BY user_level DESC, user_name LIMIT ".$_GET['rowstart'].",20");
while ($data = dbarray($result)) {
$cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); $i++;
echo "<tr>\n<td class='$cell_color'>\n".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>\n";
$groups = "";
$user_groups = explode(".", $data['user_groups']);
$j = 0;
foreach ($user_groups as $key => $value) {
if ($value) {
$groups .= "<a href='profile.php?group_id=".$value."'>".getgroupname($value)."</a>".($j < count($user_groups)-1 ? ", " : "");
}
$j++;
}
echo "<td class='$cell_color'>\n".($groups ? $groups : ($data['user_level'] == 103 ? $locale['407'] : $locale['406']))."</td></tr>\n";
}
echo "</table>\n";
} else {
echo "<div style='text-align:center'><br />\nNothing<br /><br />\n</div>\n";
}
echo "</tr>\n</table>\n";
closetable();
if ($rows > 20) { echo "<div align='center' style='margin-top:5px;'>".makepagenav($_GET['rowstart'],20,$rows,3,FUSION_SELF."?")."</div>\n"; }
require_once THEMES."templates/footer.php";
?>
Quote
afoster wrote:
Thanks for the quick response. That is a start...what I would like is to be able to see what groups each member belongs to like:
username Groups
afoster Team A, Team B, Misc
The groups could also be listed one below the other although that would take up more space as:
afoster Team A
Team B
Misc
Don't know if that is possible though
It might be better to have them displayed in columns with the group names in the header of each column and the members in each group listed below the header?
// Compile access levels & user group array
function getusergroups() {
// Get the name of the access level or user group
function getgroupname($group_id, $return_desc = false) {
Category Forum
User Administration - 8Labels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions