echo colheader('incidentid', $strIncident, $sort, $order, $filter); echo "<th>{$strOperation}</th>"; echo "</tr>\n"; $shade = 'shade1'; while ($resp = mysql_fetch_object($result)) { $respondentarr = explode('-', $resp->respondent); $responserefarr = explode('-', $resp->responseref); $hashtext = urlencode($resp->formid) . "&&" . urlencode($resp->contactid) . "&&" . urlencode($resp->incidentid); // $hashcode=urlencode(trim(base64_encode(gzcompress(str_rot13($hashtext))))); $hashcode4 = str_rot13($hashtext); $hashcode3 = gzcompress($hashcode4); $hashcode2 = base64_encode($hashcode3); $hashcode1 = trim($hashcode2); $hashcode = urlencode($hashcode1); echo "<tr class='{$shade}'>"; echo "<td>" . ldate($CONFIG['dateformat_datetime'], mysqlts2date($resp->created)) . "</td>"; echo "<td><a href='contact_details.php?id={$resp->contactid}' title='{$resp->email}'>" . contact_realname($resp->contactid) . "</a></td>"; echo "<td><a href=\"javascript:incident_details_window('{$resp->incidentid}','incident{$resp->incidentid}')\">"; echo "{$strIncident} [{$resp->incidentid}]</a> - "; echo incident_title($resp->incidentid) . "</td>"; $url = "feedback.php?ax={$hashcode}"; if ($resp->multi == 'yes') { $url .= "&rr=1"; } echo "<td>"; if ($resp->completed == 'no') { echo "<a href='{$url}' title='{$url}' target='_blank'>URL</a>"; } $eurl = urlencode($url); $eref = urlencode($resp->responseref); if ($resp->completed == 'no') {
echo colheader('timestamp', "{$strTime}/{$strDate}", $sort, $order, $filter); echo colheader('event', $strEvent); echo colheader('action', $strOperation); echo colheader('type', $strType); echo "</tr>\n"; $shade = 0; while ($journal = mysql_fetch_object($result)) { // define class for table row shading if ($shade) { $class = "shade1"; } else { $class = "shade2"; } echo "<tr class='{$class}'>"; echo "<td>" . user_realname($journal->userid, TRUE) . "</td>"; echo "<td>" . ldate($CONFIG['dateformat_datetime'], mysqlts2date($journal->timestamp)) . "</td>"; echo "<td>{$journal->event}</td>"; echo "<td>"; switch ($journal->journaltype) { case 2: echo "<a href='incident_details.php?id={$journal->refid}' target='_blank'>{$journal->bodytext}</a>"; break; case 5: echo "<a href='contact_details.php?id={$journal->refid}' target='_blank'>{$journal->bodytext}</a>"; break; default: echo "{$journal->bodytext}"; if (!empty($journal->refid)) { echo "(Ref: {$journal->refid})"; } break;
/** * Produces HTML of all notes assigned to an item * @param $linkid int The link type * @param $refid int The ID of the item the notes are linked to * @param $delete bool Whether its possible to delet notes (default TRUE) * @return string HTML of the notes */ function show_notes($linkid, $refid, $delete = TRUE) { global $sit, $iconset, $dbNotes; $sql = "SELECT * FROM `{$dbNotes}` WHERE link='{$linkid}' AND refid='{$refid}' ORDER BY timestamp DESC, id DESC"; $result = mysql_query($sql); if (mysql_error()) { trigger_error(mysql_error(), E_USER_WARNING); } $countnotes = mysql_num_rows($result); if ($countnotes >= 1) { while ($note = mysql_fetch_object($result)) { $html .= "<div class='detailhead note'> <div class='detaildate'>" . readable_date(mysqlts2date($note->timestamp)); if ($delete) { $html .= "<a href='note_delete.php?id={$note->id}&rpath="; $html .= "{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}' "; $html .= "onclick=\"return confirm_action('{$strAreYouSureDelete}');\">"; $html .= icon('delete', 16) . "</a>"; } $html .= "</div>\n"; // /detaildate $html .= icon('note', 16) . " "; $html .= sprintf($GLOBALS['strNoteAddedBy'], user_realname($note->userid, TRUE)); $html .= "</div>\n"; // detailhead $html .= "<div class='detailentry note'>"; $html .= nl2br(bbcode($note->bodytext)); $html .= "</div>\n"; } } return $html; }