$sql .= "WHERE id = '{$relatedid}' "; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } } } } //tidy up temp reassigns $sql = "DELETE FROM `{$dbTempAssigns}` WHERE incidentid = '{$id}'"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_ERROR); } } $bodytext = "{$SYSLANG['strClosingStatus']}: <b>" . closingstatus_name($closingstatus) . "</b>\n\n" . $bodytext; if ($addition_errors == 0) { //maintenceid $send_feedback = send_feedback(db_read_column('maintenanceid', $dbIncidents, $id)); if ($CONFIG['feedback_form'] != '' and $CONFIG['feedback_form'] > 0 and $send_feedback == TRUE) { create_incident_feedback($CONFIG['feedback_form'], $id); } $notifyexternal = $notifycontact = $awaitingclosure = 0; if ($send_engineer_email == 'yes') { $notifyexternal = 1; } if ($send_email == 'yes') { $notifycontact = 1; if ($wait == 'yes') { $awaitingclosure = 1; } else {
} $blinktime = time() - $servicelevel->initial_response_mins * 60; if ($incidents['priority'] == 4 and $incidents['lastupdated'] <= $blinktime) { echo "<strong class='critical'>" . priority_name($incidents["priority"]) . "</strong>"; } else { echo priority_name($incidents['priority']); } echo "</td>\n"; echo "<td align='center'>"; if ($incidents['status'] == 5 and $incidents['towner'] == $sit[2]) { echo "<strong>{$strAwaitingYourResponse}</strong>"; } else { echo incidentstatus_name($incidents["status"]); } if ($incidents['status'] == 2) { echo "<br />" . closingstatus_name($incidents['closingstatus']); } echo "</td>\n"; echo "<td align='center'>"; echo "{$updated}"; echo " {$strby} {$update_user}"; if ($incidents['towner'] > 0 and $incidents['towner'] != $user) { if ($incidents['owner'] != $user or $user == 'all') { echo "<br />{$strOwner}: <strong>" . user_realname($incidents['owner'], TRUE) . "</strong>"; } echo "<br />{$strTemp}: <strong>" . user_realname($incidents['towner'], TRUE) . "</strong>"; } elseif ($incidents['owner'] != $user) { echo "<br />{$strOwner}: <strong>" . user_realname($incidents['owner'], TRUE) . "</strong>"; } echo "</td>\n"; echo "<td align='center' title='{$explain}'>";
// Product Info if (!empty($incident->product)) { $pisql = "SELECT pi.information AS label, ipi.information AS information "; $pisql .= "FROM `{$dbIncidentProductInfo}` AS ipi, `{$dbProductInfo}` AS pi "; $pisql .= "WHERE pi.id = ipi.productinfoid AND ipi.incidentid = {$incidentid}"; $piresult = mysql_query($pisql); if (mysql_num_rows($piresult) > 0) { while ($pi = mysql_fetch_object($piresult)) { echo "{$pi->label}: {$pi->information} <br />\n"; } } } echo sprintf($strOpenForX, $opened_for) . " "; echo incidentstatus_name($incident->status); if ($incident->status == 2) { echo " (" . closingstatus_name($incident->closingstatus) . ")"; } echo "<br />\n"; // Show sla target/review target if incident is still open if ($incident->status != 2 and $incident->status != 7) { if ($targettype != '') { if ($slaremain > 0) { echo sprintf($strSLAInX, $targettype, format_workday_minutes($slaremain)); } elseif ($slaremain < 0) { echo " " . sprintf($strSLAXLate, $targettype, format_workday_minutes(0 - $slaremain)); } else { echo " " . sprintf($strSLAXDueNow, $targettype); } } if ($reviewremain > 0 && $reviewremain <= 2400) { // Only display if review is due in the next five days
echo "</a>"; echo "</td>"; if ($mode == 'site') { $contactrealname = contact_realname($row->contact); echo "<td>{$contactrealname}</td>"; if ($mode == 'site') { if (!array_key_exists($contactrealname, $contactlist)) { $contactlist[$contactrealname] = 1; } else { $contactlist[$contactrealname]++; } } } echo "<td>" . product_name($row->product) . "</td>"; if ($row->status == 2) { echo "<td>Closed, " . closingstatus_name($row->closingstatus) . "</td>"; } else { echo "<td>" . incidentstatus_name($row->status) . "</td>"; } echo "<td>" . user_realname($row->owner, TRUE) . "</td>"; echo "<td>" . ldate($CONFIG['dateformat_date'], $row->opened) . "</td>"; if ($row->closed > 0) { echo "<td>" . ldate($CONFIG['dateformat_date'], $row->closed) . "</td>"; echo "<td>" . format_seconds($row->duration_closed) . "</td>"; } else { echo "<td colspan='2'>-</td>"; } echo "<td>"; $slahistory = incident_sla_history($row->incidentid); if (is_array($slahistory)) { foreach ($slahistory as $history) {