\n";
}
}
}
}
function findnextver ($startpos, $sourcesarray) {
for ($i = $startpos; $i < count($sourcesarray); $i++) {
if (eregi("^Version:.*", $sourcesarray[$i])) {
return $sourcesarray[$i];
}
}
}
function findnextdir ($startpos, $sourcesarray) {
for ($i = $startpos; $i < count($sourcesarray); $i++) {
if (eregi("^Directory:.*", $sourcesarray[$i])) {
$dirsplit = explode(" ", $sourcesarray[$i]);
return $dirsplit[1];
}
}
}
//function block end
/*********************************************/
//check if someone has hit the send button
if ($_POST["send"] == "send") {
$invalidquery = "0";
//check if the query field is empty
if (empty($_POST['query'])) {
$invalidquery = "1";
}
//check if we've a reason to believe the query is invalid
if ($invalidquery == "0") {
performsearch();
} else {
sendtheerror($invalidreason);
}
} else {
//nothing send to us so print the search form
sendtheform();
}
?>