X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=e8faf646111a4b7d1016bab100f9c220156f3314;hb=6c84ba1ec45ab854c37b6f65c5b4d84ab1c7aad4;hp=b81a7531e076ddbf46b227fef2b798f5957a56e8;hpb=abb3c512ea6977cc33e959fdf65bb2fdc8ddd5e8;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index b81a7531..e8faf646 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -3,23 +3,29 @@ /** * addrbook_search_html.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2005 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 * - * $Id$ + * @version $Id$ + * @package squirrelmail + * @subpackage addressbook */ -/* Path for SquirrelMail required files. */ +/** + * Path for SquirrelMail required files. + * @ignore + */ if (! defined('SM_PATH') ) { - define('SM_PATH','../'); + define('SM_PATH','../'); } -/* SquirrelMail required files. */ +/** 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'); @@ -27,53 +33,48 @@ require_once(SM_PATH . 'functions/plugin.php'); require_once(SM_PATH . 'functions/strings.php'); require_once(SM_PATH . 'functions/html.php'); -$session = $_POST['session']; -$mailbox = $_POST['mailbox']; -if ( isset($_POST['addrquery']) ) { - $addrquery = $_POST['addrquery']; -} -if ( isset($_POST['listall']) ) { - $listall = $_POST['listall']; -} -if ( isset($_POST['backend'] ) ) { - $backend = $_POST['backend']; -} +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 */ +/** + * 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 --- */ @@ -157,7 +177,7 @@ else { $abook = addressbook_init(); -echo '