2000-06-16 05:24:11 +00:00
|
|
|
<?php
|
|
|
|
if ($type_of_search == "news") {
|
2000-06-18 20:32:14 +00:00
|
|
|
$string = AddSlashes($words);
|
2000-06-17 19:35:30 +00:00
|
|
|
include("old_news.php");
|
2000-06-16 05:24:11 +00:00
|
|
|
}
|
2000-06-18 20:32:14 +00:00
|
|
|
elseif ($type_of_search == "site") {
|
|
|
|
$pageName = "Search Results";
|
|
|
|
$focused = "none"; // Dock icon name to gets a border
|
|
|
|
require("parts/preamble.php"); // Load most of document
|
|
|
|
// Start actual search
|
|
|
|
$dbm = dbmopen("siteindex.db","r");
|
|
|
|
if (dbmexists($dbm, $string)) {
|
|
|
|
$parseMe = dbmfetch($dbm, $string);
|
|
|
|
}
|
|
|
|
dbmclose($dbm);
|
2000-06-18 20:40:55 +00:00
|
|
|
if ($parseMe) {
|
|
|
|
$filenames = preg_split("/&&/", $parseMe);
|
|
|
|
for ($i = 0;$i < sizeof($filenames);$i++) {
|
|
|
|
$temp = $filenames[$i];
|
|
|
|
if ($files[$temp]) {
|
|
|
|
$files[$temp]++;
|
|
|
|
} else {
|
|
|
|
$files[$temp] = 0;
|
|
|
|
}
|
2000-06-18 20:32:14 +00:00
|
|
|
}
|
2000-06-18 20:40:55 +00:00
|
|
|
while (list($key,$val) = each ($files)) {
|
|
|
|
echo "<P><A HREF=\"$key\">$key</A> - $val hits";
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
echo "<P>Sorry, no pages found containing $string";
|
2000-06-18 20:32:14 +00:00
|
|
|
}
|
|
|
|
require("parts/postamble.php"); // Finish this sucker up
|
2000-06-16 05:29:16 +00:00
|
|
|
else {
|
2000-06-17 19:44:10 +00:00
|
|
|
// Preamble
|
|
|
|
$pageName = "Search Results";
|
|
|
|
$focused = "none"; // Dock icon name to gets a border
|
|
|
|
require("parts/preamble.php"); // Load most of document
|
|
|
|
echo '<P>That type of search isn\'t supported yet. Please check back later.';
|
|
|
|
require("parts/postamble.php"); // Finish this sucker up
|
2000-06-16 05:29:16 +00:00
|
|
|
}
|
2000-06-16 05:24:11 +00:00
|
|
|
?>
|