X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=9cdf82a9117fa2def492f898742fdac89fe5b84c;hb=541506f3bbe3cfc966221c55c35e50e9bda6f181;hp=e07d8f9d9ddede4cfaae72921e61ce74adf1ba68;hpb=f33d2f92248abdddbe5d45d4eb6e0e980688853e;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index e07d8f9d..9cdf82a9 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -2,49 +2,49 @@ /** ** addrbook_search.php ** + ** Copyright (c) 1999-2000 The SquirrelMail development 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$ **/ - session_start(); - - if (!isset($config_php)) - include("../config/config.php"); - if (!isset($strings_php)) - include("../functions/strings.php"); - if (!isset($auth_php)) - include("../functions/auth.php"); - if (!isset($page_header_php)) - include("../functions/page_header.php"); - if (!isset($date_php)) - include("../functions/date.php"); - if (!isset($smtp_php)) - include("../functions/smtp.php"); - if (!isset($display_messages_php)) - include("../functions/display_messages.php"); - if (!isset($addressbook_php)) - include("../functions/addressbook.php"); - - include("../src/load_prefs.php"); + include('../src/validate.php'); + include('../functions/date.php'); + include('../functions/smtp.php'); + include('../functions/display_messages.php'); + include('../functions/addressbook.php'); + include('../functions/plugin.php'); // Insert hidden data function addr_insert_hidden() { - global $body, $subject, $send_to, $send_to_cc, $send_to_bcc; - printf("\n", - htmlspecialchars($body)); - printf("\n", - htmlspecialchars($subject)); - printf("\n", - htmlspecialchars($send_to)); - printf("\n", - htmlspecialchars($send_to_cc)); - printf("\n", - htmlspecialchars($send_to_bcc)); + global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, + $identity; + + echo '' . "\n"; + echo '' . "\n"; + echo '' . "\n"; + echo "' . "\n"; + echo "' . "\n"; + echo "' . "\n"; + echo "\n"; + echo "\n"; } @@ -54,126 +54,133 @@ if(sizeof($res) <= 0) return; - printf('
"; + print ''; } // --- End functions --- - displayPageHeader($color, "None"); - + global $mailbox; + displayPageHeader($color, $mailbox); + // Initialize addressbook $abook = addressbook_init(); - $body = stripslashes($body); - $send_to = stripslashes($send_to); - $send_to_cc = stripslashes($send_to_cc); - $send_to_bcc = stripslashes($send_to_bcc); - $subject = stripslashes($subject); - +?> - // Header - print "%s |
+ |
"._("Unable to list addresses from %s"). - "
\n", $abook->backends[$backend]->sname); - } + if(is_array($res)) { + addr_display_result($res, false); + } else { + printf(""._("Unable to list addresses from %s"). + "
\n", $abook->backends[$backend]->sname); + } } else { - $res = $abook->list_addr(); - addr_display_result($res, true); + $res = $abook->list_addr(); + addr_display_result($res, true); } + exit; } else @@ -181,25 +188,30 @@ if(!empty($addrquery) && empty($listall)) { if($backend == -1) { - $res = $abook->s_search($addrquery); + $res = $abook->s_search($addrquery); } else { - $res = $abook->s_search($addrquery, $backend); + $res = $abook->s_search($addrquery, $backend); } if(!is_array($res)) { - printf("
%s:
%s