case "edit_line": if (isset($_POST['status']) && $_POST['status'] == "edit") { edit_line($_POST['idx'], $php_self); edit_line_form($_POST['idx'], $php_self); } else { edit_line_form($_GET['idx'], $php_self); } break; case "delete_attached_file": if (isset($_POST['file_id']) && $_POST['file_id'] != "") { delete_attached_file($_POST['file_id']); } edit_line_form($_GET['idx'], $php_self); break; case "get_incidents": default: $get_incidents_result = get_incidents(); display_incidents($get_incidents_result, $php_self); break; } //END Switch() } //End if($_SESSION['logged_in'] == 1) ?> </div> <!-- END "content" --> </div> <!-- END "wrapper" --> </body> </html>
$search_by_type .= $name." (".count($incidents).")"; $search_by_type .= "</a>"; $search_by_type .= "</td>"; if ($count % 2 != 0) { $search_by_type .= "</tr>"; } $count++; } } $search_by_type .= "</table>"; $right_side .= print_container('incident_search_by_type', __('Search by type'), $search_by_type); //Get open incident and count them by priority $incidents = get_incidents("estado <> 7", false); $rows = array(); foreach ($incidents as $inc) { if (isset($rows[$inc["prioridad"]])) { $rows[$inc["prioridad"]]++; } else { $rows[$inc["prioridad"]] = 1; } } $search_by_priority = "<table class='search_by_priority'>"; $search_by_priority .="<tr>";
$table->style[2] = 'text-align:center; width: 70px;'; $table->style[3] = 'text-align:center; width: 50px;'; $table->data = array(); $filter = '1 = 1'; if ($status > 0) { $filter .= sprintf(' AND estado = %d', $status); } elseif ($status == -10) { //Not closed is special status //Means not solved(6) and not closed(7) $filter .= sprintf(' AND estado != 6 AND estado != 7'); } if ($search != '') { $filter .= sprintf(' AND (titulo LIKE "%%%s%%" OR descripcion LIKE "%%%s%%")', $search, $search); } $filter .= ' ORDER BY actualizacion DESC'; $incidents = get_incidents($filter); if (empty($incidents)) { $table->colspan[0][0] = 9; $table->data[0][0] = __('Nothing was found'); $incidents = array(); } $row = 0; foreach ($incidents as $incident) { $table->data[$row][0] = '#' . $incident['id_incidencia']; $table->data[$row][1] = '<a href="index.php?sec=incidents&sec2=operation/incidents_simple/incident&id=' . $incident['id_incidencia'] . '">' . $incident['titulo'] . '</a>'; $resolution = isset($resolutions[$incident['resolution']]) ? $resolutions[$incident['resolution']] : __('None'); $table->data[$row][2] = '<strong>' . $statuses[$incident['estado']] . '</strong><br /><em>' . $resolution . '</em>'; $table->data[$row][3] = print_priority_flag_image($incident['prioridad'], true); $table->data[$row][4] = human_time_comparation($incident["actualizacion"]); $table->data[$row][4] .= '<br /><em>'; $table->data[$row][4] .= human_time_comparation($incident["inicio"]);
<?php session_start(); ini_set('include_path', ini_get('include_path') . ':../includes/'); //Unix $template = "../includes/IQCStemplate.pdf"; if ($_SESSION['logged_in'] == 1) { //require_once("../includes/inc_functions.php"); require_once "../classes/mydb_class.php"; require_once "../includes/merge_pdf.php"; } else { header('location: http://www.siskiyourappellers.com/admin/index.php'); } $php_self = $_SERVER['PHP_SELF']; $crewmember_id = mydb::cxn()->real_escape_string($_GET['crewmember_id']); $incident_array = get_incidents($crewmember_id); //Lookup crewmember's name from the crewmember_id $result = mydb::cxn()->query("SELECT firstname, lastname FROM crewmembers WHERE id LIKE '" . $crewmember_id . "'") or die("Error retrieving crewmember name: " . mydb::cxn()->error); $row = $result->fetch_assoc(); $firstname = $row['firstname']; $lastname = $row['lastname']; $fields = array(); $fields['Year'] = $_SESSION['incident_year']; $fields['First Name1'] = $firstname; $fields['First Name2'] = $fields['First Name1']; $fields['Last Name1'] = $lastname; $fields['Last Name2'] = $fields['Last Name1']; $fields['District1'] = "Siskiyou Rappellers"; $fields['District2'] = $fields['District1']; $fields['Fitness Rating1'] = "Arduous"; $fields['Fitness Rating2'] = $fields['Fitness Rating1'];
$table->head[0] = __('Relationship'); $table->head[1] = __('Company'); $table->head[2] = __('Contact'); $table->head[3] = __('Details'); $table->head[4] = __('Edit'); $table->size = array (); $table->size[3] = '40px'; $table->size[4] = '40px'; $table->align[3] = 'center'; $table->align[4] = 'center'; $table->data = array (); $table_data = array(); //Add key incident users (owner, editor, closed by, creator) $inc_info = get_incidents("id_incidencia = ". $id_incident); $inc_info = $inc_info[0]; $key_users = array("owner" => array("user" => $inc_info["id_usuario"], "role" => __("Owner")), "creator" => array("user" => $inc_info["id_creator"], "role" => __("Creator")), "editor" => array("user" => $inc_info["editor"], "role" => __("Editor")), "closed" => array ("user" => $inc_info["closed_by"], "role" => __("Closed by"))); $key_users_info = array(); //Get user infor and get user role foreach ($key_users as $ku) { $role_desc = ""; //Role description within the incident if ($ku["user"]) {