added optional sensitive search

This commit is contained in:
root 2025-01-23 13:19:31 +01:00
parent bdde1d4f44
commit 99e101f9cf
2 changed files with 20 additions and 9 deletions

View file

@ -1,5 +1,5 @@
<?php
function DisplayCSVNEW($csvfile, $query) {
function DisplayCSVNEW($csvfile, $query, $sensitive) {
$resultcount=0;
$row = 1;
echo "<center><table>\n\n"; //begin html table formatting
@ -16,6 +16,7 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
if ( $row == "2") {
echo "<tr><td>Category</td> <td>Name</td> <td>Score</td> <td></td></tr>";
//echo "<tr><td>Category</td> <td>Name</td> <td>Sensitive</td> <td>Score</td> <td></td></tr>"; //OPTIONAL: if you want to display the sensitive column
}else{
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++;
@ -31,6 +32,10 @@ if (!preg_match("~^(?:f|ht)tps?://~i", $data[3])) {
$urllink = $data[3];
}
//if ((($sensitive == 1) and ($data[4] == "✔️")) or (($sensitive == 0) and ($data[4] != "✔️")) ){
// ONLY display links if (sensitive equals to 1 and sensitiveCOLUMN equals to V) OR (sensitive equals to 0 and sensitiveCOLUMN is NOT equal to V)
if (($data[4] != "✔️") or (($sensitive == 1) and ($data[4] == "✔️"))){
if ($oldcatname != $data[1]){
echo "<td><tr></tr><tr></tr><tr></tr></td>"; // skip a row if new category
@ -46,6 +51,7 @@ if (!preg_match("~^(?:f|ht)tps?://~i", $data[3])) {
//echo $data[3] . '"> '; // display the link
echo $urllink . '"> '; // display the link
echo $data[2] . " </a></td><td>"; // display the link title and close the a href and first cell, open the second cell
///echo $data[4] . " </td><td>"; // OPTIONAL: display the sensitive column
echo $data[7] . " </td><td>"; // display the status and close the second cell, open the third cell
echo $data[6] . " </td> \n"; // display the score and close the third cell
}
@ -54,6 +60,7 @@ if (!preg_match("~^(?:f|ht)tps?://~i", $data[3])) {
}
}
}
}
echo "</tr>"; // end html table row
}
echo "\n</table></center>";
@ -211,7 +218,6 @@ echo "<center><table>\n\n";
<!--<p><a href="index.php">Darknet Onion Webring</a> - <a href="nonkycservices.php">Non-KYC Services</a> - <a href="sensitive.php">Sensitive Darknet Websites</a> - <a href="moneronodes.php">Monero Nodes</a> - <a href="nowhere.php">Nowhere Infrastructure</a> </p>-->
</br>