# Surgeweb plain HTML interface # Primary page template that displays a "message for editing" ||include||_head.htm||
||iftrue(pref_editor_textonly)|| ||define||with_plain||true|| ||endif||
||include||_layout_begin.htm|| ||define||menu||edit|| ||include||_menu_bar.htm|| # Setup the message info ||iftrue(compose_refresh)|| # Nothing to do, everything should be all set ||else|| ||if(equal(send_type,(edit)))|| ||define((from),email_address(pref_reply,concat(username_ex,(@),domain_ex)))|| ||else|| ||if(equal(send_type,(compose)))|| ||define((from),email_address(pref_reply,concat(username_ex,(@),domain_ex)))|| ||define((signature_out),pref_signature)|| ||define((reply_header),()|| ||else|| # Load the message index into memory ||tcmd_load_msg_info|| ||iftrue(with_plain)|| # Setup some input parameters to the tcmd_process_message processing function # - Reformat orgininal message based on send_type variable ||define||tparam_send_reformat||true|| # - We will be expecting the output to be text (and quoted) as opposed to html ||define||tparam_show_as||replytext|| # Now process the message for sending giving us all the message || variables ||tcmd_process_message|| ||if(or(equal(send_type,(reply)),equal(send_type,(forward))))|| ||define((RH1),($$st_txt_hdr_orig$$ \n))|| ||define((RH2),concat(($$st_hdr_subject$$),( ),subject_orig,(\n)))|| ||define((RH3),concat(($$st_hdr_from$$),( ),from_orig,(\n)))|| ||define((RH4),concat(($$st_hdr_to$$),( ),to_orig,(\n)))|| ||define((RH5),concat(($$st_hdr_date$$),( ),msg_date,( ),msg_time,(\n\n)))|| ||define((reply_header),concat(RH1,RH2,RH3,RH4,RH5))|| ||endif|| ||else|| # Setup some input parameters to the tcmd_process_message processing function # - Reformat orgininal message based on send_type variable ||define||tparam_send_reformat||true|| # Now process the message for sending giving us all the message || variables ||tcmd_process_message|| ||if(or(equal(send_type,(reply)),equal(send_type,(forward))))|| ||define((RH1),($$st_txt_hdr_orig$$
))|| ||define((RH2),concat(($$st_hdr_subject$$),( ),web_encode(subject_orig),(
)))|| ||define((RH3),concat(($$st_hdr_from$$),( ),web_encode(from_orig),(
)))|| ||define((RH4),concat(($$st_hdr_to$$),( ),web_encode(to_orig),(
)))|| ||define((RH5),concat(($$st_hdr_date$$),( ),web_encode(msg_date),( ),web_encode(msg_time),(
)))|| ||define((reply_header),concat(RH1,RH2,RH3,RH4,RH5))|| ||endif|| ||endif|| ||endif|| ||endif|| ||endif|| #||ifndef||attach_ids|| ||define||attach_ids|||| ||endif||
# Table to layout actual message headers

$$st_hdr_to$$ |
||if(equal(send_type,(redirect)))||
| $$st_msg_redirect_info$$
$$st_hdr_from$$ | ||web_encode(from)||
$$st_hdr_subject$$ | ||web_encode(subject)||
||ifdef||attachments||
$$st_hdr_attachments$$ | ||begin_list_attachments|| ||part_name|| (||bytes_basic(part_size)||)||iftrue(more)||,||endif|| ||end_list_attachments||
||endif|| ||else|| ||ifdef||show_cc_bcc||
$$st_hdr_cc$$ |
$$st_hdr_bcc$$ |
||endif||
$$st_hdr_from$$ | ||web_encode(from)|| ||ifdef||show_cc_bcc|| | $$st_cmd_hide_ccbcc$$ ||else|| | $$st_cmd_show_ccbcc$$ ||endif||
$$st_hdr_subject$$ |
# Show everything we need to regarding attachments ||if(or(longer(attach_ids,0),longer(attach_ids_mpr,0)))|| ||tcmd_attach_get|| ||if(longer(attach_ids,0))||
$$st_hdr_attachments$$ | ||define((foreach),attach_ids)|| ||begin_list_foreach||||if(not(istrue(first)))||,||endif|| ||lookup(concat((attach_fname_),item))|| (||bytes_basic(lookup(concat((attach_fsize_),item)))||)\ ||end_list_foreach||\
||endif|| ||if(longer(attach_ids_mpr,0))|| ||endif|| ||endif|| ||endif||

||if(equal(send_type,(redirect)))||
||else|| ||iftrue(with_plain)|| ||else|| ||define((editor),(toolbar))|| ||include||../shared/modules/_editor.htm|| ||define((editor),(iframe))|| ||include||../shared/modules/_editor.htm|| ||endif|| ||endif||
||include||_layout_end.htm||\
\
\