'.__('No incidents associated to this agent').'
';
return;
}
// Show pagination
ui_pagination($count, $url, $offset, 0, false, 'offset');
// ($count + $offset) it's real count of incidents because it's use LIMIT $offset in query.
echo '
';
// Show headers
$table->width = '100%';
$table->class = 'databox';
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->head = [];
$table->data = [];
$table->size = [];
$table->align = [];
$table->head[0] = __('ID');
$table->head[1] = __('Status');
$table->head[2] = __('Incident');
$table->head[3] = __('Priority');
$table->head[4] = __('Group');
$table->head[5] = __('Updated');
$table->head[6] = __('Source');
$table->head[7] = __('Owner');
$table->size[0] = 43;
$table->size[7] = 50;
$table->align[1] = 'center';
$table->align[3] = 'center';
$table->align[4] = 'center';
$rowPair = true;
$iterator = 0;
foreach ($result as $row) {
if ($rowPair) {
$table->rowclass[$iterator] = 'rowPair';
} else {
$table->rowclass[$iterator] = 'rowOdd';
}
$rowPair = !$rowPair;
$iterator++;
$data = [];
$data[0] = ''.$row['id_incidencia'].'';
$attach = incidents_get_attach($row['id_incidencia']);
if (!empty($attach)) {
$data[0] .= ' '.html_print_image('images/attachment.png', true, ['style' => 'align:middle;']);
}
$data[1] = incidents_print_status_img($row['estado'], true);
$data[2] = ''.substr(io_safe_output($row['titulo']), 0, 45).'';
$data[3] = incidents_print_priority_img($row['prioridad'], true);
$data[4] = ui_print_group_icon($row['id_grupo'], true);
$data[5] = ui_print_timestamp($row['actualizacion'], true);
$data[6] = $row['origen'];
$data[7] = ui_print_username($row['id_usuario'], true);
array_push($table->data, $data);
}
html_print_table($table);
echo '';
unset($table);
echo '
';
echo '