X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=693ef057e765ecc90c26dbf5f2044b622dcab078;hb=refs%2Fheads%2Fmaster;hp=a4a92bb501c2f4b0bc412193a41332a540aafb16;hpb=f740c049d91feb836dd9633be9e8ff52c00d066f;p=squirrelmail.git
diff --git a/src/addrbook_search.php b/src/addrbook_search.php
index a4a92bb5..15689963 100644
--- a/src/addrbook_search.php
+++ b/src/addrbook_search.php
@@ -1,251 +1,144 @@
-
-
-';
- printf("
".
- " | %s | %s".
- " | %s",
- _("Name"), _("E-mail"), _("Info"));
-
- if($includesource)
- printf(" | %s", _("Source"));
-
- print " |
\n";
-
- while(list($undef, $row) = each($res)) {
- printf("".
- "To | ".
- "Cc | ".
- "Bcc".
- " | %s | ".
- " %s ".
- " | %s ",
- ($line % 2) ? " bgcolor=\"$color[0]\"" : "",
- $row["email"], $row["email"], $row["email"],
- $row["name"], $row["email"], $row["email"],
- $row["label"]);
-
- if($includesource)
- printf(" | %s", $row["source"]);
-
- print " |
\n";
- $line++;
- }
- print '';
- }
-
- /* ================= End of functions ================= */
-
- include("../functions/strings.php");
- include('../functions/i18n.php');
- include('../config/config.php');
- include('../functions/array.php');
- include('../functions/strings.php');
- include('../functions/page_header.php');
- include('../functions/addressbook.php');
- include('../src/load_prefs.php');
-
- displayHtmlHeader();
-
- // Initialize vars
- if(!isset($query)) $query = "";
- if(!isset($show)) $show = "";
-
- // Choose correct colors for top and bottom frame
- if($show == 'form') {
- echo "';
- } else {
- echo "\n";
- }
-
- // Empty search
- if(empty($query) && empty($show) && empty($listall)) {
- printf("
%s
\n\n",
- _("No persons matching your search was found"));
- exit;
- }
-
- // Initialize addressbook
- $abook = addressbook_init();
-
- // Create search form
- if($show == 'form') {
- printf("\n";
- } else
-
- // Show personal addressbook
- if($show == 'blank' || !empty($listall)) {
-
- if($backend != -1 || $show == 'blank') {
- if($show == 'blank')
- $backend = $abook->localbackend;
-
- //printf("%s
\n", $abook->backends[$backend]->sname);
-
- $res = $abook->list_addr($backend);
-
- if(is_array($res)) {
- display_result($res, false);
- } else {
- printf(""._("Unable to list addresses from %s").
- "
\n", $abook->backends[$backend]->sname);
- }
-
- } else {
- $res = $abook->list_addr();
- display_result($res, true);
- }
-
- } else
-
- // Do the search
- if(!empty($query) && empty($listall)) {
-
- if($backend == -1) {
- $res = $abook->s_search($query);
- } else {
- $res = $abook->s_search($query, $backend);
- }
-
- if(!is_array($res)) {
- printf("
%s:
%s
\n