file tree from my script
i serialized the file array and inserted into same table instead of dumping into another table(same on announce urls too)

i want a file tree output like in kickass / 1337x
i serialized the file array and inserted into same table instead of dumping into another table(same on announce urls too)
$f_liste = unserialize($row['fstruct']);
$tprice = array_column($f_liste, 'length');
$count_len = count($tprice);
$tprice = array_column($f_liste, 'path');
?>
<div class="tree">
<ul>
<li class="parent_li"> <i class="fas fa-folder"></i> <?php print("<b>".$row['dirname']."</b> (<b>".mksize($row['size'])."</b>) (<b>".$count_len." files</b>)"); ?>
<ul style="padding-left:42.5px;">
<?php
array_multisort($tprice, SORT_ASC, SORT_REGULAR,$f_liste);
//print_r($f_liste);
foreach($f_liste as $flist){
$dir = '';
$size = $flist["length"];
$count = count($flist["path"]);
if(isset($flist['path'][1])){
$t_icon = "<i class=\"fas fa-folder-open\"></i>";
}else{
$t_icon = '';
}
$mdir = '';
for ($i=0; $i<$count;$i++) {
/*
if($count > 1){
$mdir = $flist["path"][0];
}
*/
if (($i+1) == $count){
$fname = $dir.$flist["path"][$i];
} else {
$dir .= $flist["path"][$i]." / ";
}
}
print("<li>".$t_icon." <small>".$fname." (".mksize($size).")</small></li>");
}
?>
</ul>
</li>
</ul>

i want a file tree output like in kickass / 1337x
follow the thread for updates
checkout my project: https://bvlist.com/showthread.php?t=12349
checkout my project: https://bvlist.com/showthread.php?t=12349
Last edited by JohnHasher on 2022-01-08 12:45:54
