".__('Zero results found')."
\n";
} else {
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->width = '98%';
$table->class = 'databox';
$table->align = [];
$table->align[4] = 'center';
$table->head = [];
$table->head[0] = __('User ID').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectUserIDUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectUserIDDown]).'';
$table->head[1] = __('Name').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectNameUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectNameDown]).'';
$table->head[2] = __('Email').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectEmailUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectEmailDown]).'';
$table->head[3] = __('Last contact').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectLastContactUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectLastContactDown]).'';
$table->head[4] = __('Profile').' '.''.html_print_image('images/sort_up.png', true, ['style' => $selectProfileUp]).''.''.html_print_image('images/sort_down.png', true, ['style' => $selectProfileDown]).'';
$table->head[5] = __('Description');
$table->data = [];
foreach ($users as $user) {
$userIDCell = "".$user['id_user'].'';
if ($user['is_admin']) {
$profileCell = html_print_image(
'images/user_suit.png',
true,
[
'alt' => __('Admin'),
'title' => __('Administrator'),
]
).' ';
} else {
$profileCell = html_print_image(
'images/user_green.png',
true,
[
'alt' => __('User'),
'title' => __('Standard User'),
]
).' ';
}
$result = db_get_all_rows_field_filter('tusuario_perfil', 'id_usuario', $user['id_user']);
if ($result !== false) {
foreach ($result as $row) {
$text_tip .= profile_get_name($row['id_perfil']);
$text_tip .= ' / ';
$text_tip .= groups_get_name($row['id_grupo']);
$text_tip .= '
';
}
} else {
$text_tip .= __('The user doesn\'t have any assigned profile/group');
}
$profileCell .= ui_print_help_tip($text_tip, true);
array_push(
$table->data,
[
$userIDCell,
$user['fullname'],
"".$user['email'].'',
ui_print_timestamp($user['last_connect'], true),
$profileCell,
$user['comments'],
]
);
}
echo '
';
// ui_pagination($totalUsers);
html_print_table($table);
unset($table);
ui_pagination($totalUsers);
}