X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=f6c28fe75bb2355ee6ef59a73a3e7650ea318c0d;hb=383bc373eb3ee90c0aabc1e66dd483f4439f1299;hp=7a683a4800fd5ebfca7b4152cd8e7cd24e55b6ec;hpb=5a6f29a69178cd63f5ba552a8561f18d555b4af6;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 7a683a48..f6c28fe7 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -1,219 +1,288 @@ ' . "\n"; - echo '' . "\n"; - echo '' . "\n"; - echo "' . "\n"; - echo "' . "\n"; - echo "' . "\n"; - echo "\n"; - echo "\n"; - } +/** + * addrbook_search_html.php + * + * Copyright (c) 1999-2002 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$ + */ + +/* Path for SquirrelMail required files. */ +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'functions/smtp.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'); + +$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']; +} - // List search results - function addr_display_result($res, $includesource = true) { - global $color, $PHP_SELF; - - if(sizeof($res) <= 0) return; - - echo '
'; +/* 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 --- - global $mailbox; - displayPageHeader($color, $mailbox); - - // Initialize addressbook - $abook = addressbook_init(); +/* List search results */ +function addr_display_result($res, $includesource = true) { + global $color, $javascript_on, $PHP_SELF; -?> + if (sizeof($res) <= 0) return; -
- |
"._("Unable to list addresses from %s"). - "
\n", $abook->backends[$backend]->sname); - } + } else { + echo html_tag( 'p', '
%s:
%s