$date_from = get_parameter("date_from", 0);
$date_to = get_parameter("date_to", 0);
$mode = get_parameter("mode", 1);
$percent = get_parameter("percent", 0);
$days = get_parameter("days", 0);
$type = get_parameter("type", "");
$background = get_parameter("background", "#ffffff");
$id_incident = get_parameter("id_incident");
$period = get_parameter("period");
$ajax = get_parameter("is_ajax");
if ($type == "incident_a") {
    incident_peruser($width, $height);
} elseif ($type == "workunit_task") {
    graph_workunit_task($width, $height, $id_task);
} elseif ($type == "workunit_user") {
    graph_workunit_user($width, $height, $id_user, $date_from);
} elseif ($type == "workunit_project_user") {
    graph_workunit_project_user($width, $height, $id_user, $date_from, $date_to);
} elseif ($type == "project_tree") {
    project_tree($id_project, $id_user);
} elseif ($type == "all_project_tree") {
    all_project_tree($id_user, $completion, $project_kind);
} elseif ($type == "sla_slicebar") {
    if ($ajax) {
        echo graph_sla_slicebar($id_incident, $period, $width, $height);
    } else {
        graph_sla_slicebar($id_incident, $period, $width, $height);
    }
}
// Always at the end of the funtions_graph
include_flash_chart_script();
        $ttl = 2;
    }
    if ($clean_output) {
        $incident_sla .= "<strong>" . $fields[$period] . "</strong>";
    } else {
        $incident_sla .= print_select($fields, "period", $period, 'reload_sla_slice_graph(\'' . $id . '\');', '', '', true, 0, false, false, false, 'width: 75px');
    }
    $incident_sla .= "</td>";
    $incident_sla .= "<td colspan=2 style='text-align: center; width: 50%;'>";
    $incident_sla .= __('SLA total compliance (%)') . ': ';
    $incident_sla .= format_numeric(get_sla_compliance_single_id($id));
    $incident_sla .= "</td>";
    $incident_sla .= "</tr>";
    $incident_sla .= "<tr>";
    $incident_sla .= "<td id=slaSlicebarField colspan=2 style='text-align: center; padding: 1px 2px 1px 5px;'>";
    $incident_sla .= graph_sla_slicebar($id, $period, 155, 15, $ttl);
    $incident_sla .= "</td>";
    $incident_sla .= "<td colspan=2 style='text-align: center;' >";
    $incident_sla .= "<div class='pie_frame'>";
    $incident_sla .= graph_incident_sla_compliance($id, 155, 80, $ttl);
    $incident_sla .= "</div>";
    $incident_sla .= "</td>";
    $incident_sla .= "<tr>";
    $incident_sla .= "</table>";
}
$right_side .= print_container('incident_sla', __('SLA information'), $incident_sla);
$table->data[0][0] = $left_side;
$table->data[0][1] = $right_side;
echo "<div id='indicent-details-view'>";
echo '<h1>' . __('Tickets') . ' #' . $incident["id_incidencia"] . ' - ' . ui_print_truncate_text($incident['titulo'], 50);
if (!$clean_output) {