From c1e15177efc56cd1eb885787df0f4bcac53ea7dc Mon Sep 17 00:00:00 2001 From: lkehresman Date: Thu, 4 May 2000 22:04:59 +0000 Subject: [PATCH] added html addr book search file git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@493 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/addrbook_search_html.php | 85 ++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/addrbook_search_html.php diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php new file mode 100644 index 00000000..5ef9a06e --- /dev/null +++ b/src/addrbook_search_html.php @@ -0,0 +1,85 @@ +\n"; + displayPageHeader($color, "None"); + //
+ + echo "
"; + echo ""; + echo " "; + echo " "; + echo ""; + echo "
"; + + if(!empty($query)) { + $abook = addressbook_init(); + $res = $abook->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["email"], + $row["label"], $row["source"]); + $line++; + } + print "
 ". + " %s %s". + " %s". + " %s
". + "To | ". + "Cc". + " %s  ". + "%s ". + " %s  %s
"; + } + +?> -- 2.25.1