mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 12:16:57 +00:00
added optional sensitive search
This commit is contained in:
parent
bdde1d4f44
commit
99e101f9cf
2 changed files with 20 additions and 9 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -14,19 +14,24 @@
|
|||
|
||||
<?php
|
||||
require("header.php");
|
||||
$sensitive=0;
|
||||
?>
|
||||
|
||||
<form action="index.php" method="GET">
|
||||
<input type="text" name="query" />
|
||||
<input type="submit" value="Search" />
|
||||
<input type="checkbox" name="sensitive" value="1"></br>
|
||||
<input type="submit" value="Search" /> </br>
|
||||
<p>Sensitive Search: <input type="checkbox" name="sensitive" value="1"></p></br>
|
||||
</form>
|
||||
|
||||
|
||||
<?php
|
||||
$sensitive = $_GET['sensitive']
|
||||
echo "sensitive= " . $sensitive;
|
||||
$sensitive = $_GET['sensitive'];
|
||||
if ($sensitive == 1){
|
||||
//echo "<p>Sensitive ON " . $sensitive . "</p>";
|
||||
$sensitive=1;
|
||||
}else{
|
||||
$sensitive=0;
|
||||
//echo "<p>Sensitive OFF " . $sensitive . "</p>";
|
||||
}
|
||||
$query = $_GET['query'];
|
||||
// gets value sent over search form
|
||||
|
||||
|
@ -51,10 +56,10 @@ $sensitive=0;
|
|||
//echo $unverifiedcsvpath;
|
||||
echo "<h3><u>Verified Links:</u></h3>";
|
||||
echo nl2br("\n");
|
||||
DisplayCSVNEW($verifiedcsvpath,$query);
|
||||
DisplayCSVNEW($verifiedcsvpath,$query,$sensitive);
|
||||
echo "</br></br></br><h3><u>Unverified Links:</u></h3>";
|
||||
echo nl2br("\n");
|
||||
DisplayCSVNEW($unverifiedcsvpath,$query);
|
||||
DisplayCSVNEW($unverifiedcsvpath,$query,$sensitive);
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue