echo "<div class=\"row\" onclick=\"cdir('{$nfid}')\">"; echo str_repeat(' ', $level); echo "<img src=\"images/ext/folder.png\" class=\"icon\"> {$folder}</div>"; printFiles($file, $level + 1, $nfid); } else { $ext = explode('.', $file[0]); $ext = $ext[count($ext) - 1]; echo "<div class=\"row\">"; echo str_repeat(' ', $level); echo "<img src=\"images/ext/file_extension_{$ext}.png\" class=\"icon\"> {$file[0]} - {$file[1]}</div>"; } echo "</div>"; } } echo "<table class=\"rtable\">"; echo "<tr><td class=\"top_row\" width=\"800px\">Torrent contents ~ " . bytesToStr($total_size) . "</td></tr>"; echo "<tr><td>"; printFiles($paths, 0, '', ''); echo "</td></tr></table>"; } ?> </div> <?php include "includes/footer.php"; ?> </div> </body> </html>
echo "</table><br/>"; $categories = array(0 => 'Movies', 1 => 'TV', 3 => 'Games', 2 => 'Software', 4 => 'Music', 6 => 'Anime', 7 => 'Books', 5 => 'P**n'); foreach ($categories as $key => $val) { echo "<table class=\"rtable\">"; echo "<tr class=\"top_row\"><td colspan=\"4\">{$val}</td></tr>"; $query = $sdb->query("SELECT *, (seeds+0.2*peers) AS score FROM rtindex0,rtindex1,rtindex2,rtindex3 WHERE category = {$key} ORDER BY score DESC LIMIT 7"); while ($data = $query->fetch_assoc()) { $iquery = $db->query("SELECT title FROM rtindex WHERE id = '{$data['id']}';"); $idata = $iquery->fetch_assoc(); $data['title'] = $idata['title']; if ($data['category'] != 8) { $rtype = "<img src=\"images/" . Rivr::getTypeInt($data['category']) . ".png\" class=\"icon\"/>"; } else { $rtype = ''; } echo "<tr class=\"row\"><td style=\"width:700px;\">{$rtype}<a href=\"{$data['hash']}\">{$data['title']}</a></td><td width=\"70px\" class=\"seeds\">{$data['seeds']}</td><td width=\"70px\" class=\"leech\">{$data['peers']}</td><td width=\"90px\">" . bytesToStr($data['size'] * 1024) . "</td></tr>"; } echo "</table><br/>"; } ?> </div> <?php include "includes/footer.php"; ?> </div> </body> </html>