mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-24 05:01:23 +00:00
67 lines
2 KiB
PHP
67 lines
2 KiB
PHP
<?
|
|
switch ($type_of_search) {
|
|
case "news":
|
|
$string = AddSlashes ($words);
|
|
include "old_news.php";
|
|
break;
|
|
case "-announce":
|
|
$string = urlencode ($words);
|
|
header ("Location: http://www.geocrawler.com/search/?config=3792&words=$string");
|
|
break;
|
|
case "-bugs":
|
|
$string = urlencode ($words);
|
|
header ("Location: http://www.geocrawler.com/search/?config=7109&words=$string");
|
|
break;
|
|
case "-cvs":
|
|
$string = urlencode ($words);
|
|
header ("Location: http://www.geocrawler.com/search/?config=899&words=$string");
|
|
break;
|
|
case "-devel":
|
|
$string = urlencode ($words);
|
|
header ("Location: http://www.geocrawler.com/search/?config=856&words=$string");
|
|
break;
|
|
case "-user":
|
|
$string = urlencode ($words);
|
|
header ("Location: http://www.geocrawler.com/search/?config=898&words=$string");
|
|
break;
|
|
case "site":
|
|
$pageName = "Search Results";
|
|
$focused = "none"; // Dock icon name to get a border
|
|
include "parts/preamble.php"; // Load most of document
|
|
|
|
// Start actual search
|
|
$lib = dblist ();
|
|
$dbm = dbmopen ("siteindex.db","r");
|
|
if (dbmexists ($dbm, $string)) {
|
|
$parseMe = dbmfetch($dbm, $string);
|
|
}
|
|
dbmclose ($dbm);
|
|
if ($parseMe) {
|
|
echo $parseMe;
|
|
$filenames = preg_split("/&&/", $parseMe);
|
|
for ($i = 0;$i < sizeof($filenames);$i++) {
|
|
$temp = $filenames[$i];
|
|
if ($files[$temp]) {
|
|
$files[$temp]++;
|
|
} else {
|
|
$files[$temp] = 0;
|
|
}
|
|
}
|
|
while (list($key,$val) = each ($files)) {
|
|
echo "<P><A HREF=\"$key\">$key</A> - $val hits";
|
|
}
|
|
} else {
|
|
echo "<P>Sorry, no pages found containing '$words'";
|
|
}
|
|
include "parts/postamble.php"; // Finish this sucker up
|
|
break;
|
|
default:
|
|
$pageName = "Search Results";
|
|
$focused = "none"; // Dock icon name to gets a border
|
|
include "parts/preamble.php"; // Load most of document
|
|
|
|
?><P>That type of search isn't supported yet. Please check back later.<?
|
|
include "parts/postamble.php"; // Finish this sucker up
|
|
break;
|
|
}
|
|
?>
|