darknet-lantern/www/footer.php

87 lines
2.8 KiB
PHP

<?php
function DisplayParticipants($csvfile) {
$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) {
// PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
for ($i = 0; $i < count($data); $i++) {
$data[$i] = htmlspecialchars($data[$i]);
$data[$i] = preg_replace("/[^a-zA-Z0-9:\/.\ -✔️❌]/", "", $data[$i]);
}
$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 "<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)) ) {
// dont display your own instance
if ( strtolower($data[1]) != strtolower($_SERVER['SERVER_NAME']) ){
$resultcount++;
for ($c=0; $c < $num; $c++) { // iterate over each row
if ($c == "1"){
if (!preg_match("~^(?:f|ht)tps?://~i", $data[1])) {
$webringp = "http://" . $data[1];
}else{
$webringp = $data[1];
}
echo '<a href="' . $webringp . '/index.php?query=.&sensitive=1"><img src="participants/' . str_replace('http://', '', $data[1]) . '/banner.png"></a>'; // display the category as its the first row with this new category
$url = '';
}
}
}
}
}
}
echo "\n</p>";
fclose($handle);
}
//echo "<p>" . $resultcount . " Result(s) found.</p>";
}
echo '<center><a href="http://' . $instance . '"><img src="' . $participantpath . 'banner.png"></a>';
?>
</br>
<h3>Other Webring Participants:</h3>
<p></center>
<?php
$webringcsvpath = $participantpath . "webring-participants.csv";
//echo $webringcsvpath;
DisplayParticipants($webringcsvpath);
?>
</p>
</br></br>
<p style="width: 80%;"><b><a href="legal.txt">LEGAL DISCLAIMER</a></b></p>
</br><p><a href="http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/opsec/clearnetvsdarknet/index.html">Why the Darknet is superior to the clearnet</a></p>
<p><a href="http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/opsec/darknetexploration/index.html">Why are Darknet Lanterns important ?</a></p>
<p> <a href="http://blog.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/opsec/darknetlantern/index.html">How to setup your own Lantern instance</a> </p>
<p> <a href="http://nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/simplex.html">SimpleX Chatrooms</a> </p>
</br><p><i> Darknet Lantern - version 1.1.0 </i></p>
</center>
</body>
</html>