X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=functions%2Fmailbox_display.php;h=a4823676e6bab7fa0a30aff1fcb57c89c9a23a4a;hb=ac53fb5645d47313e6efe3327b57f0e2a30327c1;hp=afb0549db12686a4b40851782511aa54b7214672;hpb=0cd84d75b1d2c786b88c859a049443669b37d96d;p=squirrelmail.git diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index afb0549d..a4823676 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -9,7 +9,9 @@ ** $Id$ **/ - $mailbox_display_php = true; + if (defined('mailbox_display_php')) + return; + define('mailbox_display_php', true); function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage, $where, $what) { global $checkall; @@ -18,6 +20,18 @@ global $message_highlight_list; global $index_order; + $color_string = $color[4]; + if ($GLOBALS['alt_index_colors']) { + if (!isset($GLOBALS["row_count"])) { + $GLOBALS["row_count"] = 0; + } + $GLOBALS["row_count"]++; + if ($GLOBALS["row_count"] % 2) { + if (!isset($color[12])) $color[12] = "#EAEAEA"; + $color_string = $color[12]; + } + } + $msg = $msgs[$key]; $senderName = sqimap_find_displayable_name($msg['FROM']); @@ -82,7 +96,7 @@ } if (!isset($hlt_color)) - $hlt_color = $color[4]; + $hlt_color = $color_string; if ($where && $what) { $search_stuff = '&where='.urlencode($where).'&what='.urlencode($what); @@ -225,13 +239,14 @@ $end = $startMessage + $show_num - 1; if ($numMessages < $show_num) $end_loop = $numMessages; - else + elseif ($end > $numMessages) + $end_loop = $numMessages - $startMessage + 1; + else $end_loop = $show_num; } else { $end = $numMessages; $end_loop = $end; } - if ($end > $numMessages) $end = $numMessages; while ($j < $end_loop) { if (isset($date[$j])) { $date[$j] = ereg_replace(' ', ' ', $date[$j]); @@ -479,7 +494,6 @@ global $color, $index_order, $auto_expunge, $move_to_trash; global $checkall, $sent_folder; $urlMailbox = urlencode($mailbox); - /** This is the beginning of the message list table. It wraps around all messages */ echo ''; @@ -532,7 +546,13 @@ echo ''; echo "
"; - echo ""; + echo "
"; echo ""; $urlMailbox=urlencode($mailbox); @@ -574,7 +594,7 @@ break; case 4: # subject - echo ' \n"; elseif ($sort == 5)
'. _("Subject") ."\n"; + echo ' '. _("Subject") ."\n"; if ($sort == 4) echo "