From 565020a5098bcf897fbbd1d2a2723849e8dfd732 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Mon, 24 Jun 2002 11:42:07 +0000 Subject: [PATCH] r2l by Yoav git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2997 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 160 +++++++++++++++++++++++++----------------------- 1 file changed, 83 insertions(+), 77 deletions(-) diff --git a/src/compose.php b/src/compose.php index 27823af6..5c6a807b 100644 --- a/src/compose.php +++ b/src/compose.php @@ -24,6 +24,7 @@ require_once('../functions/mime.php'); require_once('../functions/smtp.php'); require_once('../functions/display_messages.php'); require_once('../functions/plugin.php'); +require_once('../functions/html.php'); /* --------------------- Specific Functions ------------------------------ */ @@ -629,10 +630,15 @@ function showInputForm ($session) { if ($mail_sent == 'yes') { echo '
'. _("Your Message has been sent").'
'; } - echo '' . "\n"; + echo html_tag( 'table', '', 'center', '', 'width="100%" cellspacing="0" border="0"' ) . "\n"; if ($compose_new_win == '1') { - echo '
'."\n"; - echo ' '."\n"; + echo html_tag( 'table', 'center', $color[0], 'width="100%" border="0"' ) . + html_tag( 'tr', + html_tag( 'td' ) . + html_tag( 'td', + '', + 'right' ) + ); } if ($location_of_buttons == 'top') { showComposeButtonRow(); @@ -640,11 +646,9 @@ function showInputForm ($session) { $idents = getPref($data_dir, $username, 'identities', 0); if ($idents > 1) { - echo ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n"; - } - echo ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . + ' ' . "\n"; + } + echo html_tag( 'tr', + html_tag( 'td', "\n" . _("To:"), 'right', $color[4], 'width="10%"' ) . + html_tag( 'td', + '
' . "\n", + 'left', $color[4], 'width="90%"' ) + ) . "\n" . + html_tag( 'tr', + html_tag( 'td', "\n" . _("CC:"), 'right', $color[4], 'width="10%"' ) . + html_tag( 'td', + '
' . "\n", + 'left', $color[4], 'width="90%"' ) + ) . "\n" . + html_tag( 'tr', + html_tag( 'td', "\n" . _("BCC:"), 'right', $color[4], 'width="10%"' ) . + html_tag( 'td', + '
' . "\n", + 'left', $color[4], 'width="90%"' ) + ) . "\n"; + if ($reply_subj) { - $reply_subj = str_replace('"', "'", $reply_subj); + $reply_subj = str_replace('"', '\'', $reply_subj); $reply_subj = trim($reply_subj); if (substr(strtolower($reply_subj), 0, 3) != 're:') { $reply_subj = 'Re: ' . $reply_subj; } - echo ' '; + $subject = $reply_subj; } elseif ($forward_subj) { $forward_subj = trim($forward_subj); @@ -712,28 +710,33 @@ function showInputForm ($session) { (substr(strtolower($forward_subj), 0, 6) != '[ fwd:')) { $forward_subj = '[Fwd: ' . $forward_subj . ']'; } - echo ' '; + $subject = $forward_subj; } else { - echo ' '; + $subject = $subject; } - echo '' . "\n\n"; + + echo html_tag( 'tr', + html_tag( 'td', "\n" . _("Subject:"), 'right', $color[4], 'width="10%"' ) . + html_tag( 'td', + '
' . "\n", + 'left', $color[4], 'width="90%"' ) + ) . "\n"; if ($location_of_buttons == 'between') { showComposeButtonRow(); } + + echo html_tag( 'tr' ) . "\n"; if ($compose_new_win == '1') { - echo ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n"; + echo '
' . "\n" . + ' ' . "\n" . + ' ' . "\n"; if ($location_of_buttons == 'bottom') { showComposeButtonRow(); } else { - echo ' ' . "\n"; + echo html_tag( 'tr', + html_tag( 'td', '   ', 'left', '', 'colspan="2"' ) ."\n" + ); } /* This code is for attachments */ if ($file_uploads) { - echo ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n" . - ' ' . "\n"; + echo html_tag( 'tr', + html_tag( 'td', "\n" . _("Attach:") ."\n", 'right', '', 'valign="middle"' ) ."\n" . + html_tag( 'td', "\n" . '' . + '  ' . "\n" , + 'left', '', 'valign="middle"' ) ."\n" + ); if (count($attachments)) { $hashed_attachment_dir = getHashedDir($username, $attachment_dir); - echo '
' . - "\n" . - _("From:") . - ' ' . "\n" . + echo html_tag( 'tr' ) . "\n" . + html_tag( 'td', "\n" . _("From:"), 'right', $color[4], 'width="10%"' ) . + html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) . '' . "\n" . - '
' . "\n" . - _("To:") . - ' ' . "\n" . - '
' . "\n" . - '
' . "\n" . - _("CC:") . - ' ' . "\n" . - '
' . "\n" . - '
' . "\n" . - _("BCC:") . - ' ' . "\n" . - '
' . "\n" . - '
' . "\n" . - _("Subject:") . - ' ' . "\n"; + '
' . "\n" . - '
' . "\n" . - '
'; - echo '  
' . "\n" . - _("Attach:") . - ' ' . "\n" . - ' ' . "\n" . - '   ' . "\n" . - '
' . "\n" . - ' ' . - ''; + echo html_tag( 'tr' ) . + html_tag( 'td', "\n" . ' ', 'right', $color[0] ) . + html_tag( 'td', '', 'left', $color[0] ); foreach ($attachments as $key => $info) { if ($info['session'] == $session) { $attached_file = "$hashed_attachment_dir/$info[localfilename]"; @@ -793,9 +794,9 @@ function showInputForm ($session) { /* End of attachment code */ } if ($compose_new_win == '1') { - echo '
'."\n"; + echo ''."\n"; } - echo '' . "\n"; + echo '' . "\n"; if ($reply_id) { echo '\n \n \n"; + echo " \n" . + html_tag( 'tr' ) . + html_tag( 'td', "\n", 'left' ) . + html_tag( 'td', '', 'left' ); echo "\n \n"; if ($use_javascript_addr_book) { echo "