0) { $pattern=$HTTP_POST_VARS["pattern"]; } else { if(count($HTTP_GET_VARS)>0) { $words=$HTTP_GET_VARS["words"]; if(!isset($words)){ $query=$QUERY_STRING; } } } if (isset($pattern) && ($pattern)) { SetCookie("prevsearch",$pattern,0,"",""); } ?> Search Form 1) { $i=$page-1; $last="Previous page"; } else { $last=" "; } if ($page<$pages) { $i=$page+1; $next="Next page"; } else { $next=" "; } $middle="Displaying results $firstdisplayed to $lastdisplayed"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "

$last
$middle
$next


\n"; } //require("shared.inc"); if((!isset($pattern))&&(!isset($words))&&(!isset($query))) { $DISABLE_KICKOUTS = true; $form=$PHP_SELF; ?>
Search for:

Error: No search words specified.

"; echo "Click here for a New Search

\n"; CommonFooter(); exit(); } if (!isset($query)) { if (!(isset($words))) { $words=EscapeShellCmd(UrlEncode($pattern)); } $config="mtppi"; if (isset($page)) {$off="&page=$page";} else {$off="";} $restrict="mtppi.org"; $query="words=$words&config=htdig/$config$off"; #&restrict=$restrict$off"; } exec("/home/httpd/cgi-bin/htsearch \"$query\"",&$result); $rc=count($result); if ($rc<2) { echo "There was an error executing this query.

Please try later

"; exit; } if ($result[2]=="NOMATCH") { echo "Sorry, no documents matched your search for"".$pattern."".

"; echo "Click here for a New Search

\n"; exit; } $matches=$result[2]; $firstdisplayed=$result[3]; $lastdisplayed=$result[4]; $page=$result[5]; $pages=$result[6]; $baseurl=$PHP_SELF."?pattern=$words&show=$show&base=$base"; # echo "$matches documents match your search for '$pattern' in the $where:

\n"; echo "Click here for a New Search

\n"; # makeBar("",$page,$pages,$baseurl,$firstdisplayed,$lastdisplayed); $i=7; #skip response header while($i<$rc) { echo $result[$i]; echo "\n"; $i++; } echo "
\n"; # makeBar("2",$page,$pages,$baseurl,$firstdisplayed,$lastdisplayed); } ?>