X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Faddrbook_search_html.php;h=e8faf646111a4b7d1016bab100f9c220156f3314;hb=6c84ba1ec45ab854c37b6f65c5b4d84ab1c7aad4;hp=5a5c74811ffa245d2202f399766e3abfbc003389;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6;p=squirrelmail.git
diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php
index 5a5c7481..e8faf646 100644
--- a/src/addrbook_search_html.php
+++ b/src/addrbook_search_html.php
@@ -3,232 +3,301 @@
/**
* 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
*
- * 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
*/
-/*****************************************************************/
-/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
-/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
-/*** + Base level indent should begin at left margin, as ***/
-/*** the require_once below looks. ***/
-/*** + All identation should consist of four space blocks ***/
-/*** + Tab characters are evil. ***/
-/*** + all comments should use "slash-star ... star-slash" ***/
-/*** style -- no pound characters, no slash-slash style ***/
-/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
-/*** ALWAYS USE { AND } CHARACTERS!!! ***/
-/*** + Please use ' instead of ", when possible. Note " ***/
-/*** should always be used in _( ) function calls. ***/
-/*** Thank you for your help making the SM code more readable. ***/
-/*****************************************************************/
-
-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');
-
- // Insert hidden data
- function addr_insert_hidden() {
- global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox,
- $identity;
-
- echo '' . "\n";
- echo '' . "\n";
- echo '' . "\n";
- echo "' . "\n";
- echo "' . "\n";
- echo "' . "\n";
- echo "\n";
- echo "\n";
- }
+/**
+ * Path for SquirrelMail required files.
+ * @ignore
+ */
+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);
+/**
+ * Insert hidden data
+ */
+function addr_insert_hidden() {
+ global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox,
+ $identity, $session;
- // List search results
- function addr_display_result($res, $includesource = true) {
- global $color, $PHP_SELF;
-
- if(sizeof($res) <= 0) return;
-
- echo '