| | |
| | | if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != get_input_value('_id', RCUBE_INPUT_GET)) |
| | | { |
| | | rcmail_compose_cleanup(); |
| | | $_SESSION['compose'] = array('id' => uniqid(rand()), 'param' => array_map('strip_tags', $_GET)); |
| | | $_SESSION['compose'] = array( |
| | | 'id' => uniqid(rand()), |
| | | 'param' => array_map('strip_tags', $_GET), |
| | | 'mailbox' => $IMAP->get_mailbox_name() |
| | | ); |
| | | |
| | | // process values like "mailto:foo@bar.com?subject=new+message&cc=another" |
| | | if ($_SESSION['compose']['param']['_to']) { |
| | |
| | | "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">To: </th><td>%s</td></tr>", |
| | | Q($MESSAGE->subject), |
| | | Q($MESSAGE->headers->date), |
| | | htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true), |
| | | htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); |
| | | htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset()), |
| | | htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset())); |
| | | |
| | | if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) |
| | | $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Reply-To: </th><td>%s</td></tr>", |
| | | htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); |
| | | htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset())); |
| | | |
| | | $prefix .= "</tbody></table><br>"; |
| | | } |
| | |
| | | $cid_map = array(); |
| | | foreach ((array)$message->mime_parts as $pid => $part) |
| | | { |
| | | if (($part->ctype_primary != 'message' || !$bodyIsHtml) && |
| | | ($part->disposition=='attachment' || $part->disposition=='inline' || $part->headers['content-id'] |
| | | || (empty($part->disposition) && $part->filename))) |
| | | if (($part->ctype_primary != 'message' || !$bodyIsHtml) && $part->filename && |
| | | ($part->disposition=='attachment' || ($part->disposition=='inline' && $bodyIsHtml) || (empty($part->disposition)))) |
| | | { |
| | | if ($attachment = rcmail_save_attachment($message, $pid)) { |
| | | $_SESSION['compose']['attachments'][$attachment['id']] = $attachment; |
| | |
| | | if (empty($attrib['name'])) |
| | | $attrib['name'] = 'editorSelect'; |
| | | |
| | | $attrib['onchange'] = "return rcmail_toggle_editor(this.value=='html', '".$attrib['editorid']."', '_is_html')"; |
| | | $attrib['onchange'] = "return rcmail_toggle_editor(this.value=='html', '".$attrib['editorid']."', '_is_html')"; |
| | | |
| | | $select = new html_select($attrib); |
| | | |