+ 0):
+ $first = true;
+ while ($note = hesk_dbFetchAssoc($res)):
+ if (!$first) {
+ echo '
';
+ } else {
+ $first = false;
+ }
+ ?>
+
+
+
+
+ -
+
' : '';
+
+ $att = explode(',', substr($note['attachments'], 0, -1));
+ $num = count($att);
+ foreach ($att as $myatt) {
+ list($att_id, $att_name) = explode('#', $myatt);
+
+ // Can edit and delete note (attachments)?
+ if ($can_del_notes || $note['who'] == $_SESSION['id']) {
+ // If this is the last attachment and no message, show "delete ticket" link
+ if ($num == 1 && strlen($note['message']) == 0) {
+ echo '
+
+ ';
+ } // Show "delete attachment" link
+ else {
+ echo '
+
+ ';
+ }
+ }
+
+ echo '
+
+
+
+
' . $att_name . '
+ ';
+ }
+ }
+ ?>
+
+
+
+
+