X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=3205e4a4478b9d8afb14a6f4379eca774fe880cb;hb=ca29b81004eea3cff3f249e95235ba544730a4e7;hp=fd814e6c7555049afe4c4d313baedcd7d518398d;hpb=a4fe507d376dc9bcb3337e8007441b0af706017f;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index fd814e6c..3205e4a4 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -2,8 +2,14 @@ /** ** 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 in the popup window. ** + ** NOTE: A lot of this code is similar to the code in + ** addrbook_search_html.html -- If you change one, + ** change the other one too! **/ // Function to include JavaScript code @@ -94,21 +100,21 @@ function bcc_address($addr) { print "\n"; - while(list($key, $row) = each($res)) { - printf("". + while(list($undef, $row) = each($res)) { + printf("". "To | ". "Cc | ". "Bcc". - " %s  ". - "%s ". - " %s ", + " %s ". + " %s ". + " %s ", ($line % 2) ? " bgcolor=\"$color[0]\"" : "", $row["email"], $row["email"], $row["email"], $row["name"], $row["email"], $row["email"], $row["label"]); if($includesource) - printf(" %s", $row["source"]); + printf(" %s", $row["source"]); print "\n"; $line++; @@ -119,12 +125,17 @@ function bcc_address($addr) { /* ================= End of functions ================= */ session_start(); + + if (!isset($i18n_php)) + include("../functions/i18n.php"); if(!isset($logged_in)) { + set_up_language($squirrelmail_language, true); echo _("You must login first."); exit; } if(!isset($username) || !isset($key)) { + set_up_language($squirrelmail_language, true); echo _("You need a valid user and password to access this page!"); exit; } @@ -133,20 +144,17 @@ function bcc_address($addr) { include("../config/config.php"); if (!isset($array_php)) include("../functions/array.php"); + if (!isset($auth_php)) + include("../functions/auth.php"); if (!isset($strings_php)) include("../functions/strings.php"); - if (!isset($imap_php)) - include("../functions/imap.php"); if (!isset($page_header_php)) include("../functions/page_header.php"); if (!isset($addressbook_php)) include("../functions/addressbook.php"); - // Authenticate user and load prefs - $imapConnection = sqimap_login($username, $key, - $imapServerAddress, $imapPort, 10); + is_logged_in(); include("../src/load_prefs.php"); - sqimap_logout ($imapConnection); displayHtmlHeader(); @@ -175,7 +183,7 @@ function bcc_address($addr) { printf("
\n", $PHP_SELF); printf(""); - printf("
\n"); + printf("
\n"); printf(" %s\n", _("Search for")); printf(" \n", htmlspecialchars($query)); @@ -187,8 +195,8 @@ function bcc_address($addr) { printf("