+
-
+
';
- }
- // Show "delete attachment" link
- else
+ echo strlen($note['message']) ? '
' : '';
+
+ $att = explode(',', substr($note['attachments'], 0, -1) );
+ $num = count($att);
+ foreach ($att as $myatt)
{
- echo '
';
+ 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.'
+ ';
}
}
-
- echo '
-
-
'.$att_name.'
- ';
- }
- }
- ?>
+ ?>
+