echo sort_header("item_priority", $AppUI->_('Priority')); ?> </th> <th nowrap="nowrap"><?php echo sort_header("item_updated", $AppUI->_('Updated')); ?> </th> <th nowrap="nowrap"><?php echo sort_header("project_name", $AppUI->_('Project')); ?> </th> </tr> <?php $s = ''; foreach ($rows as $row) { $canEdit = hditemEditable($row); /* We need to check if the user who requested the item is still in the system. Just because we have a requestor id does not mean we'll be able to retrieve a full name */ $s .= $CR . '<form method="post">'; $s .= $CR . '<tr>'; $s .= $CR . '<td align="right" nowrap>'; if ($canEdit) { $s .= $CR . '<a href="?m=helpdesk&a=addedit&item_id=' . $row["item_id"] . '">' . dPshowImage("./images/icons/pencil.gif", 12, 12, "edit") . '</a> '; } $s .= $CR . '</td>'; $s .= $CR . '<td nowrap="nowrap"><a href="./index.php?m=helpdesk&a=view&item_id=' . $row["item_id"] . '">' . '<strong>' . $row["item_id"] . '</strong></a> ' . dPshowImage(dPfindImage('ct' . $row["item_calltype"] . '.png', 'helpdesk'), 15, 17, '') . '</td>'; $date = new CDate($row['item_created']); $s .= $CR . "<td nowrap>" . $date->format($format) . "</td>"; $s .= $CR . "<td nowrap align=\"center\">"; if ($row["item_requestor_email"]) {
<th width="100%"><?php echo $AppUI->_('Comments'); ?> </th> <th></th> </tr> <?php // Pull the task comments $sql = "\nSELECT task_log.*, user_username\nFROM task_log\nLEFT JOIN users ON user_id = task_log_creator\nWHERE task_log_help_desk_id = {$item_id}\nORDER BY task_log_date\n"; $logs = db_loadList($sql); $s = ''; $hrs = 0; // Pull help desk item details $sql = "SELECT item_company_id,item_created_by\n FROM helpdesk_items hi\n WHERE item_id = '{$item_id}'"; db_loadHash($sql, $hditem); $canEdit = hditemEditable($hditem); $df = $AppUI->getPref('SHDATEFORMAT'); foreach ($logs as $row) { $task_log_date = intval($row['task_log_date']) ? new CDate($row['task_log_date']) : null; $s .= '<tr bgcolor="white" valign="top">'; $s .= "\n\t<td>"; if ($canEdit) { $s .= "\n\t\t<a href=\"?m=helpdesk&a=view&item_id={$item_id}&tab=1&task_log_id=" . @$row['task_log_id'] . "\">" . "\n\t\t\t" . dPshowImage('./images/icons/stock_edit-16.png', 16, 16, '') . "\n\t\t</a>"; } $s .= "\n\t</td>"; $s .= '<td nowrap="nowrap">' . ($task_log_date ? $task_log_date->format($df) : '-') . '</td>'; $s .= '<td width="30%">' . @$row["task_log_name"] . '</td>'; $s .= '<td width="100">' . $row["user_username"] . '</td>'; $s .= '<td width="100" align="right">' . sprintf("%.2f", $row["task_log_hours"]) . '</td>'; $s .= '<td width="100">' . $task_log_costcodes[$row["task_log_costcode"]] . '</td>'; $s .= '<td>';