mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-07-01 16:56:41 +00:00
issue #49: link with status 0.0 now removes the whole line and add fixes with issues for php8.4
This commit is contained in:
parent
13d39dc5c2
commit
46bd00a05a
3 changed files with 17 additions and 11 deletions
|
@ -8,7 +8,7 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|||
|
||||
|
||||
$oldcatname="";
|
||||
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
|
||||
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
|
||||
//PREVENT ALL MALICIOUS PHP PAYLOADS FROM BEING EXECUTED FROM CSV FILES!
|
||||
|
||||
$data[0] = htmlspecialchars($data[0]);
|
||||
|
@ -40,6 +40,9 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|||
if (str_contains(strtolower($data[5]), strtolower($query)) or 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 ($data[7] == 0.0){
|
||||
continue;
|
||||
}else{
|
||||
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
|
||||
|
@ -76,7 +79,8 @@ if (!preg_match("~^(?:f|ht)tps?://~i", $data[3])) {
|
|||
echo $urllink . '"> '; // display the link
|
||||
echo $data[2] . ' </a></p></td><td class="description">'; // display the link title and close the a href and first cell, open the second cell
|
||||
echo $data[5] . " </td><td>"; // OPTIONAL: display the description column
|
||||
echo $data[7] . " </td><td>"; // display the score and close the second cell, open the third cell
|
||||
echo $data[7] . " </td><td>"; // display the score and close the second cell, open the third cell
|
||||
|
||||
if($data[6] == "YES"){
|
||||
echo "✔️" ;
|
||||
}else{
|
||||
|
@ -91,7 +95,7 @@ if (!preg_match("~^(?:f|ht)tps?://~i", $data[3])) {
|
|||
}
|
||||
}
|
||||
echo "</tr>"; // end html table row
|
||||
}
|
||||
}}
|
||||
echo "\n</table></center>";
|
||||
fclose($handle);
|
||||
}
|
||||
|
@ -130,7 +134,7 @@ if (($handle = fopen($csvfile, "r")) !== FALSE) {
|
|||
|
||||
|
||||
$oldcatname="";
|
||||
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
|
||||
while (($data = fgetcsv($handle, 1000, ",",'"','\\')) !== FALSE) {
|
||||
$num = count($data);
|
||||
$row++;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue