- -
req top 10
(
http://www.bvlist.com/showthread.php?t=8565)
rabtb |
3rd December 2012 14:22 |
req top 10
|
TheLastKinQ |
31st May 2015 01:13 |
Add to index.php
Code:
//== Top ten torrents
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("Type | Name [Top 10 torrents] |
Added |
Snatched |
Seeders |
Leechers | \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(" |
".$torrname." |
".$arr["added"]." | ".$arr['times_completed']." | ".$arr['seeders']." | ".number_format($arr['leechers'])." | \n");
}
Print(" \n");
} else
Print("no torrents here :(");
Print(" | ");
print("
");
//== End topten torrents
|
All times are GMT +2. The time now is 17:38. |
|
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.