summaryrefslogtreecommitdiff
path: root/search.php
blob: 59b5aace17b5e6b0ee0a3d06656421a7994f94d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

include_once "includes/common.inc";

function find_module($name) {
  global $options, $type;
  if (module_hook($name, "search")) $options .= "<OPTION VALUE=\"$name\"". ($name == $type ? " SELECTED" : "") .">$name</OPTION>\n";
}

module_iterate("find_module");

$search .= "<FORM ACTION=\"search.php\" METHOD=\"POST\">\n";
$search .= " <INPUT SIZE=\"50\" VALUE=\"". check_form($keys) ."\" NAME=\"keys\" TYPE=\"text\">\n";
$search .= " <SELECT NAME=\"type\">$options</SELECT>\n";
$search .= " <INPUT TYPE=\"submit\" VALUE=\"". t("Search") ."\">\n";
$search .= "</FORM>\n";

$output = search_data($keys, $type);

$theme->header();
$theme->box(t("Search"), $search);
$theme->box(t("Result"), $output);
$theme->footer();

?>