1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
while($user = $db->fetch_array($query))
{
$comma = $groups_list = '';
$user['view']['username'] = "<a href=\"index.php?module=user-users&action=edit&uid={$user['uid']}\">".format_name($user['username'], $user['usergroup'], $user['displaygroup'])."</a>";
$user['view']['usergroup'] = $usergroups[$user['usergroup']]['title'];
if($user['additionalgroups'])
{
$additional_groups = explode(",", $user['additionalgroups']);
foreach($additional_groups as $group)
{
$groups_list .= "{$comma}{$usergroups[$group]['title']}";
$comma = $lang->comma;
}
}
if(!$groups_list)
{
$groups_list = $lang->none;
}
$user['view']['additionalgroups'] = "<small>{$groups_list}</small>";
$user['view']['email'] = "<a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>";
$user['view']['regdate'] = my_date($mybb->settings['dateformat'], $user['regdate']).", ".my_date($mybb->settings['timeformat'], $user['regdate']);
$user['view']['lastactive'] = my_date($mybb->settings['dateformat'], $user['lastactive']).", ".my_date($mybb->settings['timeformat'], $user['lastactive']);
$popup = new PopupMenu("user_{$user['uid']}", $lang->options);
$popup->add_item($lang->edit_profile_and_settings, "index.php?module=user-users&action=edit&uid={$user['uid']}");
$popup->add_item($lang->ban_user, "index.php?module=user-banning&uid={$user['uid']}#username");
if($user['usergroup'] == 5)
{
if($user['coppauser'])
{
$popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
}
else
{
$popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
}
}
$popup->add_item($lang->delete_user, "index.php?module=user-users&action=delete&uid={$user['uid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->user_deletion_confirmation}')");
$popup->add_item($lang->show_referred_users, "index.php?module=user-users&action=referrers&uid={$user['uid']}");
$popup->add_item($lang->show_ip_addresses, "index.php?module=user-users&action=ipaddresses&uid={$user['uid']}");
$popup->add_item($lang->show_attachments, "index.php?module=forum-attachments&results=1&username=".urlencode(htmlspecialchars_uni($user['username'])));
$user['view']['controls'] = $popup->fetch();
if($usergroups[$user['usergroup']]['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)
{
$user['view']['reputation'] = get_reputation($user['reputation']);
}
else
{
$reputation = "-";
}
if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0)
{
$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
if($warning_level > 100)
{
$warning_level = 100;
}
$user['view']['warninglevel'] = get_colored_warning_level($warning_level);
}
if($user['avatar'] && !stristr($user['avatar'], 'http://'))
{
$user['avatar'] = "../{$user['avatar']}";
}
if($view['view_type'] == "card")
{
$scaled_avatar = fetch_scaled_avatar($user, 80, 80);
}
else
{
$scaled_avatar = fetch_scaled_avatar($user, 34, 34);
}
if(!$user['avatar'])
{
$user['avatar'] = "styles/{$page->style}/images/default_avatar.gif";
}
$user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
if($view['view_type'] == "card")
{
$users .= build_user_view_card($user, $view, $i);
}
else
{
build_user_view_table($user, $view, $table);
}
}
|