From 171479fcfa4ddd85c7a1d9564ca286a5c91a418f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 10 Feb 2001 14:36:49 +0000 Subject: - a 2nd batch of various updates --- includes/search.inc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 includes/search.inc (limited to 'includes/search.inc') diff --git a/includes/search.inc b/includes/search.inc new file mode 100644 index 000000000..2fd527a90 --- /dev/null +++ b/includes/search.inc @@ -0,0 +1,30 @@ +\n"; + $output .= " "; + $output .= " \n"; + $output .= "\n"; + return $output; +} + +function search_data($keys, $type) { + if ($keys && $type) { + $result = module_execute($type, "find", $keys); + foreach ($result as $entry) { + $output .= "

\n"; + $output .= " $entry[subject]
"; + $output .= " $site_url$entry[link]". ($entry[user] ? " - ". format_username($entry[user]) : "") ."". ($entry[date] ? " - ". format_date($entry[date], "small") : "") .""; + $output .= "

\n"; + } + } + + if (!$output) { + $output .= "

Your search yielded no results:

\n"; + } + + return $output; +} + +?> \ No newline at end of file -- cgit v1.2.3