X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=c62e112b6aa9d959852e012d1c25bcd1f5df94d2;hb=25e57ed2f1a869eb4c6bd97c7085146458158776;hp=b1bc299e16534a3efc54d4149f59bd36f0fdaafd;hpb=8f6f9ba5df6491d396aa690dcf3e5b9070a565ca;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index b1bc299e..c62e112b 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,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", exit; @@ -206,20 +211,20 @@ if ($show == 'form' && empty($listall)) { html_tag( 'tr' ) . html_tag( 'td', ' ' . _("Search for") . "\n", 'left', '', 'nowrap valign="middle" width="10%"' ) . html_tag( 'td', '', 'left', '', '' ) . - '\n"; + addInput('query', $query, 28); /* List all backends to allow the user to choose where to search */ if ($abook->numbackends > 1) { - echo '' . _("in") . ' \n"; + echo addSelect('backend', $selopts, '-1', TRUE); } else { - echo '' . "\n"; + echo addHidden('backend', '-1'); } echo '' . @@ -285,7 +290,7 @@ if ($show == 'form' && empty($listall)) { if (sizeof($res) == 0) { echo html_tag( 'p', '
' . - _("No persons matching your search was found") . "\n" , + _("No persons matching your search were found") . "\n" , 'center' ) . "\n\n"; exit;