- foreach ($res as $row) {
- $tr_bgcolor = '';
- if ($line % 2) { $tr_bgcolor = $color[0]; }
- echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) .
- html_tag( 'td',
- '<input type=checkbox name="send_to_search[T' . $line . ']" value = "' .
- htmlspecialchars($row['email']) . '"> ' . _("To") . ' ' .
- '<input type=checkbox name="send_to_search[C' . $line . ']" value = "' .
- htmlspecialchars($row['email']) . '"> ' . _("Cc") . ' ' .
- '<input type=checkbox name="send_to_search[B' . $line . ']" value = "' .
- htmlspecialchars($row['email']) . '"> ' . _("Bcc") . ' ' ,
- 'center', '', 'width="5%" nowrap' ) .
- html_tag( 'td', ' ' . $row['name'] . ' ', 'left', '', 'nowrap' ) .
- html_tag( 'td', ' ' . $row['email'] . ' ', 'left', '', 'nowrap' ) .
- html_tag( 'td', ' ' . $row['label'] . ' ', 'left', '', 'nowrap' );
-
- if ($includesource) {
- echo html_tag( 'td', ' ' . $row['source'] . ' ', 'left', '', 'nowrap' );
- }
- echo "</tr>\n";
- $line ++;
- }
- if ($includesource) { $td_colspan = '5'; } else { $td_colspan = '4'; }
- echo html_tag( 'tr',
- html_tag( 'td',
- '<INPUT TYPE=submit NAME="addr_search_done" VALUE="' .
- _("Use Addresses") . '">' ,
- 'center', '', 'colspan="'. $td_colspan .'"' )
- ) .
- '</TABLE>' .
- '<INPUT TYPE=hidden VALUE=1 NAME="html_addr_search_done">' .
- '</FORM>';
+ $oTemplate->assign('use_js', false);
+ $oTemplate->assign('include_abook_name', $includesource);
+ $oTemplate->assign('addresses', formatAddressList($res));
+
+ $oTemplate->display('addrbook_search_list.tpl');
+
+ echo '</form>';