/*
You need to grab http://www.php.net/Mirrors-htdig.tgz and follow the
directions in there if you want to run the search engine on your
mirror (or emulate it on your own website).
*/
if (isset($pattern) && ($pattern)) {
SetCookie("prevsearch",$pattern,0,"",".php.net");
}
require("shared.inc");
$HAVE_SEARCH=$MIRRORS[$MYSITE][5];
if (isset($pattern) && ($pattern)) {
$location = "http://www.progressive-comp.com/Lists/";
if ($show=="maillist") {
$query = "l=php3-general&r=1&w=2&q=b&s=".urlencode($pattern);
Header("Location: ".$location."?".$query);
exit;
} else if ($show=="devlist") {
$query = "l=php-dev&r=1&w=2&q=b&s=".urlencode($pattern);
Header("Location: ".$location."?".$query);
exit;
} else if ($show=="phpdoc") {
$query = "l=phpdoc&r=1&w=2&q=b&s=".urlencode($pattern);
Header("Location: ".$location."?".$query);
exit;
} else if ($show=="phplib") {
$query = "l=phplib&w=2&r=1&q=b&s=".urlencode($pattern);
Header("Location: ".$location."?".$query);
exit;
} else if ($show=="phplib-dev") {
$query = "l=phplib-dev&w=2&r=1&q=b&s=".urlencode($pattern);
Header("Location: ".$location."?".$query);
exit;
} else if ($show=="php-kb") {
$location = "http://www.faqts.com/knowledge-base/search/index.phtml";
$query = "fid=51&search=".urlencode($pattern);
Header("Location: $location?$query");
exit;
}
if (!$HAVE_SEARCH) {
$location="http://uk.php.net/search.php";
$query = "show=".$show."&pattern=".urlencode($pattern)."&sourceurl=".urlencode($MYSITE);
Header("Location: ".$location."?".$query);
exit;
}
}
include("configuration.inc");
function makeBar($no,$page,$pages,$baseurl,$firstdisplayed,$lastdisplayed) {
global $FONTFACE;
if ($page>1) {
$i=$page-1;
$last="
";
} else {
$last=" ";
}
if ($page<$pages) {
$i=$page+1;
$next="
";
} else {
$next=" ";
}
$middle="Displaying results $firstdisplayed to $lastdisplayed";
echo "
| $last | \n";
echo "$middle | \n";
echo "$next | \n";
echo "