Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
Thread Tools
  #1  
Old 26th February 2013, 17:21
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default Top10 Torrents
Credits to qwertyuiop

Put it in the index.php , where you want to see it

PHP Code:
  <?
    begin_main_frame
();
    
begin_frame("<h2 align=center><font color=black>Top 10 torrents</font></h2>");

    
$res mysql_query("SELECT id,seeders, leechers, name from torrents ORDER BY seeders + leechers DESC LIMIT 10") or sqlerr(__FILE____LINE__);
    if (
mysql_num_rows($res) > 0) {
    print(
"<center><table class=tableinborder border=2 cellspacing=0 cellpadding=5>\n");
    print(
"<tr><td class=\"tabletitle\"><h4>Name</h></td><td class=\"tabletitle\"><h4>Seeders</h></a></td><td class=\"tabletitle\"><h4>Lechers</h></td></tr>\n");
    while (
$arr mysql_fetch_assoc($res)) {
    
$torrname htmlspecialchars($arr['name']);
    if (
strlen($torrname) > 55)
    
$torrname substr($torrname055) . "...";
    
$ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($arr["added"])) / 3600);

    print(
"<tr><td class=tablea ><a href=\"details.php?id=".$arr['id']."&hit=1\" alt=\"".$arr['name']."\" title=\"".$arr['name']."\">".$torrname."</td><td class=tablea ><font color=\"red\">".$arr['seeders']."</a></td><td class=tablea >".number_format($arr['leechers'])."</td></tr>\n");
    }
    print(
"</table>\n");
    } else
    print(
"no torrents here ");

    
end_frame();
    
end_main_frame();
    
?>
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
Reply

Tags
top10 , torrents


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 11:20. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.