X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Faddrbook_search.php;h=01e4295a9b8b7de7714e8dce3adee10aa717bfc1;hp=a2a011b4b3029ae2852c57dd72aa2693c467cf8a;hb=adc3ea746a7853859d1e17cf60550992ccba011a;hpb=a51f9f4b4eed91ac80a85dbca1ce473b6f4b3dde diff --git a/src/addrbook_search.php b/src/addrbook_search.php index a2a011b4..01e4295a 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,181 +1,144 @@ - - - - -<?php - printf("%s: %s", $org_title, _("Address Book")); -?> - - -"; - } else { - echo "\n"; - } - - // Just make a blank page and exit - if(($show == "blank") || (empty($query) && empty($show))) { - printf("


%s

\n\n", - _("Search results will display here")); - exit; - } - - // Create search form - if($show == "form") { - printf("
\n", - $PHP_SELF); - printf(""); - printf("
\n"); - printf(" %s:\n\n", - _("Search for")); - printf(" \n", - htmlspecialchars($query)); - printf("\n"); - printf(" ", - _("Search")); - printf("\n"); - printf("\n", - _("Close window")); - printf("
\n"); - } - - // Include JavaScript code if this is search results - if(!empty($query)) { -?> - - -s_search($query); - - if(!is_array($res)) { - printf("


%s:
%s

\n\n", - _("Your search failed with the following error(s)"), - $abook->error); - exit; - } - - if(sizeof($res) == 0) { - printf("


%s.

\n\n", - _("No persons matching your search was found")); - exit; - } - - // List search results - $line = 0; - print ""; - printf("\n", - _("Name"), _("E-mail"), _("Info"), _("Source")); - - while(list($key, $row) = each($res)) { - printf("\n", - ($line % 2) ? " bgcolor=\"$color[0]\"" : "", $row["email"], - $row["email"], $row["name"], $row["email"], $row["label"], - $row["source"]); - $line++; - } - print "
 ". - " %s %s". - " %s". - " %s
". - "To | ". - "Cc". - " %s  %s ". - " %s  %s
"; - } -?> - - +$oTemplate->display('footer.tpl');