X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=d3c99c3548a3a90ab54adbfefb7b18ffa738d387;hb=65d0d1624a60633c008fd0b5631ca37713a7ad7c;hp=6c42aa1804c2b36fc74da7d8e893bad2384f5e99;hpb=d4e84069d1d9af8760b8e858672d3ea3d4eac8b0;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 6c42aa18..d3c99c35 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,246 +1,317 @@ - +\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 ''; } -function cc_address($addr) { - var prefix = ""; - var pwintype = typeof parent.opener.document.compose; +/* ================= End of functions ================= */ - $addr = $addr.replace(/ {1,35}$/, ""); +/** 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 = ''; +} +if (! sqgetGlobalVar('query', $query, SQ_POST)) { + $query = ''; +} +if (! sqgetGlobalVar('listall', $listall, SQ_POST)) { + unset($listall); +} +if (! sqgetGlobalVar('backend', $backend, SQ_POST)) { + $backend = ''; +} - if(pwintype != "undefined" ) { - if ( parent.opener.document.compose.send_to_cc.value ) { - prefix = ", "; - parent.opener.document.compose.send_to_cc.value = - parent.opener.document.compose.send_to_cc.value + ", " + $addr; +displayHtmlHeader(); + +/** 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', '