| | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | |
| | | $Id$ |
| | | |
| | | */ |
| | | |
| | | $PRINT_MODE = $RCMAIL->action=='print' ? TRUE : FALSE; |
| | |
| | | $mimetypes = $RCMAIL->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/x-javascript,application/pdf,application/x-shockwave-flash'); |
| | | $OUTPUT->set_env('mimetypes', is_string($mimetypes) ? explode(',', $mimetypes) : (array)$mimetypes); |
| | | |
| | | if ($CONFIG['drafts_mbox']) |
| | | $OUTPUT->set_env('drafts_mailbox', $CONFIG['drafts_mbox']); |
| | | if ($CONFIG['trash_mbox']) |
| | | $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); |
| | | if ($CONFIG['junk_mbox']) |
| | | $OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']); |
| | | if ($CONFIG['delete_junk']) |
| | | $OUTPUT->set_env('delete_junk', true); |
| | | if ($CONFIG['flag_for_deletion']) |
| | | $OUTPUT->set_env('flag_for_deletion', true); |
| | | if ($CONFIG['read_when_deleted']) |
| | |
| | | |
| | | if (sizeof($MESSAGE->attachments)) { |
| | | foreach ($MESSAGE->attachments as $attach_prop) { |
| | | if ($PRINT_MODE) { |
| | | $ol .= html::tag('li', null, sprintf("%s (%s)", Q($attach_prop->filename), Q(show_bytes($attach_prop->size)))); |
| | | } |
| | | else { |
| | | if (mb_strlen($attach_prop->filename) > 50) { |
| | | $filename = abbreviate_string($attach_prop->filename, 50); |
| | | $title = $attach_prop->filename; |
| | | } |
| | | else { |
| | | $filename = $attach_prop->filename; |
| | | $title = ''; |
| | | $filename = $attach_prop->filename; |
| | | if (empty($filename) && $attach_prop->mimetype == 'text/html') { |
| | | $filename = rcube_label('htmlmessage'); |
| | | } |
| | | |
| | | $ol .= html::tag('li', rcmail_filetype2classname($attach_prop->mimetype, $attach_prop->filename), |
| | | if ($PRINT_MODE) { |
| | | $ol .= html::tag('li', null, sprintf("%s (%s)", Q($filename), Q(show_bytes($attach_prop->size)))); |
| | | } |
| | | else { |
| | | if (mb_strlen($filename) > 50) { |
| | | $filename = abbreviate_string($filename, 50); |
| | | $title = $filename; |
| | | } |
| | | else { |
| | | $title = ''; |
| | | } |
| | | |
| | | $ol .= html::tag('li', rcmail_filetype2classname($attach_prop->mimetype, $filename), |
| | | html::a(array( |
| | | 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), |
| | | 'onclick' => sprintf( |