X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=abe09e9f68ffcdcbf8cdb7fdd4d30e62ea469d12;hp=fae1d4f3207e18d42148a92c7230084ac53a356b;hb=3cebb0a5cf2085edadc3ed406ca888f876c6d8d9;hpb=d51894be063bf2e1349762bc554358c62d368e36 diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index fae1d4f3..abe09e9f 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -16,32 +16,17 @@ ** $Id$ **/ - session_start(); - - if (!isset($config_php)) - include('../config/config.php'); - if (!isset($strings_php)) - include('../functions/strings.php'); - if (!isset($auth_php)) - include('../functions/auth.php'); - if (!isset($page_header_php)) - include('../functions/page_header.php'); - if (!isset($date_php)) - include('../functions/date.php'); - if (!isset($smtp_php)) - include('../functions/smtp.php'); - if (!isset($display_messages_php)) - include('../functions/display_messages.php'); - if (!isset($addressbook_php)) - include('../functions/addressbook.php'); - if (!isset($plugin_php)) - include('../functions/plugin.php'); - - include('../src/load_prefs.php'); + require_once('../src/validate.php'); + require_once('../functions/date.php'); + require_once('../functions/smtp.php'); + require_once('../functions/display_messages.php'); + require_once('../functions/addressbook.php'); + require_once('../functions/plugin.php'); // Insert hidden data function addr_insert_hidden() { - global $body, $subject, $send_to, $send_to_cc, $send_to_bcc; + global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, + $identity; echo '' . "\n"; echo "' . "\n"; + echo "' . "\n"; + echo "\n"; echo "\n"; } @@ -65,8 +54,9 @@ if(sizeof($res) <= 0) return; - printf('
'."\n", - $PHP_SELF); + echo '\n"; + echo ''; + echo "\n"; addr_insert_hidden(); $line = 0; @@ -81,21 +71,23 @@ print "\n"; - while(list($undef, $row) = each($res)) { - printf("". - " To". - " Cc ". - " %s  ". - "%s". - " %s ", - ($line % 2) ? " bgcolor=\"$color[0]\"" : "", - htmlspecialchars($row["email"]), htmlspecialchars($row["email"]), - $row["name"], $row["email"], $row["label"]); + foreach ($res as $row) { + echo ''; + echo ' To '; + echo ' Cc '; + echo ' Bcc '; + echo ' ' . $row['name'] . ' '; + echo ' ' . $row['email'] . ' '; + echo ' ' . $row['label'] . ' '; if($includesource) - printf(" %s", $row["source"]); - - print "\n"; - $line++; + echo ' ' . $row['source'] . ' '; + echo "\n"; + $line ++; } printf('', @@ -108,8 +100,9 @@ // --- End functions --- - displayPageHeader($color, 'None'); - + global $mailbox; + displayPageHeader($color, $mailbox); + // Initialize addressbook $abook = addressbook_init(); @@ -131,11 +124,12 @@ printf(" %s\n", _("Search for")); addr_insert_hidden(); if (! isset($addrquery)) - $addrquery = ""; + $addrquery = ''; printf(" \n", htmlspecialchars($addrquery)); // List all backends to allow the user to choose where to search + if(!isset($backend)) $backend = ""; if($abook->numbackends > 1) { printf("%s \n", _("Return"));