X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=7fd7ee8e44eec45c7ffa7b13e5f6be48404771d7;hb=77e6058f22e41b506fbc43697ce70aa76d831d00;hp=b9bedc0221d5c62de30a0302002ffd44db6cd6fe;hpb=b22c4e166f29bfd2e8b63f960682c3a47107c58f;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index b9bedc02..7fd7ee8e 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -17,6 +17,7 @@ require_once('../src/validate.php'); require_once('../functions/strings.php'); +require_once('../functions/html.php'); /* Function to include JavaScript code */ function insert_javascript() { @@ -93,40 +94,45 @@ function display_result($res, $includesource = true) { insert_javascript(); $line = 0; - echo '
' . - ' | ' . _("Name") . - ' | ' . _("E-mail") . - ' | ' . _("Info"); + echo html_tag( 'table', '', 'center', '', 'border="0" width="98%"' ) . + html_tag( 'tr', '', '', $color[9] ) . + html_tag( 'th', ' ', 'left' ) . + html_tag( 'th', ' ' . _("Name"), 'left' ) . + html_tag( 'th', ' ' . _("E-mail"), 'left' ) . + html_tag( 'th', ' ' . _("Info"), 'left' ); if ($includesource) { - echo ' | ' . _("Source"); + echo html_tag( 'th', ' ' . _("Source"), 'left', 'width="10%"' ); } - echo " |
---|---|---|---|---|
' . + $tr_bgcolor = ''; + $email = htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES); + if ($line % 2) { $tr_bgcolor = $color[0]; } + echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) . + html_tag( 'td', 'To | " . + "'" . $email . "');\">To | " . 'Cc | " . + "'" . $email . "');\">Cc | " . 'Bcc" . - ' | ' . - $row['name'] . ' | ' . + "'" . $email . "');\">Bcc", + 'center', '', 'valign="top" width="5%" nowrap' ) . + html_tag( 'td', ' ' . htmlspecialchars($row['name']), 'left', '', 'valign="top" nowrap' ) . + html_tag( 'td', ' ' . '" . $row['email'] . '' . - ' | ' . $row['label']; + "'" . $email . "');\">" . htmlspecialchars($row['email']) . '' + , 'left', '', 'valign="top"' ) . + html_tag( 'td', htmlspecialchars($row['label']), 'left', '', 'valign="top" nowrap' ); if ($includesource) { - echo ' | ' . $row['source']; + echo html_tag( 'td', ' ' . $row['source'], 'left', '', 'valign="top" nowrap' ); } - echo " |
' .
- _("No persons matching your search was found") .
- "