'.__('Pandora users').' > '.__('Users defined in Pandora').'';
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->width = 700;
$table->class = "databox";
$table->head = array ();
$table->data = array ();
$table->align = array ();
$table->head[0] = __('User ID');
$table->head[1] = __('Name');
$table->head[2] = __('Last contact');
$table->head[3] = __('Profile');
$table->head[4] = __('Description');
$table->align[2] = "center";
$table->align[3] = "center";
$info = array ();
if (give_acl ($config["id_user"], 0, "UM") == 1) {
$info = get_users ();
} else {
$info[$config["id_user"]] = get_user_info ($config["id_user"]);
}
foreach ($info as $user_id => $user_info) {
$data[0] = ''.$user_id.'';
$data[1] = $user_info["fullname"].'';
$data[1] .= __('First name').': '.$user_info["firstname"].'
';
$data[1] .= __('Last name').': '.$user_info["lastname"].'
';
$data[1] .= __('Phone').': '.$user_info["phone"].'
';
$data[1] .= __('E-mail').': '.$user_info["email"].'
';
$data[1] .= '';
$data[2] = print_timestamp ($user_info["last_connect"], true);
if ($user_info["is_admin"]) {
$data[3] = print_image ("images/user_suit.png", true, array ("alt" => __('Admin'), "title" => __('Administrator'))).' ';
} else {
$data[3] = print_image ("images/user_green.png", true, array ("alt" => __('User'), "title" => __('Standard User'))).' ';
}
$data[3] .= '';
$result = get_db_all_rows_field_filter ("tusuario_perfil", "id_usuario", $user_id);
if (!empty ($result)) {
foreach ($result as $row) {
$data[3] .= get_profile_name ($row["id_perfil"]);
$data[3] .= " / ";
$data[3] .= get_group_name ($row["id_grupo"]);
$data[3] .= "
";
}
} else {
$data[3] .= __('The user doesn\'t have any assigned profile/group');
}
$data[3] .= "";
$data[4] = print_string_substr ($user_info["comments"], 24, true);
array_push ($table->data, $data);
}
print_table ($table);
unset ($table);
echo '