From 588727c7e2b8954ec3dbde293cf4c4d68b119f9b Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 19 Jun 2006 18:38:29 +0000 Subject: Merge from 3.0 branch till 1185. --- buildscripts/index/search.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 buildscripts/index/search.php (limited to 'buildscripts/index/search.php') diff --git a/buildscripts/index/search.php b/buildscripts/index/search.php new file mode 100644 index 00000000..a34363f4 --- /dev/null +++ b/buildscripts/index/search.php @@ -0,0 +1,36 @@ +find(strtolower($keyword)); + $content=''; + foreach($results as $entry) + $content.="
  • link}\">{$entry->title}
  • \n"; + if($content!=='') + { + $count=count($results); + $content="

    Total $count pages matching keyword ".htmlentities($keyword).".\n

      \n$content
    \n"; + } + else + $content="

    No page matches ".htmlentities($keyword).".

    "; +} +else + $content="

    Please specify a keyword to search for.

    "; + +$page=file_get_contents(dirname(__FILE__).'/index.html'); +$page=preg_replace('/.*/ms',$content,$page); +if($keyword!=='') + $page=preg_replace('/ \ No newline at end of file -- cgit v1.2.3