X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=7fd7ee8e44eec45c7ffa7b13e5f6be48404771d7;hb=b135de9c8c0238f850abca25b972b0969bc5d205;hp=ed05ba998a7494d190ddfaaa12cf39737ab4326b;hpb=245a6892bf5c780904ef9677f24d624ea17e0749;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index ed05ba99..7fd7ee8e 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,268 +1,276 @@ - +\n"; + + while (list($undef, $row) = each($res)) { + $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 | " . + 'Cc | " . + 'Bcc", + 'center', '', 'valign="top" width="5%" nowrap' ) . + html_tag( 'td', ' ' . htmlspecialchars($row['name']), 'left', '', 'valign="top" nowrap' ) . + html_tag( 'td', ' ' . + '" . htmlspecialchars($row['email']) . '' + , 'left', '', 'valign="top"' ) . + html_tag( 'td', htmlspecialchars($row['label']), 'left', '', 'valign="top" nowrap' ); + if ($includesource) { + echo html_tag( 'td', ' ' . $row['source'], 'left', '', 'valign="top" nowrap' ); + } + + echo "\n"; + $line++; } - } + echo ''; } -function cc_address($addr) { - var prefix = ""; - var pwintype = typeof parent.opener.document.compose; +/* ================= End of functions ================= */ + +require_once('../functions/array.php'); +require_once('../functions/strings.php'); +require_once('../functions/addressbook.php'); + +displayHtmlHeader(); + +/* Initialize vars */ +if (!isset($query)) { $query = ''; } +if (!isset($show)) { $show = ''; } +if (!isset($backend)) { $backend = ''; } + +/* Choose correct colors for top and bottom frame */ +if ($show == 'form' && !isset($listall)) { + echo '
'; +} else { + echo '\n"; +} - $addr = $addr.replace(/ {1,35}$/, ""); +/* Empty search */ +if (empty($query) && empty($show) && empty($listall)) { + echo html_tag( 'p', '