$table->head[1] = __('Max.Response'); $table->head[2] = __('Max.Resolution'); $table->head[3] = __('Max.Tickets'); $table->head[4] = __('Max.Inactivity'); $table->head[5] = __('Enforced'); $table->head[6] = __('Parent'); $table->head[7] = __('Delete'); foreach ($slas as $sla) { $data = array (); $data[0] = "<a href='index.php?sec=incidents&sec2=operation/slas/sla_detail&id=".$sla['id']."'>".$sla['name']."</a>"; $data[1] = incidents_hours_to_dayminseg($sla['min_response']); $data[2] = incidents_hours_to_dayminseg($sla['max_response']); $data[3] = $sla['max_incidents']; $data[4] = incidents_hours_to_dayminseg($sla['max_inactivity']); if ($sla['enforced'] == 1) $data[5] = __("Yes"); else $data[5] = __("No"); $data[6] = get_db_value ('name', 'tsla', 'id', $sla['id_sla_base']); $data[7] = '<a href="index.php?sec=incidents& sec2=operation/slas/sla_detail& delete_sla=1&id='.$sla['id'].'" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;"> <img src="images/cross.png"></a>'; array_push ($table->data, $data); } echo "<div class='divresult'>";
echo "</tr>"; $user_fields = get_db_all_rows_sql("SELECT t.label, t2.data \n\t\t\t\t\t\t\tFROM tuser_field t, tuser_field_data t2\n\t\t\t\t\t\t\tWHERE t2.id_user='******'\n\t\t\t\t\t\t\tAND t.id=t2.id_user_field"); if ($user_fields) { foreach ($user_fields as $field) { echo "<tr align='left'>"; echo "<td>"; echo '<b>' . $field["label"] . ': ' . '</b>' . $field['data']; echo "</td>"; } } echo "</table>"; return; } if ($hours_to_dms) { $hours = get_parameter('hours'); $result = incidents_hours_to_dayminseg($hours); echo json_encode($result); return; } if ($check_incident_childs) { $id_incident = get_parameter('id_incident'); if ($id_incident == 0) { echo false; return; } $sql = "SELECT id_incidencia, titulo FROM tincidencia WHERE id_parent=" . $id_incident . " AND estado<>7"; $incident_childs = get_db_all_rows_sql($sql); if ($incident_childs == false) { $incident_childs = array(); } if (!empty($incident_childs)) {