X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=1f145a5e0e5ccce77c1f2d6bf921f33730254f8e;hp=d7c18f8b7d60c272112892ac02cd7b42fddb6307;hb=de00443c7d9770fbae65402e6beabde8a3db302a;hpb=7b7834759e60809a314dbf7be376f5cac26d1c90 diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index d7c18f8b..1f145a5e 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -3,64 +3,78 @@ /** * addrbook_search_html.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2004 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$ + * @version $Id$ + * @package squirrelmail + * @subpackage addressbook */ -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'); +/** + * Path for SquirrelMail required files. + * @ignore + */ +if (! defined('SM_PATH') ) { + define('SM_PATH','../'); +} -/* Insert hidden data */ +/** 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, $session; - echo '' . "\n" . - '' . "\n" . - '' . "\n" . - '' . "\n" . - '' . "\n" . - '' . "\n" . - '' . "\n" . - '\n" . '' . - "\n"; + echo addHidden('body', "\n".$body); + } else { + echo addHidden('body', $body); } + echo addHidden('session', $session). + addHidden('subject', $subject). + addHidden('send_to', $send_to). + addHidden('send_to_bcc', $send_to_bcc). + addHidden('send_to_cc', $send_to_cc). + addHidden('identity', $identity). + addHidden('mailbox', $mailbox). + addHidden('from_htmladdr_search', 'true'); +} + -/* List search results */ +/** + * List search results + * @param array $res Array containing results of search + * @param bool $includesource UNDOCUMENTED [Default=true] + */ function addr_display_result($res, $includesource = true) { - global $color, $javascript_on, $PHP_SELF; + global $color, $javascript_on, $PHP_SELF, $squirrelmail_language; if (sizeof($res) <= 0) return; - echo '
'; + '' . + addHidden('html_addr_search_done', '1'). + ''; } /* --- End functions --- */ -global $mailbox; if ($compose_new_win == '1') { compose_Header($color, $mailbox); } @@ -144,7 +177,7 @@ else { $abook = addressbook_init(); -echo '