X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=0150e815dbf3de45d693a9db56f81f90c2522bab;hb=4d30dc83a53e5c18f8efa8914d00e648d67e96a0;hp=3e1c696ffdcb6f83ee264fed74533515d97a639a;hpb=12b4ef8b0689e6e2dbcc3c6f7605ca8e7d99e50d;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 3e1c696f..0150e815 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -1,224 +1,296 @@ ' . "\n"; - echo '' . "\n"; - echo '' . "\n"; - echo "' . "\n"; - echo "' . "\n"; - echo "\n"; - } +/** + * addrbook_search_html.php + * + * 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 + * + * $Id$ + */ + +/* 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); - // List search results - function addr_display_result($res, $includesource = true) { - global $color, $PHP_SELF; - - if(sizeof($res) <= 0) return; - - printf('
'; +/* 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"; } - // --- End functions --- - displayPageHeader($color, 'None'); +/* List search results */ +function addr_display_result($res, $includesource = true) { + global $color, $javascript_on, $PHP_SELF, $squirrelmail_language; - // Initialize addressbook - $abook = addressbook_init(); + if (sizeof($res) <= 0) return; -?> + echo ''; +} + +/* --- End functions --- */ + +if ($compose_new_win == '1') { + compose_Header($color, $mailbox); +} +else { + displayPageHeader($color, $mailbox); +} +/* Initialize addressbook */ +$abook = addressbook_init(); + + +echo '"._("Unable to list addresses from %s"). - "
\n", $abook->backends[$backend]->sname); - } + } else { + echo html_tag( 'p', '
%s:
%s