X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=54de9f8ff27c002704a2beb7c7e6e63ce4b83ae1;hb=d625cff3462b402e4a30981015a6c63a695f8911;hp=95b93fccaffaf0fbca9cff6df01d7f1a58195a1a;hpb=6e79bfe2ddadf23c78b15977f153ee53fcd5d170;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 95b93fcc..54de9f8f 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -1,222 +1,273 @@ \n", - htmlspecialchars($body)); - printf("\n", - htmlspecialchars($subject)); - printf("\n", - htmlspecialchars($send_to)); - printf("\n", - htmlspecialchars($send_to_cc)); - printf("\n", - htmlspecialchars($send_to_bcc)); - printf("\n"); - } - - // List search results - function addr_display_result($res, $includesource = true) { - global $color, $PHP_SELF; - - if(sizeof($res) <= 0) return; - - printf('
"; +/** + * 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'); +require_once('../functions/html.php'); + +/* Insert hidden data */ +function addr_insert_hidden() { + global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, + $identity, $session; + + echo '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '\n" . '' . + "\n"; } - // --- End functions --- - - displayPageHeader($color, "None"); - - // Initialize addressbook - $abook = addressbook_init(); - - $body = sqStripSlashes($body); - $send_to = sqStripSlashes($send_to); - $send_to_cc = sqStripSlashes($send_to_cc); - $send_to_bcc = sqStripSlashes($send_to_bcc); - $subject = sqStripSlashes($subject); - -?> - -
- |
\n"); - printf('"; - - printf(" |
"._("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