diff --git a/www/header.php b/www/header.php
index d560fea..97838b1 100644
--- a/www/header.php
+++ b/www/header.php
@@ -57,7 +57,7 @@ if (!preg_match("~^(?:f|ht)tps?://~i", $data[3])) {
$rowcount++;
- if ($oldcatname != $data[1]){
+ if (strtolower($oldcatname) != strtolower($data[1])){
//echo "
| |
|
"; // skip a row if new category
//echo " | |
|
"; // skip a row if new category
echo '' . $data[1] . ' | '; // display the category as its the first row with this new category
@@ -158,26 +158,21 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
$data[6]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[6]);
$data[7]=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $data[7]);
- if (str_contains(strtolower($data[3]), strtolower($query)) or str_contains(strtolower($data[2]), strtolower($query)) or str_contains(strtolower($data[1]), strtolower($query))) {
$resultcount++;
for ($c=0; $c < $num; $c++) { // iterate over each row
- // if the row is the first one (name url status score) only display (Name Status Score):
- // display the contents of a csv row
if ( $c == "1" ){
- if ($oldcatname != $data[1]){
+ if (strtolower($oldcatname) != strtolower($data[1])){
echo '' . $data[1] . ' | '; // display the category as its the first row with this new category
$oldcatname=$data[1];
}
}
}
- }
}
}
echo 'Display All Links |';
fclose($handle);
}
-//echo "" . $resultcount . " Result(s) found.
";
}
}
diff --git a/www/index.php b/www/index.php
index 8f738d3..2412089 100644
--- a/www/index.php
+++ b/www/index.php
@@ -84,9 +84,8 @@ require("header.php");
// only display the results of unverified.csv that matches with the search term
}
- else{ // if query length is less than minimum or more than maximum
- echo '
Search query must be between '.$min_length . " and ".$max_length . " characters.
";
- // TODO list the available categories
+ else { // if query length is less than minimum or more than maximum
+ echo '
Search query must be between ' . $min_length . " and " . $max_length . " characters.
";
}
?>