X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=2865b9a925c0456aa0da810bab2bf7f474ddd05d;hb=97ffe9633390a5b33b69dd2882abb6c9ab2592b1;hp=81cb0bc4ebf2c91ed53db422f61334ff5ca33802;hpb=9c3e6cd4518d9e0d072a146fd6d19acd4daac243;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 81cb0bc4..2865b9a9 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -10,31 +10,44 @@ * * 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'); -require_once('../functions/strings.php'); +/* 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/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']; +} /* 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 '
'; @@ -104,7 +145,6 @@ function addr_display_result($res, $includesource = true) { /* --- End functions --- */ -global $mailbox; if ($compose_new_win == '1') { compose_Header($color, $mailbox); } @@ -114,21 +154,23 @@ else { /* 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 . "