mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 12:16:57 +00:00
215 lines
6.7 KiB
PHP
215 lines
6.7 KiB
PHP
<?php
|
|
function DisplayCSVNEW($csvfile, $query) {
|
|
$resultcount=0;
|
|
$row = 1;
|
|
echo "<center><table>\n\n"; //begin html table formatting
|
|
if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|
|
|
|
|
$oldcatname="";
|
|
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
|
|
$num = count($data);
|
|
//echo "<p>" . $data[1] . "</p>";
|
|
//echo "<p> $num fields in line $row: <br /></p>\n";
|
|
$row++;
|
|
//echo $row;
|
|
|
|
if ( $row == "2") {
|
|
echo "<tr><td>Category</td> <td>Name</td> <td>Score</td> <td></td></tr>";
|
|
}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++;
|
|
for ($c=0; $c < $num; $c++) { // iterate over each row
|
|
echo "<tr>"; // begin html table row for that Category
|
|
// 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]){
|
|
echo "<td><tr></tr><tr></tr><tr></tr></td>"; // skip a row if new category
|
|
echo "<td><tr></tr><tr></tr><tr></tr></td>"; // skip a row if new category
|
|
echo "<td><p><h4>" . $data[1] . ' </h4></p></td>'; // display the category as its the first row with this new category
|
|
$oldcatname=$data[1];
|
|
}else{
|
|
echo "<td><p>" . ' </p></td>'; // category is already displayed so skip it (empty cell in category column)
|
|
}
|
|
|
|
echo "<td>" ; // begin the table cell
|
|
echo '<a href="'; // begin a href
|
|
echo $data[3] . '"> '; // 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[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
|
|
}
|
|
//if ($c == 2){
|
|
//}
|
|
}
|
|
}
|
|
}
|
|
echo "</tr>"; // end html table row
|
|
}
|
|
echo "\n</table></center>";
|
|
fclose($handle);
|
|
}
|
|
echo "<p>" . $resultcount . " Result(s) found.</p>";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function DisplayCategories($instancename, $path) {
|
|
$resultcount=0;
|
|
$row = 1;
|
|
//echo $instancename;
|
|
//$csvfilenames = "verified.csv unverified.csv";
|
|
$csvfilenames = "verified.csv";
|
|
$csvfilenames = explode(' ', $csvfilenames);
|
|
|
|
foreach ($csvfilenames as $csvfilename){
|
|
//echo $csvfilename;
|
|
$csvfile = $path . $csvfilename;
|
|
//echo $csvfile;
|
|
//echo "test";
|
|
echo "<center><table>\n\n"; //begin html table formatting
|
|
if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|
|
|
|
|
$oldcatname="";
|
|
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
|
|
$num = count($data);
|
|
$row++;
|
|
|
|
if ( $row == "2") {
|
|
echo "<p> | ";
|
|
}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++;
|
|
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]){
|
|
echo '<a href="index.php?query=' . $data[1] . '">' . $data[1] . '</a> | '; // display the category as its the first row with this new category
|
|
$oldcatname=$data[1];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
echo "</p>";
|
|
fclose($handle);
|
|
}
|
|
//echo "<p>" . $resultcount . " Result(s) found.</p>";
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function DisplayCSV($csvfile) {
|
|
$row = 1;
|
|
echo "<center><table>\n\n"; //begin html table formatting
|
|
if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|
|
|
|
|
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
|
|
$num = count($data);
|
|
//echo "<p>" . $data[1] . "</p>";
|
|
//echo "<p> $num fields in line $row: <br /></p>\n";
|
|
$row++;
|
|
//echo $row;
|
|
|
|
|
|
if ( $row == "2") {
|
|
echo "<tr><td>Name</td> <td>Score</td> <td></td></tr>";
|
|
}else{
|
|
for ($c=0; $c < $num; $c++) {
|
|
echo "<tr>"; // beging html table 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" ){
|
|
echo "<td>" . '<a href="'; // begin the table cell and a href
|
|
echo $data[$c] . '">'; // display the link
|
|
echo $data[0] . "</a></td><td>"; // display the link title and close the a href and first cell, open the second cell
|
|
echo $data[3] . "</td><td>"; // display the status and close the second cell, open the third cell
|
|
echo $data[2] . "</td> \n"; // display the score and close the third cell
|
|
}
|
|
//if ($c == 2){
|
|
//}
|
|
}
|
|
}
|
|
echo "</tr>"; // end html table row
|
|
}
|
|
echo "\n</table></center>";
|
|
fclose($handle);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
function DisplayCSVold($csvfile) {
|
|
echo "<center><table>\n\n";
|
|
|
|
// Open a file
|
|
$file = fopen($csvfile, "r");
|
|
|
|
// Fetching data from csv file row by row
|
|
while (($data = fgetcsv($file)) !== false) {
|
|
|
|
// HTML tag for placing in row format
|
|
echo "<tr>";
|
|
foreach ($data as $i) {
|
|
echo "<td>" . htmlspecialchars($i)
|
|
. "</td>";
|
|
}
|
|
echo "</tr> \n";
|
|
}
|
|
|
|
// Closing the file
|
|
fclose($file);
|
|
|
|
echo "\n</table></center>";
|
|
}
|
|
?>
|
|
<?php
|
|
|
|
$min_length = 1;
|
|
$max_length = 32;
|
|
$instance= $_SERVER['SERVER_NAME'];
|
|
$participantpath="participants/" . $instance . '/';
|
|
$verifiedcsvpath="participants/" . $instance . '/verified.csv';
|
|
$unverifiedcsvpath="participants/" . $instance . '/unverified.csv';
|
|
DisplayCategories($instance, $participantpath);
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!--<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>
|
|
|
|
<h1><a href="http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-onion-webring"><img src="img/lantern project banner.png"></a></h1>
|
|
<!--<h1><a href="http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-onion-webring"><img src="img/logo-large.png"></a></h1>-->
|
|
<p><u>Update Frequency:</u> every 3 hours</p> </br>
|
|
|
|
|
|
<!--<img src="img/logo-large.png">-->
|