Taken from showcase mod on TTorg credit to original Author

[color=rgb(251, 160, 38)]Place on Index.php[/color]
//===| Start freeleech Torrents |===//

begin_frame(T_("Top FreeLeech"));

$rec = SQL_Query_exec("SELECT id, name, added, image1, seeders, leechers, times_completed FROM torrents WHERE banned ='no' AND visible='yes' AND freeleech='1' ORDER BY torrents.seeders DESC LIMIT 7");

if (mysqli_num_rows($rec) > 0) {

print("<table align=center cellpadding=3 cellspacing=3 width=100% border=0><tr>");

while ($row2 = mysqli_fetch_array($rec)) {

$tor = $row2['0'];

$altname = $row2['1'];

$where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";

$res = SQL_Query_exec("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, torrents.added, torrents.seeders, torrents.leechers, torrents.times_completed, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where");

$row = mysqli_fetch_array($res);

$cat = $row['cat_name'];

$img1 = "<a href=torrents-details.php?id=$row[id]' target='_new'><div><img id='cover_img1' class='cover_img' border='0' src='uploads/images/$row[image1]' title=\"$altname | $cat\" width='90px' height='130px'></a></div>

<div style='margin-top:10px; font-size:13px;'>

<img src=images/check.png height='14' title='Completed' border=0><font color=#0080FF> <b>".$row['times_completed']."</b></font> |

<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |

<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>

</div>";

if ($row["image1"] != ""){

print("<td align=center>".$img1."</td>");

}else{

   $img1 = "<a href=torrents-details.php?id=$row[id]'><img id='cover_img1' class='cover_img' border='0' src=images/no-poster.jpg title=\"$altname | $cat\" width='90px' height='130px'></a>

<div style='margin-top:10px; font-size:13px;'>

<img src=images/check.png height='14' title='Completed' border=0><font color=#0080FF> <b>".$row['times_completed']."</b></font> |

<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |

<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>

</div>";

print("<td align=center>".$img1."</td>");

}

}

print("</tr></table>");
}
   end_frame();



//===| End freeleech Torrents |===//

//===| Start Top downloaded Torrents |===//

   begin_frame(T_("Top Downloaded"));

$rec = SQL_Query_exec("SELECT id, name, added, image1, seeders, leechers, times_completed FROM torrents WHERE banned ='no' AND visible='yes' ORDER BY RAND() LIMIT 7");

if (mysqli_num_rows($rec) > 0) {

print("<table align=center cellpadding=3 cellspacing=3 width=100% border=0><tr>");

while ($row2 = mysqli_fetch_array($rec)) {

$tor = $row2['0'];

$altname = $row2['1'];

$where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";

$res = SQL_Query_exec("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, torrents.added, torrents.seeders, torrents.leechers, torrents.times_completed, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where");

$row = mysqli_fetch_array($res);

$res1 = mysqli_query("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, torrents.owner, torrents.seeders, torrents.leechers, categories.name AS cat_name, users.username AS user FROM torrents LEFT JOIN users ON torrents.owner = users.id LEFT JOIN categories ON torrents.category = categories.id $where $orderby $limit");      
$row2 = mysqli_fetch_array($res1);

$cat = $row['cat_name'];

$img1 = "<a href=torrents-details.php?id=$row[id]' target='_new'><div><img id='cover_img1' class='cover_img' border='0' src='uploads/images/$row[image1]' title=\"$altname | $cat\" width='90px' height='130px'></a></div>

<div style='margin-top:10px; font-size:13px;'>

<img src=images/check.png height='14' title='Completed' border=0><font color=#0080FF> <b>".$row['times_completed']."</b></font> |

<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |

<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>

</div>";

if ($row["image1"] != ""){

print("<td align=center>".$img1."</td>");

}else{

   $img1 = "<a href=torrents-details.php?id=$row[id]'><img id='cover_img1' class='cover_img' border='0' src=images/no-poster.jpg title=\"$altname | $cat\" width='90px' height='130px'></a>

<div style='margin-top:10px; font-size:13px;'>

<img src=images/check.png height='14' title='Completed' border=0><font color=#0080FF> <b>".$row['times_completed']."</b></font> |

<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |

<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>

</div>";

print("<td align=center>".$img1."</td>");

}

}

print("</tr></table>");
}
   end_frame();



//===| End top downloaded Torrents |===//


[color=rgb(251, 160, 38)]Add no-poster.jpg to images[/color]

no-poster.png
no-poster.png