X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=0150e815dbf3de45d693a9db56f81f90c2522bab;hb=7c7b74b374e2cbc848b8fff895123d26f0d9051d;hp=a1604e6de2da0a84338d10846d0b471601d7c65f;hpb=00a065a69448f66db8f29fda00961878926a5912;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index a1604e6d..0150e815 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -3,36 +3,48 @@ /** * addrbook_search_html.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2003 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'); +/* Path for SquirrelMail required files. */ +if (! defined('SM_PATH') ) { + define('SM_PATH','../'); +} + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'functions/display_messages.php'); +require_once(SM_PATH . 'functions/addressbook.php'); +require_once(SM_PATH . 'functions/plugin.php'); +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'functions/html.php'); + +sqgetGlobalVar('session', $session, SQ_POST); +sqgetGlobalVar('mailbox', $mailbox, SQ_POST); +sqgetGlobalVar('addrquery', $addrquery, SQ_POST); +sqgetGlobalVar('listall', $listall, SQ_POST); +sqgetGlobalVar('backend', $backend, SQ_POST); /* Insert hidden data */ function addr_insert_hidden() { global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, - $identity; + $identity, $session; echo '' . "\n" . + '' . "\n" . '' . "\n" . '\n" . + echo '
'; @@ -102,27 +158,32 @@ function addr_display_result($res, $includesource = true) { /* --- End functions --- */ -global $mailbox; -displayPageHeader($color, $mailbox); - +if ($compose_new_win == '1') { + compose_Header($color, $mailbox); +} +else { + displayPageHeader($color, $mailbox); +} /* Initialize addressbook */ $abook = addressbook_init(); -?> -
- |
\n" . - ' |
' .
+ echo html_tag( 'p', '
' .
sprintf(_("Unable to list addresses from %s"),
- $abook->backends[$backend]->sname) .
- "
' .
- _("Your search failed with the following error(s)") . ':
' .
- $abook->error . "