Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent)
Reply
  #1  
Old 28th January 2012, 20:41
romano1's Avatar
romano1 romano1 is offline
Senior Member
 
Join Date: Jan 2012
Portugal
Posts: 107
Default Last 5 uploads in index?
Joe do you have the code to put the last 5 uploads in index?
Reply With Quote
  #2  
Old 28th January 2012, 23:41
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
add below where you want to show in index.php

Code:
OpenTable("last 10 uploads");         $sql = "SELECT ".$db_prefix."_torrents.*, IF(".$db_prefix."_torrents.numratings < '".$minvotes."', NULL, ROUND(".$db_prefix."_torrents.ratingsum / ".$db_prefix."_torrents.numratings, 1)) AS rating, ".$db_prefix."_categories.name AS cat_name, ".$db_prefix."_categories.image AS cat_pic, U.username, IF(U.name IS NULL, U.username, U.name) as user_name, U.level as user_level FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON category = ".$db_prefix."_categories.id LEFT JOIN ".$db_prefix."_users U ON ".$db_prefix."_torrents.owner = U.id WHERE banned = 'no' AND ".$db_prefix."_torrents.password IS NULL ORDER BY ".$db_prefix."_torrents.added DESC LIMIT 10;";         $res = $db->sql_query($sql) or btsqlerror($sql);         if ($db->sql_numrows($res) > 0) {                 torrenttable($res,"usertorrent");         } else {                 OpenTable2();                 echo "<h3>"._btnotorrents."</h3>";                 CloseTable2();         } CloseTable();
change
Code:
DESC LIMIT 10
to how many you want to show

helps to search code main forum to ;)
http://www.phpmybittorrent.com/forum.../399/#msg_2722
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
The Following User Says Thank You to daffy For This Useful Post:
romano1 (29th January 2012)
Reply

Tags
index , uploads

Thread Tools

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 18:16. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.