| | |
| | | static $sa_recipients = array(); |
| | | |
| | | list($form_start, $form_end) = get_form_tags($attrib); |
| | | |
| | | |
| | | $out = ''; |
| | | $part = strtolower($attrib['part']); |
| | | |
| | | |
| | | switch ($part) |
| | | { |
| | | case 'from': |
| | | return rcmail_compose_header_from($attrib); |
| | | return $form_start . rcmail_compose_header_from($attrib); |
| | | |
| | | case 'to': |
| | | $fname = '_to'; |
| | | $header = $param = 'to'; |
| | | |
| | | |
| | | // we have a set of recipients stored is session |
| | | if (($mailto_id = $_SESSION['compose']['param']['mailto']) && $_SESSION['mailto'][$mailto_id]) |
| | | $fvalue = urldecode($_SESSION['mailto'][$mailto_id]); |
| | | |
| | | |
| | | case 'cc': |
| | | if (!$fname) |
| | | { |
| | |
| | | $fname = '_bcc'; |
| | | $header = $param = 'bcc'; |
| | | } |
| | | |
| | | |
| | | $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'tabindex'); |
| | | $field_type = 'html_textarea'; |
| | | break; |
| | |
| | | $input_from = new html_inputfield($field_attrib); |
| | | $out = $input_from->show($_POST['_from']); |
| | | } |
| | | |
| | | if ($form_start) |
| | | $out = $form_start.$out; |
| | | |
| | | return $out; |
| | | } |
| | |
| | | |
| | | list($form_start, $form_end) = get_form_tags($attrib); |
| | | unset($attrib['form']); |
| | | |
| | | |
| | | $attrib['name'] = '_priority'; |
| | | $selector = new html_select($attrib); |
| | | |
| | |
| | | rcube_label('high'), |
| | | rcube_label('highest')), |
| | | array(5, 4, 0, 2, 1)); |
| | | |
| | | |
| | | if (isset($_POST['_priority'])) |
| | | $sel = $_POST['_priority']; |
| | | else if (intval($MESSAGE->headers->priority) != 3) |
| | |
| | | $out = $form_start ? "$form_start\n" : ''; |
| | | $out .= $selector->show($sel); |
| | | $out .= $form_end ? "\n$form_end" : ''; |
| | | |
| | | |
| | | return $out; |
| | | } |
| | | |
| | |
| | | function rcmail_receipt_checkbox($attrib) |
| | | { |
| | | global $MESSAGE, $compose_mode; |
| | | |
| | | |
| | | list($form_start, $form_end) = get_form_tags($attrib); |
| | | unset($attrib['form']); |
| | | |
| | | |
| | | if (!isset($attrib['id'])) |
| | | $attrib['id'] = 'receipt'; |
| | | |
| | |
| | | |
| | | if (empty($attrib['name'])) |
| | | $attrib['name'] = 'editorSelect'; |
| | | |
| | | |
| | | $attrib['onchange'] = "return rcmail_toggle_editor(this, '".$attrib['editorid']."', '_is_html')"; |
| | | |
| | | $select = new html_select($attrib); |
| | |
| | | global $RCMAIL, $MESSAGE_FORM; |
| | | |
| | | $form_start = ''; |
| | | if (!strlen($MESSAGE_FORM)) |
| | | if (!$MESSAGE_FORM) |
| | | { |
| | | $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $RCMAIL->task)); |
| | | $hiddenfields->add(array('name' => '_action', 'value' => 'send')); |
| | |
| | | $form_start .= $hiddenfields->show(); |
| | | } |
| | | |
| | | $form_end = (strlen($MESSAGE_FORM) && !strlen($attrib['form'])) ? '</form>' : ''; |
| | | $form_end = ($MESSAGE_FORM && !strlen($attrib['form'])) ? '</form>' : ''; |
| | | $form_name = !empty($attrib['form']) ? $attrib['form'] : 'form'; |
| | | |
| | | if (!strlen($MESSAGE_FORM)) |
| | | if (!$MESSAGE_FORM) |
| | | $RCMAIL->output->add_gui_object('messageform', $form_name); |
| | | |
| | | $MESSAGE_FORM = $form_name; |