X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fcompose.php;h=2d058d0927f9ab2ea9c1b1d87351e289d2c3625b;hp=1678bfd73d588225a7c5fdaf9eeb8eaa1a9b70ad;hb=828c58f18565da37215df7d138ba05485ce8c4cd;hpb=81de00c0eba6c2f4aebcfdd24124be99a3996871 diff --git a/src/compose.php b/src/compose.php index 1678bfd7..2d058d09 100644 --- a/src/compose.php +++ b/src/compose.php @@ -18,19 +18,15 @@ */ /** - * Path for SquirrelMail required files. - * @ignore + * Include the SquirrelMail initialization file. */ -define('SM_PATH','../'); +require('../include/init.php'); /* SquirrelMail required files. */ -include_once(SM_PATH . 'include/validate.php'); -require_once(SM_PATH . 'functions/global.php'); -require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/imap_general.php'); +require_once(SM_PATH . 'functions/imap_messages.php'); require_once(SM_PATH . 'functions/date.php'); require_once(SM_PATH . 'functions/mime.php'); -require_once(SM_PATH . 'functions/plugin.php'); -require_once(SM_PATH . 'functions/display_messages.php'); require_once(SM_PATH . 'class/deliver/Deliver.class.php'); require_once(SM_PATH . 'functions/addressbook.php'); require_once(SM_PATH . 'functions/forms.php'); @@ -569,7 +565,7 @@ if ($send) { $_FILES['attachfile']['tmp_name'] && $_FILES['attachfile']['tmp_name'] != 'none') { if(saveAttachedFiles($session)) { - plain_error_message(_("Could not move/copy file. File not attached"), $color); + plain_error_message(_("Could not move/copy file. File not attached")); } } /* @@ -578,14 +574,14 @@ if ($send) { */ include_once('./addrbook_search_html.php'); } elseif (isset($attach)) { - if (saveAttachedFiles($session)) { - plain_error_message(_("Could not move/copy file. File not attached"), $color); - } if ($compose_new_win == '1') { compose_Header($color, $mailbox); } else { displayPageHeader($color, $mailbox); } + if (saveAttachedFiles($session)) { + plain_error_message(_("Could not move/copy file. File not attached")); + } showInputForm($session); } elseif (isset($sigappend)) { @@ -1155,7 +1151,7 @@ function showInputForm ($session, $values=false) { } echo ' ' . "\n" . html_tag( 'td', '', 'right', $color[4], 'width="10%"' ) . - _("From:") . '' . "\n" . + '' . "\n" . html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) . ' '. addSelect('identity', $ident_list, $identity, TRUE); @@ -1166,28 +1162,28 @@ function showInputForm ($session, $values=false) { echo ' ' . "\n" . html_tag( 'td', '', 'right', $color[4], 'width="10%"' ) . - _("To") . ':' . "\n" . + ':' . "\n" . html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) . addInput('send_to', $send_to, 60, 0, $onfocus_array). '
' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . html_tag( 'td', '', 'right', $color[4] ) . - _("Cc") . ':' . "\n" . + ':' . "\n" . html_tag( 'td', '', 'left', $color[4] ) . addInput('send_to_cc', $send_to_cc, 60, 0, $onfocus_array). '
' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . html_tag( 'td', '', 'right', $color[4] ) . - _("Bcc") . ':' . "\n" . + ':' . "\n" . html_tag( 'td', '', 'left', $color[4] ) . addInput('send_to_bcc', $send_to_bcc, 60, 0, $onfocus_array).'
' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" . html_tag( 'td', '', 'right', $color[4] ) . - _("Subject") . ':' . "\n" . + ':' . "\n" . html_tag( 'td', '', 'left', $color[4] ) . "\n"; echo ' '.addInput('subject', $subject, 60, 0, $onfocus_array). ' ' . "\n" . @@ -1197,18 +1193,20 @@ function showInputForm ($session, $values=false) { showComposeButtonRow(); } - /* why this distinction? */ + /** + * When message is compose in new window, different colors are used. + */ if ($compose_new_win == '1') { echo ' ' . "\n" . ' ' . "\n" . '