- $line = 0;
-
-if ($javascript_on) {
- print
- '<script language="JavaScript" type="text/javascript">' .
- "\n<!-- \n" .
- "function CheckAll(ch) {\n" .
- " for (var i = 0; i < document.addrbook.elements.length; i++) {\n" .
- " if( document.addrbook.elements[i].type == 'checkbox' &&\n" .
- " document.addrbook.elements[i].name.substr(0,16) == 'send_to_search['+ch ) {\n" .
- " document.addrbook.elements[i].checked = !(document.addrbook.elements[i].checked);\n".
- " }\n" .
- " }\n" .
- "}\n" .
- "//-->\n" .
- "</script>\n";
- $chk_all = '<a href="#" onclick="CheckAll(\'T\');">' . _("All") . '</a> <font color="'.$color[9].'">'._("To").'</font>'.
- ' '.
- '<a href="#" onclick="CheckAll(\'C\');">' . _("All") . '</a> <font color="'.$color[9].'">'._("Cc").'</font>'.
- ' '.
- '<a href="#" onclick="CheckAll(\'B\');">' . _("All") . '</a>';
- }
- echo html_tag( 'table', '', 'center', '', 'border="0" width="98%"' ) .
- html_tag( 'tr', '', '', $color[9] ) .
- html_tag( 'th', ' ' . $chk_all, 'left' ) .
- html_tag( 'th', ' ' . _("Name"), 'left' ) .
- html_tag( 'th', ' ' . _("E-mail"), 'left' ) .
- html_tag( 'th', ' ' . _("Info"), 'left' );
-
- if ($includesource) {
- echo html_tag( 'th', ' ' . _("Source"), 'left', '', 'width="10%"' );
- }
-
- echo "</tr>\n";
-
- foreach ($res as $row) {
- $email = AddressBook::full_address($row);
- if ($line % 2) {
- $tr_bgcolor = $color[12];
- } else {
- $tr_bgcolor = $color[4];
- }
- if ($squirrelmail_language == 'ja_JP')
- {
- echo html_tag( 'tr', '', '', $tr_bgcolor, 'style="white-space: nowrap;"' ) .
- html_tag( 'td',
- '<input type="checkbox" name="send_to_search[T' . $line . ']" value = "' .
- htmlspecialchars($email) . '" /> ' . _("To") . ' ' .
- '<input type="checkbox" name="send_to_search[C' . $line . ']" value = "' .
- htmlspecialchars($email) . '" /> ' . _("Cc") . ' ' .
- '<input type="checkbox" name="send_to_search[B' . $line . ']" value = "' .
- htmlspecialchars($email) . '" /> ' . _("Bcc") . ' ' ,
- 'center', '', 'width="5%" style="white-space: nowrap;"' ) .
- html_tag( 'td', ' ' . htmlspecialchars($row['lastname']) . ' ' . htmlspecialchars($row['firstname']) . ' ', 'left', '', 'style="white-space: nowrap;"' ) .
- html_tag( 'td', ' ' . htmlspecialchars($row['email']) . ' ', 'left', '', 'style="white-space: nowrap;"' ) .
- html_tag( 'td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'style="white-space: nowrap;"' );
- } else {
- echo html_tag( 'tr', '', '', $tr_bgcolor, 'style="white-space: nowrap;"' ) .
- html_tag( 'td',
- addCheckBox('send_to_search[T'.$line.']', FALSE, $email).
- ' ' . _("To") . ' ' .
- addCheckBox('send_to_search[C'.$line.']', FALSE, $email).
- ' ' . _("Cc") . ' ' .
- addCheckBox('send_to_search[B'.$line.']', FALSE, $email).
- ' ' . _("Bcc") . ' ' ,
- 'center', '', 'width="5%" style="white-space: nowrap;"' ) .
- html_tag( 'td', ' ' . htmlspecialchars($row['name']) . ' ', 'left', '', 'style="white-space: nowrap;"' ) .
- html_tag( 'td', ' ' . htmlspecialchars($row['email']) . ' ', 'left', '', 'style="white-space: nowrap;"' ) .
- html_tag( 'td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'style="white-space: nowrap;"' );
- }