updated search feature 90% complete

This commit is contained in:
root 2025-01-15 09:00:18 +01:00
parent 55d07d6549
commit 5a844e25e0
5 changed files with 54 additions and 18 deletions

View file

@ -35,7 +35,7 @@ require("header.php");
// there needs to be regex checking, only allow [a-zA-Z0-9.:/]
$query=preg_replace("/[^a-zA-Z0-9:\/.\ ]/", "", $query);
echo "Search results for " . $query . " :";
echo "<p>Search results for " . $query . " :</p>";
echo nl2br("\n");
echo "<p>" . "Instance name: " . $_SERVER['SERVER_NAME'] . "</p>";
$instance= $_SERVER['SERVER_NAME'];
@ -45,8 +45,12 @@ require("header.php");
//echo $verifiedcsvpath;
//echo nl2br("\n");
//echo $unverifiedcsvpath;
echo "<h3><u>Verified Links:</u></h3>";
echo nl2br("\n");
DisplayCSVNEW($unverifiedcsvpath);
DisplayCSVNEW($verifiedcsvpath,$query);
echo "<h3><u>Unverified Links:</u></h3>";
echo nl2br("\n");
DisplayCSVNEW($unverifiedcsvpath,$query);
// display the results of verified.csv
// only display the results of verified.csv that matches with the search term
// display the results of unverified.csv
@ -54,6 +58,6 @@ require("header.php");
}
else{ // if query length is less than minimum or more than maximum
echo "Error: Query must be between ".$min_length . " and ".$max_length . " characters.";
echo "<p>Error: Query must be between ".$min_length . " and ".$max_length . " characters.</p>";
}
?>