echo $html; } // List Engineers // We need a user type 'engineer' so we don't just list everybody // Status zero means account disabled $sql = "SELECT * FROM `{$dbUsers}` WHERE status!=0 ORDER BY realname"; $result = mysql_query($sql); if (mysql_error()) { trigger_error("MySQL Query Error " . mysql_error(), E_USER_WARNING); } echo "<h3>{$strUsers}</h3>\n <table align='center'>\n <tr>\n <th> </th>\n <th>{$strName}</th>\n <th>{$strTelephone}</th>\n <th>{$strStatus}</th>\n <th>{$strMessage}</th>\n <th colspan='5'>{$strIncidentsinQueue}</th>\n <th>{$strAccepting}</th>\n </tr>"; echo "<tr>\n <th colspan='5'></th>\n <th align='center'>{$strActionNeeded} / {$strOther}</th>"; echo "<th align='center'>" . priority_icon(4) . "</th>"; echo "<th align='center'>" . priority_icon(3) . "</th>"; echo "<th align='center'>" . priority_icon(2) . "</th>"; echo "<th align='center'>" . priority_icon(1) . "</th>"; echo "<th></th>"; echo "</tr>"; $shade = 'shade2'; while ($userrow = mysql_fetch_array($result)) { if ($userrow['id'] == $suggested_user) { $shade = 'idle'; } echo "<tr class='{$shade}'>"; // display reassign link only if person is accepting or if the current user has 'reassign when not accepting' permission if ($userrow['accepting'] == 'Yes') { echo "<td align='right'><a href=\"{$_SERVER['PHP_SELF']}?action=reassign&userid=" . $userrow['id'] . "&incidentid={$incidentid}&nextaction=" . urlencode($nextaction) . "&win={$win}\" "; // if ($priority >= 3) echo " onclick=\"alertform.submit();\""; echo ">{$strAssignTo}</a></td>"; } elseif (user_permission($sit[2], 40) or $userrow['id'] == $sit[2]) { echo "<td align='right'><a href=\"{$_SERVER['PHP_SELF']}?action=reassign&userid=" . $userrow['id'] . "&incidentid={$incidentid}&nextaction=" . urlencode($nextaction) . "&win={$win}\" ";
} if (mysql_num_rows($tresult) >= 1) { echo "<table align='center'>"; while ($tag = mysql_fetch_object($tresult)) { echo "<thead><tr><th colspan='9'>{$tag->tag}</th></tr></thead>"; $sql = "SELECT * FROM `{$dbServiceLevels}` WHERE tag='{$tag->tag}' ORDER BY priority"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_WARNING); } echo "<tr><th colspan='2'>{$strPriority}</th><th>{$strInitialResponse}</th>"; echo "<th>{$strProblemDefinition}</th><th>{$strActionPlan}</th><th>{$strResolutionReprioritisation}</th>"; echo "<th>{$strReview}</th><th>{$strTimed}</th><th>{$strOperation}</th></tr>"; while ($sla = mysql_fetch_object($result)) { echo "<tr>"; echo "<td align='right'>" . priority_icon($sla->priority) . "</td>"; echo "<td>" . priority_name($sla->priority) . "</td>"; echo "<td>" . format_workday_minutes($sla->initial_response_mins) . "</td>"; echo "<td>" . format_workday_minutes($sla->prob_determ_mins) . "</td>"; echo "<td>" . format_workday_minutes($sla->action_plan_mins) . "</td>"; // 480 mins in a working day echo "<td>" . format_workday_minutes($sla->resolution_days * 480) . "</td>"; echo "<td>" . sprintf($strXDays, $sla->review_days) . "</td>"; if ($sla->timed == 'yes') { echo "<td>{$strYes}</td>"; } else { echo "<td>{$strNo}</td>"; } echo "<td><a href='service_level_edit.php?tag={$sla->tag}&priority={$sla->priority}'>{$strEdit}</a></td>"; echo "</tr>\n"; }
if (empty($task->name)) { $task->name = $strUntitled; } if (!empty($incidentTitle)) { $task->name = $incidentTitle; } if ($show == 'incidents') { echo "<a href=\"javascript:incident_details_window('{$incidentidL}','incident{$incidentidL}')\" class='info'>"; } else { echo "<a href='view_task.php?id={$task->id}' class='info'>"; } echo truncate_string($task->name, 100); echo "</a>"; echo "</td>"; if ($show != 'incidents') { echo "<td>" . priority_icon($task->priority) . priority_name($task->priority) . "</td>"; echo "<td>" . percent_bar($task->completion) . "</td>"; } } if ($mode != 'incident') { echo "<td"; if ($startdate > 0 and $startdate <= $now and $task->completion <= 0) { echo " class='urgent'"; } elseif ($startdate > 0 and $startdate <= $now and $task->completion >= 1 and $task->completion < 100) { echo " class='idle'"; } echo ">"; if ($startdate > 0) { echo ldate($CONFIG['dateformat_date'], $startdate); } echo "</td>";
function dashboard_tasks($dashletid) { global $sit, $CONFIG, $iconset, $dbTasks; $user = $sit[2]; if ($CONFIG['tasks_enabled'] == TRUE) { $sql = "SELECT * FROM `{$dbTasks}` WHERE owner='{$user}' AND (completion < 100 OR completion='' OR completion IS NULL) AND "; $sql .= "(distribution = 'public' OR distribution = 'private') "; if (!empty($sort)) { if ($sort == 'id') { $sql .= "ORDER BY id "; } elseif ($sort == 'name') { $sql .= "ORDER BY name "; } elseif ($sort == 'priority') { $sql .= "ORDER BY priority "; } elseif ($sort == 'completion') { $sql .= "ORDER BY completion "; } elseif ($sort == 'startdate') { $sql .= "ORDER BY startdate "; } elseif ($sort == 'duedate') { $sql .= "ORDER BY duedate "; } elseif ($sort == 'distribution') { $sql .= "ORDER BY distribution "; } else { $sql = "ORDER BY id "; } if ($order == 'a' or $order == 'ASC' or $order = '') { $sql .= "ASC"; } else { $sql .= "DESC"; } } else { $sql .= "ORDER BY IF(duedate,duedate,99999999) ASC, duedate ASC, startdate DESC, priority DESC, completion ASC"; } $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_WARNING); } if (mysql_num_rows($result) >= 1) { $content .= "<table align='center' width='100%'>"; $content .= "<tr>"; $content .= colheader('id', $GLOBALS['strID']); $content .= colheader('name', $GLOBALS['strTask']); $content .= colheader('priority', $GLOBALS['strPriority']); $content .= colheader('completion', $GLOBALS['strCompletion']); $content .= "</tr>\n"; $shade = 'shade1'; while ($task = mysql_fetch_object($result)) { $duedate = mysql2date($task->duedate); $startdate = mysql2date($task->startdate); if (empty($task->name)) { $task->name = $GLOBALS['strUntitled']; } $content .= "<tr class='{$shade}'>"; $content .= "<td>{$task->id}</td>"; $content .= "<td><a href='view_task.php?id={$task->id}' class='info'>" . truncate_string($task->name, 23); if (!empty($task->description)) { $content .= "<span>" . nl2br($task->description) . "</span>"; } $content .= "</a></td>"; $content .= "<td>" . priority_icon($task->priority) . priority_name($task->priority) . "</td>"; $content .= "<td>" . percent_bar($task->completion) . "</td>"; $content .= "</tr>\n"; if ($shade == 'shade1') { $shade = 'shade2'; } else { $shade = 'shade1'; } } $content .= "</table>\n"; } else { $content .= "<p align='center'>{$GLOBALS['strNoRecords']}</p>"; } } else { $content .= "<p class='warning'>{$GLOBALS['strDisabled']}</p>"; } echo dashlet('tasks', $dashletid, icon('task', 16), sprintf($GLOBALS['strXsTasks'], user_realname($user, TRUE)), 'tasks.php', $content); }
<td class='text-center'> <a href="supportRequest.php?supportRequest=<?php echo $row_rsEscalations['escalationID']; ?> &function=view"><?php echo escalation_level($row_rsEscalations['rowcolor'], $row_rsEscalations['escalationID']); ?> </a> </td> <td> <a href="supportRequest.php?supportRequest=<?php echo $row_rsEscalations['escalationID']; ?> &function=view"> <?php priority_icon($row_rsEscalations['priority']); ?> <?php echo $row_rsEscalations['subject']; ?> </a> </td> <?php //echo "<td><a href=\"supportRequest.php?supportRequest=" . $row_rsEscalations['escalationID'] . "&function=view\">{$row_rsEscalations['subject']}</a></td>\n"; if (!isset($my_get['application'])) { echo "<td>" . $row_rsEscalations['application'] . "</td>\n"; } if (!isset($my_get['ticket'])) { echo "<td>" . ($row_rsEscalations['ticket'] == "0" ? '-' : $row_rsEscalations['ticket']) . "</td>\n"; } if (!isset($my_get['engineer'])) {
echo "({$strTemp}: " . user_realname($incident->towner, TRUE) . ")"; } echo "<br />"; } if ($software_name != '' or $incident->productversion != '' or $incident->productservicepacks != '') { echo $software_name; if ($incident->productversion != '' or $incident->productservicepacks != '') { echo " (" . $incident->productversion; if ($incident->productservicepacks != '') { echo $incident->productservicepacks; } echo ")"; } echo "<br />\n"; } echo priority_icon($incident->priority) . " " . priority_name($incident->priority); if ($product_name != '') { echo " <a href='contract_details.php?id={$incident->maintenanceid}' title='{$strContactDetails}' target='top.opener'>"; echo "{$product_name}"; echo "</a>"; } elseif ($incident->maintenanceid > 0) { echo "<a href='contract_details.php?id={$incident->maintenanceid}' title='{$strContactDetails}' target='top.opener'>"; echo "{$strContract} {$incident->maintenanceid}"; echo "</a>"; } else { echo "<strong>{$strSiteSupport}</strong>"; } echo " / "; echo "{$servicelevel_tag}<br />\n "; switch (does_contact_have_billable_contract($incident->contactid)) { case CONTACT_HAS_BILLABLE_CONTRACT: