X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=aac9971659f0ad51c46b20ebbf4f80ef995ede1c;hb=c4db9729040739972896dad259bb2c0619050d05;hp=9cdf82a9117fa2def492f898742fdac89fe5b84c;hpb=d4e84069d1d9af8760b8e858672d3ea3d4eac8b0;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 9cdf82a9..aac99716 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -1,217 +1,224 @@ ' . "\n"; - echo '' . "\n"; - echo '' . "\n"; - echo "' . "\n"; - echo "' . "\n"; - echo "' . "\n"; - echo "\n"; - echo "\n"; - } - - // List search results - function addr_display_result($res, $includesource = true) { - global $color, $PHP_SELF; - - if(sizeof($res) <= 0) return; - - echo '
'; +/** + * addrbook_search_html.php + * + * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * Handle addressbook searching with pure html. + * + * This file is included from compose.php + * + * NOTE: A lot of this code is similar to the code in + * addrbook_search.html -- If you change one, change + * the other one too! + * + * $Id$ + */ + +require_once('../src/validate.php'); +require_once('../functions/date.php'); +require_once('../functions/smtp.php'); +require_once('../functions/display_messages.php'); +require_once('../functions/addressbook.php'); +require_once('../functions/plugin.php'); +require_once('../functions/strings.php'); + +/* Insert hidden data */ +function addr_insert_hidden() { + global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, + $identity; + + echo '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '\n" . '' . + "\n"; } - // --- End functions --- - global $mailbox; - displayPageHeader($color, $mailbox); - - // Initialize addressbook - $abook = addressbook_init(); +/* List search results */ +function addr_display_result($res, $includesource = true) { + global $color, $PHP_SELF; + + if (sizeof($res) <= 0) return; + + echo ''; +} + +/* --- End functions --- */ + +global $mailbox; +displayPageHeader($color, $mailbox); + +/* Initialize addressbook */ +$abook = addressbook_init(); ?>
|
\n"; - printf(''; - - print " |
\n" . + ' |
"._("Unable to list addresses from %s"). - "
\n", $abook->backends[$backend]->sname); - } - - } else { - $res = $abook->list_addr(); - addr_display_result($res, true); - } - exit; - - } else - - // Do the search - if(!empty($addrquery) && empty($listall)) { - - if($backend == -1) { - $res = $abook->s_search($addrquery); - } else { - $res = $abook->s_search($addrquery, $backend); - } - - if(!is_array($res)) { - printf("
%s:
%s