$table->width = '100%'; $table->class = 'listing'; $table->data = array (); $table->size = array (); $table->style = array (); $table->head[0] = __('# ID'); $table->head[1] = __('Title'); $table->head[2] = __('Creation datetime'); $table->head[3] = __('Status'); $table->head[4] = __('WU time (hr)'); $statuses = get_indicent_status (); foreach ($incidents as $incident) { $data = array (); if ((user_belong_incident ($config["id_user"], $incident["id_incidencia"])) OR (dame_admin ($config["id_user"]))) { $data[0] = $incident["id_incidencia"]; $data[1] = "<a href='index.php?sec=incidents&sec2=operation/incidents/incident_dashboard_detail&id=".$incident["id_incidencia"]."'>".$incident["titulo"]."</a>"; $data[2] = $incident["inicio"]; $data[3] = $statuses[$incident['estado']]; $data[4] = get_incident_workunit_hours($incident["id_incidencia"]); array_push ($table->data, $data); } } print_table ($table); } }
echo __("Ticket management"); echo "</h3>"; $table->width = '80%'; $table->class = 'listing'; $table->data = array(); $table->size = array(); $table->style = array(); $table->head[0] = __('# ID'); $table->head[1] = __('Title'); $table->head[2] = __('Creation datetime'); $table->head[3] = __('Status'); $table->head[4] = __('WU time (hr)'); $statuses = get_indicent_status(); foreach ($incidents as $incident) { $data = array(); if (user_belong_incident($config["id_user"], $incident["id_incidencia"]) or dame_admin($config["id_user"])) { $data[0] = $incident["id_incidencia"]; $data[1] = "<a href='index.php?sec=incidents&sec2=operation/incidents/incident_dashboard_detail&id=" . $incident["id_incidencia"] . "'>" . $incident["titulo"] . "</a>"; $data[2] = $incident["inicio"]; $data[3] = $statuses[$incident['estado']]; $data[4] = get_incident_workunit_hours($incident["id_incidencia"]); array_push($table->data, $data); } } print_table($table); } } // Projects if (give_acl($config["id_user"], 0, "PR") && $show_projects != MENU_HIDDEN) { $sql = "SELECT tproject.id as project_id, ttask.id as task_id, tproject.name as pname, ttask.name as tname FROM \n\t\t\ttproject, ttask WHERE tproject.disabled = 0 AND ttask.id_project = tproject.id AND (ttask.name LIKE '%{$search_string}%' \n\t\t\tOR tproject.name LIKE '%{$search_string}%')"; $tasks = get_db_all_rows_sql($sql);