Add closing Body and HTML tags, remove Newlines at end of files (just incase)
[squirrelmail.git] / src / addrbook_search_html.php
index 8b14ed39827131b12578d6ea88f0107a1853ef4c..887c93703cfb0275756444a484c92413e5a5c80c 100644 (file)
  * This file is included from compose.php
  *
  * $Id$
+ * @package squirrelmail
  */
 
-/* Path for SquirrelMail required files. */
+/** Path for SquirrelMail required files. */
 if (! defined('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');
@@ -34,7 +35,9 @@ 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;
@@ -61,9 +64,13 @@ function addr_insert_hidden() {
    }
 
 
-/* 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;
 
@@ -109,6 +116,21 @@ if ($javascript_on) {
         $tr_bgcolor = '';
         $email = AddressBook::full_address($row);
         if ($line % 2) { $tr_bgcolor = $color[0]; }
+        if ($squirrelmail_language == 'ja_JP')
+            {
+        echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) .
+        html_tag( 'td',
+             '<input type=checkbox name="send_to_search[T' . $line . ']" value = "' .
+             htmlspecialchars($email) . '">&nbsp;' . _("To") . '&nbsp;' .
+             '<input type=checkbox name="send_to_search[C' . $line . ']" value = "' .
+             htmlspecialchars($email) . '">&nbsp;' . _("Cc") . '&nbsp;' .
+             '<input type=checkbox name="send_to_search[B' . $line . ']" value = "' .
+             htmlspecialchars($email) . '">&nbsp;' . _("Bcc") . '&nbsp;' ,
+        'center', '', 'width="5%" nowrap' ) .
+        html_tag( 'td', '&nbsp;' . htmlspecialchars($row['lastname']) . ' ' . htmlspecialchars($row['firstname']) . '&nbsp;', 'left', '', 'nowrap' ) .
+        html_tag( 'td', '&nbsp;' . htmlspecialchars($row['email']) . '&nbsp;', 'left', '', 'nowrap' ) .
+        html_tag( 'td', '&nbsp;' . htmlspecialchars($row['label']) . '&nbsp;', 'left', '', 'nowrap' );
+            } else {
         echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) .
         html_tag( 'td',
              '<input type=checkbox name="send_to_search[T' . $line . ']" value = "' .
@@ -121,6 +143,7 @@ if ($javascript_on) {
         html_tag( 'td', '&nbsp;' . htmlspecialchars($row['name']) . '&nbsp;', 'left', '', 'nowrap' ) .
         html_tag( 'td', '&nbsp;' . htmlspecialchars($row['email']) . '&nbsp;', 'left', '', 'nowrap' ) .
         html_tag( 'td', '&nbsp;' . htmlspecialchars($row['label']) . '&nbsp;', 'left', '', 'nowrap' );
+            }
 
          if ($includesource) {
              echo html_tag( 'td', '&nbsp;' . $row['source'] . '&nbsp;', 'left', '', 'nowrap' );