Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=109)
-   -   req top 10 (http://www.bvlist.com/showthread.php?t=8565)

rabtb 3rd December 2012 14:22

req top 10
 
im after top 10 mod like on bills source here
http://www.bvlist.com/other-downloads/8536-tbdev08.html

i got topten so think it just code for index.php to show top10 and latest like that on there

TheLastKinQ 31st May 2015 01:13

Add to index.php


Code:

//== Top ten torrents
      print("");
print("
      ");
      print("
");
     
$res = mysql_query("SELECT t.id, t.name, t.added,  t.category, t.seeders, t.times_completed, t.leechers, categories.name AS cat_name, categories.image AS cat_pic "."FROM torrents AS t "."LEFT JOIN categories ON categories.id = t.category "."WHERE t.visible='yes' "."ORDER BY t.times_completed DESC LIMIT 5 ") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0) {
      Print("\n");
      Print("



\n");
      while ($arr = mysql_fetch_assoc($res)) {
      $torrname = htmlspecialchars($arr['name']);
      if (strlen($torrname) > 150)
      $torrname = substr($torrname, 0,150) . "...";


$catname = htmlspecialchars($arr['cat_name']);
$catpic = htmlspecialchars($arr['cat_pic']);


      Print("

\n");
      }
      Print("
TypeName [Top 10 torrents] Added Snatched Seeders Leechers
\"{$row['cat_name']}\" ".$torrname." ".$arr["added"]."".$arr['times_completed']."".$arr['seeders']."".number_format($arr['leechers'])."
\n");
      } else
      Print("no torrents here :(");
      Print("
");
      //== End topten torrents



All times are GMT +2. The time now is 00:50.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.