X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=81cb0bc4ebf2c91ed53db422f61334ff5ca33802;hb=854000c01b0a890c69ce818a00517acb35e1857a;hp=5a5c74811ffa245d2202f399766e3abfbc003389;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 5a5c7481..81cb0bc4 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -17,218 +17,218 @@ * $Id$ */ -/*****************************************************************/ -/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ -/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ -/*** + Base level indent should begin at left margin, as ***/ -/*** the require_once below looks. ***/ -/*** + All identation should consist of four space blocks ***/ -/*** + Tab characters are evil. ***/ -/*** + all comments should use "slash-star ... star-slash" ***/ -/*** style -- no pound characters, no slash-slash style ***/ -/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ -/*** ALWAYS USE { AND } CHARACTERS!!! ***/ -/*** + Please use ' instead of ", when possible. Note " ***/ -/*** should always be used in _( ) function calls. ***/ -/*** Thank you for your help making the SM code more readable. ***/ -/*****************************************************************/ - 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'); +require_once('../functions/strings.php'); - // Insert hidden data - function addr_insert_hidden() { - global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, - $identity; - - echo '' . "\n"; - echo '' . "\n"; - echo '' . "\n"; - echo "' . "\n"; - echo "' . "\n"; - echo "' . "\n"; - echo "\n"; - echo "\n"; - } - +/* Insert hidden data */ +function addr_insert_hidden() { + global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, + $identity; - // List search results - function addr_display_result($res, $includesource = true) { - global $color, $PHP_SELF; - - if(sizeof($res) <= 0) return; - - echo '
'; + echo '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '\n" . '' . + "\n"; } - // --- End functions --- - - global $mailbox; - displayPageHeader($color, $mailbox); - // Initialize addressbook - $abook = addressbook_init(); +/* List search results */ +function addr_display_result($res, $includesource = true) { + global $color, $PHP_SELF; + + if (sizeof($res) <= 0) return; + + echo ''; +} + +/* --- End functions --- */ + +global $mailbox; +if ($compose_new_win == '1') { + compose_Header($color, $mailbox); +} +else { + displayPageHeader($color, $mailbox); +} +/* Initialize addressbook */ +$abook = addressbook_init(); ?>
|
\n"; - printf(''; - - print " |
\n" . + ' |
"._("Unable to list addresses from %s"). - "
\n", $abook->backends[$backend]->sname); - } - - } else { - $res = $abook->list_addr(); - addr_display_result($res, true); - } - exit; - - } else - - // Do the search - if(!empty($addrquery) && empty($listall)) { - - if($backend == -1) { - $res = $abook->s_search($addrquery); - } else { - $res = $abook->s_search($addrquery, $backend); - } - - if(!is_array($res)) { - printf("
%s:
%s