X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=15ea0e04947cfaa4ba079a4630b4f7c56f1e4716;hb=39bfea8fa9fd939da9766a79381f68ea4b725c23;hp=b1bc299e16534a3efc54d4149f59bd36f0fdaafd;hpb=8f6f9ba5df6491d396aa690dcf3e5b9070a565ca;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index b1bc299e..15ea0e04 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -3,7 +3,7 @@ /** * addrbook_search.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Handle addressbook searching in the popup window. @@ -12,12 +12,13 @@ * addrbook_search_html.html -- If you change one, * change the other one too! * - * $Id$ + * @version $Id$ * @package squirrelmail */ /** * Path for SquirrelMail required files. + * @ignore */ define('SM_PATH','../'); @@ -26,6 +27,7 @@ require_once(SM_PATH . 'include/validate.php'); require_once(SM_PATH . 'functions/strings.php'); require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/html.php'); +require_once(SM_PATH . 'functions/forms.php'); /** lets get the global vars we may need */ sqgetGlobalVar('key', $key, SQ_COOKIE); @@ -134,22 +136,25 @@ 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', 'To | " . + "'" . $email . "');\">To | " . 'Cc | " . + "'" . $email . "');\">Cc | " . 'Bcc", + "'" . $email . "');\">Bcc", 'center', '', 'valign="top" width="5%" nowrap' ) . html_tag( 'td', ' ' . htmlspecialchars($row['name']), 'left', '', 'valign="top" nowrap' ) . html_tag( 'td', ' ' . '" . htmlspecialchars($row['email']) . '' + "'" . $email . "');\">" . htmlspecialchars($row['email']) . '' , 'left', '', 'valign="top"' ) . html_tag( 'td', htmlspecialchars($row['label']), 'left', '', 'valign="top" nowrap' ); if ($includesource) { @@ -176,22 +181,22 @@ if (!isset($backend)) { $backend = ''; } /* Choose correct colors for top and bottom frame */ if ($show == 'form' && !isset($listall)) { - echo '
'; } else { - echo '\n"; + echo '\n"; } /* Empty search */ if (empty($query) && empty($show) && empty($listall)) { - echo html_tag( 'p', '