4 This file will return the results of the search. It will: display
5 the logo, the title "Search Results," then a list of all Wiki
6 pages that match seperated by five dots and the text that matched;
7 an HR tag, and then a statement:
8 32 pages found out of 94 pages searched.
9 where the numbers are correct.
11 The online classic Wiki has both full search and title search.
12 Title search is a good idea; it doesn't come with the script you
16 WikiHeader("Search Results");
17 echo "<h1>$LogoImage Search Results</h1>\n";
21 // from classic wiki: $pat =~ s/[+?.*()[\]{}|\\]/\\$&/g;
23 $search = preg_replace("/[+?.*()[\]{}|\\\]/", "", $search);
25 // looping through all keys
26 $key = dbmfirstkey($dbi);
28 if (eregi("$search", $key)) {
30 echo LinkExistingWikiWord($key), "<br>\n";
33 $key = dbmnextkey($dbi, $key);
37 echo "$found pages found out of $count titles searched.\n";