From 93adc0189d6a575877d24c25dced55ffe153f22e Mon Sep 17 00:00:00 2001 From: kink Date: Sat, 19 Jun 2004 11:13:30 +0000 Subject: [PATCH] Continuation of fixing the alternating row colors in addressbook: this code is present at 3 different places... git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7673 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/addrbook_search.php | 7 +++++-- src/addrbook_search_html.php | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 2fbd9346..c62e112b 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -136,9 +136,12 @@ function display_result($res, $includesource = true) { echo "\n"; while (list($undef, $row) = each($res)) { - $tr_bgcolor = ''; $email = htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES); - if ($line % 2) { $tr_bgcolor = $color[0]; } + if ($line % 2) { + $tr_bgcolor = $color[12]; + } else { + $tr_bgcolor = $color[4]; + } echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) . html_tag( 'td', '\n"; foreach ($res as $row) { - $tr_bgcolor = ''; $email = AddressBook::full_address($row); - if ($line % 2) { $tr_bgcolor = $color[0]; } + if ($line % 2) { + $tr_bgcolor = $color[12]; + } else { + $tr_bgcolor = $color[4]; + } if ($squirrelmail_language == 'ja_JP') { echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) . -- 2.25.1