-/* Create search form */
-if ($show == 'form' && empty($listall)) {
- echo '<FORM NAME=sform TARGET=abookres ACTION="addrbook_search.php'.
- '" METHOD="POST">' . "\n" .
- html_tag( 'table', '', '', '', 'border="0" width="100%" height="100%"' ) .
- html_tag( 'tr' ) .
- html_tag( 'td', ' <strong>' . _("Search for") . "</strong>\n", 'left', '', 'nowrap valign="middle" width="10%"' ) .
- html_tag( 'td', '', 'left', '', '' ) .
- '<INPUT TYPE=text NAME=query VALUE="' . htmlspecialchars($query) .
- "\" SIZE=28>\n";
-
- /* List all backends to allow the user to choose where to search */
- if ($abook->numbackends > 1) {
- echo '<STRONG>' . _("in") . '</STRONG> <SELECT NAME=backend>'."\n".
- '<OPTION VALUE=-1 SELECTED>' . _("All address books") . "\n";
- $ret = $abook->get_backend_list();
- while (list($undef,$v) = each($ret)) {
- echo '<OPTION VALUE=' . $v->bnum . '>' . $v->sname . "\n";
- }
- echo "</SELECT>\n";
- } else {
- echo '<INPUT TYPE=hidden NAME=backend VALUE=-1>' . "\n";
- }
-
- echo '</td></tr>' .
- html_tag( 'tr',
- html_tag( 'td', '', 'left' ) .
- html_tag( 'td',
- '<INPUT TYPE=submit VALUE="' . _("Search") . '" NAME=show>' .
- ' | <INPUT TYPE=submit VALUE="' . _("List all") .
- '" NAME=listall>' . "\n" .
- ' | <INPUT TYPE=button VALUE="' . _("Close") .
- '" onclick="parent.close();">' . "\n" ,
- 'left' )
- ) .
- '</table></form>' . "\n";
+/* Create search form (top frame) */
+if ($show == 'form' && ! isset($listall)) {
+ echo "<form name=\"sform\" target=\"abookres\" action=\"addrbook_search.php\" method=\"post\">\n";
+
+ $oTemplate->assign('compose_addr_pop', true);
+ $oTemplate->assign('backends', getBackends());
+ $oTemplate->display('addressbook_search_form.tpl');
+
+ echo "</form>\n";