function ticketAutoHyperlinks($message) { return autoHyperLink($message); }
public function formatMsg($message = "") { if (!$message) { $message = $this->getData("message"); } $message = strip_tags($message); $message = preg_replace('/\\[div="(.*?)"\\]/', '<div class="$1">', $message); $replacetags = array("b" => "strong", "i" => "em", "u" => "ul", "div" => "div"); foreach ($replacetags as $k => $v) { $message = str_replace("[" . $k . "]", "<" . $k . ">", $message); $message = str_replace("[/" . $k . "]", "</" . $k . ">", $message); } $message = nl2br($message); $message = autoHyperLink($message); return $message; }
} else { if ($invoicestatus == "Unpaid") { $paymentstatus = "<span class=\"textred\">" . $aInt->lang("status", "incomplete") . "</span>"; } else { $paymentstatus = getInvoiceStatusColour($invoicestatus); } } } } run_hook("ViewOrderDetailsPage", array("orderid" => $id, "ordernum" => $ordernum, "userid" => $userid, "amount" => $amount, "paymentmethod" => $paymentmethod, "invoiceid" => $invoiceid, "status" => $orderstatus)); $clientnotes = array(); $result = select_query("tblnotes", "tblnotes.*,(SELECT CONCAT(firstname,' ',lastname) FROM tbladmins WHERE tbladmins.id=tblnotes.adminid) AS adminuser", array("userid" => $userid, "sticky" => "1"), "modified", "DESC"); while ($data = mysql_fetch_assoc($result)) { $data['created'] = fromMySQLDate($data['created'], 1); $data['modified'] = fromMySQLDate($data['modified'], 1); $data['note'] = autoHyperLink(nl2br($data['note'])); $clientnotes[] = $data; } if (count($clientnotes)) { echo "<div id=\"clientsimportantnotes\">\n"; foreach ($clientnotes as $note) { echo "<div class=\"ticketstaffnotes\">\n <table class=\"ticketstaffnotestable\">\n <tr>\n <td>" . $note['adminuser'] . "</td>\n <td align=\"right\">" . $note['modified'] . "</td>\n </tr>\n </table>\n <div>\n " . $note['note'] . "\n <div style=\"float:right;\"><a href=\"clientsnotes.php?userid=" . $userid . "&action=edit&id=" . $note['id'] . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" align=\"absmiddle\" /></a></div>\n </div>\n</div>\n"; } echo "</div>"; } echo "\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "date"); echo "</td><td class=\"fieldarea\">"; echo $date; echo "</td><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "paymentmethod");
$aInt->sortableTableInit("created", "ASC"); $result = select_query("tblnotes", "COUNT(*)", array("userid" => $userid), "created", "ASC", "", "tbladmins ON tbladmins.id=tblnotes.adminid"); $data = mysql_fetch_array($result); $numrows = $data[0]; $result = select_query("tblnotes", "tblnotes.*,(SELECT CONCAT(firstname,' ',lastname) FROM tbladmins WHERE tbladmins.id=tblnotes.adminid) AS adminuser", array("userid" => $userid), "modified", "DESC"); while ($data = mysql_fetch_array($result)) { $noteid = $data['id']; $created = $data['created']; $modified = $data['modified']; $note = $data['note']; $admin = $data['adminuser']; if (!$admin) { $admin = "Admin Deleted"; } $note = nl2br($note); $note = autoHyperLink($note); $created = fromMySQLDate($created, "time"); $modified = fromMySQLDate($modified, "time"); $importantnote = $data['sticky'] ? "high" : "low"; $tabledata[] = array($created, $note, $admin, $modified, "<img src=\"images/" . $importantnote . "priority.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("clientsummary", "importantnote") . "\">", "<a href=\"" . $PHP_SELF . "?userid=" . $userid . "&action=edit&id=" . $noteid . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $noteid . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>"); } echo $aInt->sortableTable(array($aInt->lang("fields", "created"), $aInt->lang("fields", "note"), $aInt->lang("fields", "admin"), $aInt->lang("fields", "lastmodified"), "", "", ""), $tabledata); echo "\n<br>\n\n"; if ($action == "edit") { $notesdata = get_query_vals("tblnotes", "note, sticky", array("userid" => $userid, "id" => $id)); $note = $notesdata['note']; $importantnote = $notesdata['sticky'] ? " checked" : ""; echo "<form method=\"post\" action=\""; echo $PHP_SELF; echo "?userid="; echo $userid;