X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Faddrbook_search.php;h=25a11eaefcddb959fbe48eb06b96fa9643a250c7;hp=b64d16d6bb0cc8765aedba7bb284cb479c57566e;hb=f48a90cae0cc40392dd10b2384d8a5d45bd91984;hpb=3523532820419e678843408d5a31db951636fa55 diff --git a/src/addrbook_search.php b/src/addrbook_search.php index b64d16d6..25a11eae 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,5 +1,4 @@ - -\n"; - - while (list($undef, $row) = each($res)) { - $email = htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES); - if ($line % 2) { - $tr_bgcolor = $color[12]; - } else { - $tr_bgcolor = $color[4]; - } - echo html_tag( 'tr', '', '', $tr_bgcolor, 'style="white-space: nowrap;"' ) . - html_tag( 'td', - '"._("To")." | " . - '"._("Cc")." | " . - '"._("Bcc")."", - 'center', '', 'valign="top" width="5%" style="white-space: nowrap;"' ) . - html_tag( 'td', ' ' . htmlspecialchars($row['name']), 'left', '', 'valign="top" style="white-space: nowrap;"' ) . - html_tag( 'td', ' ' . - '" . htmlspecialchars($row['email']) . '' - , 'left', '', 'valign="top"' ) . - html_tag( 'td', htmlspecialchars($row['label']), 'left', '', 'valign="top" style="white-space: nowrap;"' ); - if ($includesource) { - echo html_tag( 'td', ' ' . $row['source'], 'left', '', 'valign="top" style="white-space: nowrap;"' ); - } - - echo "\n"; - $line++; - } - echo ''; + $oTemplate->assign('use_js', true); + $oTemplate->assign('include_abook_name', $includesource); + $oTemplate->assign('addresses', formatAddressList($res)); + + $oTemplate->display('addrbook_search_list.tpl'); } /* ================= End of functions ================= */ /** lets get the global vars we may need */ -sqgetGlobalVar('key', $key, SQ_COOKIE); -sqgetGlobalVar('username', $username, SQ_SESSION); -sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION); -sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION); if (! sqgetGlobalVar('show' , $show)) { $show = ''; @@ -173,30 +63,16 @@ if (! sqgetGlobalVar('backend', $backend, SQ_POST)) { } displayHtmlHeader(); +echo "
\n"; /** set correct value of $default_charset */ -global $default_charset; set_my_charset(); -/* Choose correct colors for top and bottom frame */ -if ($show == 'form' && !isset($listall)) { - echo ''; -} else { - echo '\n"; -} - /* Empty search */ if (empty($query) && empty($show) && !isset($listall)) { - echo html_tag( 'p', '