| | |
| | | } |
| | | } |
| | | |
| | | $sort_col = $_SESSION['sort_col']; |
| | | |
| | | // loop through message headers |
| | | foreach ($a_headers as $header) { |
| | | if (empty($header)) |
| | |
| | | else if ($col == 'size') |
| | | $cont = $RCMAIL->show_bytes($header->$col); |
| | | else if ($col == 'date') |
| | | $cont = $RCMAIL->format_date($header->date); |
| | | $cont = $RCMAIL->format_date($sort_col == 'arrival' ? $header->internaldate : $header->date); |
| | | else if ($col == 'folder') { |
| | | if ($last_folder !== $header->folder) { |
| | | $last_folder = $header->folder; |
| | |
| | | } |
| | | |
| | | foreach ($a_show_cols as $col) { |
| | | $label = ''; |
| | | $label = ''; |
| | | $sortable = false; |
| | | $rel_col = $col == 'date' && $sort_col == 'arrival' ? 'arrival' : $col; |
| | | |
| | | // get column name |
| | | switch ($col) { |
| | |
| | | $col_name = $list_menu; |
| | | break; |
| | | case 'fromto': |
| | | $label = $RCMAIL->gettext($smart_col); |
| | | $label = $RCMAIL->gettext($smart_col); |
| | | $col_name = rcube::Q($label); |
| | | break; |
| | | default: |
| | | $label = $RCMAIL->gettext($col); |
| | | $label = $RCMAIL->gettext($col); |
| | | $col_name = rcube::Q($label); |
| | | } |
| | | |
| | |
| | | $col_name = html::a(array( |
| | | 'href' => "./#sort", |
| | | 'class' => 'sortcol', |
| | | 'rel' => $col, |
| | | 'rel' => $rel_col, |
| | | 'title' => $RCMAIL->gettext('sortby') |
| | | ), $col_name); |
| | | } |
| | |
| | | $col_name = '<span class="' . $col .'">' . $col_name . '</span>'; |
| | | } |
| | | |
| | | $sort_class = $col == $sort_col && !$disabled_order ? " sorted$sort_order" : ''; |
| | | $sort_class = $rel_col == $sort_col && !$disabled_order ? " sorted$sort_order" : ''; |
| | | $class_name = $col.$sort_class; |
| | | |
| | | // put it all together |
| | |
| | | // unsupported (e.g. encrypted) |
| | | if ($part->realtype) { |
| | | if ($part->realtype == 'multipart/encrypted' || $part->realtype == 'application/pkcs7-mime') { |
| | | $out .= html::span('part-notice', $RCMAIL->gettext('encryptedmessage')); |
| | | if (!empty($_SESSION['browser_caps']['pgpmime']) && ($pgp_mime_part = $MESSAGE->get_multipart_encrypted_part())) { |
| | | $out .= html::span('part-notice', $RCMAIL->gettext('externalmessagedecryption')); |
| | | $OUTPUT->set_env('pgp_mime_part', $pgp_mime_part->mime_id); |
| | | $OUTPUT->set_env('pgp_mime_container', '#' . $attrib['id']); |
| | | $OUTPUT->add_label('loadingdata'); |
| | | } |
| | | |
| | | if (!$MESSAGE->encrypted_part) { |
| | | $out .= html::span('part-notice', $RCMAIL->gettext('encryptedmessage')); |
| | | } |
| | | } |
| | | continue; |
| | | } |
| | |
| | | rcmail_message_error($MESSAGE->uid); |
| | | } |
| | | |
| | | // check if the message body is PGP encrypted |
| | | if (strpos($body, 'BEGIN PGP MESSAGE') !== false) { |
| | | $OUTPUT->set_env('is_pgp_content', '#' . $attrib['id']); |
| | | } |
| | | |
| | | $plugin = $RCMAIL->plugins->exec_hook('message_body_prefix', |
| | | array('part' => $part, 'prefix' => '')); |
| | | |