From c1c17724db249c3a04e80f03a8b2c05dc8e2f978 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Mon, 24 Jun 2002 07:57:32 +0000 Subject: [PATCH] r2l job in progress (help by Yoav) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2992 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/html.php | 9 +-- functions/mailbox_display.php | 130 ++++++++++++++++++---------------- 2 files changed, 75 insertions(+), 64 deletions(-) diff --git a/functions/html.php b/functions/html.php index e85ab2da..6666cd64 100644 --- a/functions/html.php +++ b/functions/html.php @@ -30,7 +30,7 @@ } else { $dir = 'ltr'; } - + if ( $dir == 'ltr' ) { $rgt = 'right'; $lft = 'left'; @@ -42,7 +42,7 @@ if ( $bgcolor <> '' ) { $bgc = " BGCOLOR=\"$bgcolor\""; } - + switch ( $align ) { case '': $alg = ''; @@ -52,8 +52,10 @@ break; case 'left': $alg = " ALIGN=\"$lft\""; + break; default: $alg = " ALIGN=\"$align\""; + break; } $ret = "<$tag"; @@ -61,7 +63,6 @@ if ( $dir <> 'ltr' ) { $ret .= " DIR=\"$dir\""; } - $ret .= "$bgc$alg"; if ( $xtra <> '' ) { @@ -76,4 +77,4 @@ return( $ret ); } -?> +?> \ No newline at end of file diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 15c5e7e9..7cb5e4e1 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -20,20 +20,20 @@ require_once('../functions/html.php'); define('PG_SEL_MAX', 10); function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, -$start_msg, $where, $what){ + $start_msg, $where, $what){ global $checkall, - $color, $msgs, $msort, - $sent_folder, $draft_folder, - $default_use_priority, - $message_highlight_list, - $index_order, - $indent_array, /* indent subject by */ - $pos, /* Search postion (if any) */ - $thread_sort_messages, /* thread sorting on/off */ - $server_sort_order, /* sort value when using server-sorting */ - $row_count, - $allow_server_sort; /* enable/disable server-side sorting */ - $color_string = $color[4]; + $color, $msgs, $msort, + $sent_folder, $draft_folder, + $default_use_priority, + $message_highlight_list, + $index_order, + $indent_array, /* indent subject by */ + $pos, /* Search postion (if any) */ + $thread_sort_messages, /* thread sorting on/off */ + $server_sort_order, /* sort value when using server-sorting */ + $row_count, + $allow_server_sort; /* enable/disable server-side sorting */ + $color_string = $color[4]; if ($GLOBALS['alt_index_colors']) { if (!isset($row_count)) { @@ -156,7 +156,7 @@ $start_msg, $where, $what){ echo html_tag( 'td', $italic . $bold . $flag . $fontstr . $senderName . $fontstr_end . $flag_end . $bold_end . $italic_end, - '', + 'left', $hlt_color ); break; case 3: /* date */ @@ -186,7 +186,7 @@ $start_msg, $where, $what){ $td_str .= " title=\"$title\""; } $td_str .= ">$flag$subject$flag_end$bold_end"; - echo html_tag( 'td', $td_str, '', $hlt_color ); + echo html_tag( 'td', $td_str, 'left', $hlt_color ); break; case 5: /* flags */ $stuff = false; @@ -662,14 +662,14 @@ $show_num) { */ function mail_message_listing_beginning ($imapConnection, $moveURL, -$mailbox = '', $sort = -1, -$msg_cnt_str = '', -$paginator = ' ', -$start_msg = 1) { + $mailbox = '', $sort = -1, + $msg_cnt_str = '', + $paginator = ' ', + $start_msg = 1) { global $color, $index_order, $auto_expunge, $move_to_trash, $base_uri, - $checkall, $sent_folder, $draft_folder, $thread_sort_messages, - $allow_thread_sort, $allow_server_sort, $server_sort_order, - $lastTargetMailbox; + $checkall, $sent_folder, $draft_folder, $thread_sort_messages, + $allow_thread_sort, $allow_server_sort, $server_sort_order, + $lastTargetMailbox; $urlMailbox = urlencode($mailbox); @@ -678,29 +678,32 @@ $start_msg = 1) { * It wraps around all messages */ echo "
\n" - . "\n' - . "' - . "
" - . " \n" - . html_tag( 'td', $paginator, 'left' ) - . html_tag( 'td', $msg_cnt_str, 'right' ) - . "
\n" - . '
\n" - . "\n" - . " \n" - . html_tag( 'td', - ' ' . _("Move Selected To:") . '', - 'left', - '', - 'valign="middle" nowrap' ) - . html_tag( 'td', - '' . _("Transform Selected Messages") . ':  
', - 'right', - '', - 'nowrap' ) - . " \n" + . html_tag( 'table' ,'' , '', '', 'border="0" width="100%" cellpadding="1" cellspacing="0"' ) . + html_tag( 'tr', + html_tag( 'td' , + html_tag( 'table' , + html_tag( 'tr', + html_tag( 'td', $paginator, 'left' ) . + html_tag( 'td', $msg_cnt_str, 'right' ) + ) + , '', $color[4], 'border="0" width="100%" cellpadding="2" cellspacing="0"' ) + , 'left', '', '' ) + , '', $color[0] ) + . '' + . html_tag( 'td' ,'' , 'left', $color[0], '' ) + . html_tag( 'table' ,'' , '', $color[0], 'border="0" width="100%" cellpadding="0" cellspacing="0"' ) + . html_tag( 'tr', + html_tag( 'td', + ' ' . _("Move Selected To:") . '', + 'left', + '', + 'valign="middle" nowrap' ) . + html_tag( 'td', + '' . _("Transform Selected Messages") . ':  
', + 'right', + '', + 'nowrap' ) + ) . " \n" . html_tag( 'td', '', 'left', '', 'valign="middle" nowrap' ) . '  '; + echo html_tag( 'tr' , + html_tag( 'td' , + ' ' . $thread_name + . ' ' + , '', '', '' ) + , '', '', '' ); } echo "
 ' . $thread_name - . ' 
\n"; do_hook('mailbox_form_before'); - echo '
" - . '' + . html_tag( 'td' ,'' , '', $color[0], '' ); if ($GLOBALS['alt_index_colors']){ - echo '0'; + $cellspacing = '0'; } else { - echo '1'; + $cellspacing = '1'; } - echo " BGCOLOR=\"$color[0]\">" + echo html_tag( 'table' ,'' , '', $color[0], 'border="0" width="100%" cellpadding="2" cellspacing="'. $cellspacing .'"' ) . ""; /* if using server sort we highjack the * the $sort var and use $server_sort_order @@ -783,9 +789,11 @@ $start_msg = 1) { break; case 2: /* from */ if (handleAsSent($mailbox)) { - echo ' \n"; break; case 3: /* date */ - echo ' \n"; + echo "\n"; break; case 4: /* subject */ - echo '
' . _("To") . ''; + echo html_tag( 'td' ,'' , 'left', '', 'width="25%"' ) + . '' . _("To") . ''; } else { - echo ' ' . _("From") . ''; + echo html_tag( 'td' ,'' , 'left', '', 'width="25%"' ) + . '' . _("From") . ''; } if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 2, 3); @@ -793,14 +801,16 @@ $start_msg = 1) { echo "' . _("Date") . ''; + echo html_tag( 'td' ,'' , 'left', '', 'width="5%" nowrap' ) + . '' . _("Date") . ''; if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 0, 1); } - echo "' . _("Subject") . ' '; + echo html_tag( 'td' ,'' , 'left', '', '' ) + . '' . _("Subject") . ''; if ($allow_thread_sort != TRUE || $thread_sort_messages != 1) { ShowSortButton($sort, $mailbox, 4, 5); } -- 2.25.1