crztz |
23rd August 2009 13:01 |
Top Uploaders
hy everyone, I'm having a small problem, i just can't make a top uploaders page...
uploader - nr of torrents uploaded , just name and nr of torrents uploaded...
If anyone could gimme a hand i'd really apreciate it
i'm using netvision source -tbdev based
to be honest i needed this to make a universal top upload script.. for torrents as well for subtitles...
in this moment i';m working at the top 5 subtitle uploaders....script for subtitles made by putyn @tbdev
this is what i have done so far ( for subtitles )
PHP Code:
<? include("include/bittorrent.php"); dbconn(); function top_subs() {
?> <tr> <td class=colhead>Rank</td> <td class=colhead align=left>User</td> <td class=colhead align=center>Subtitles</td> <td class=colhead align=left>Joined</td>
</tr> <?
$res = mysql_query("SELECT s.name,s.lang, s.imdb,s.fps,s.poster,s.cds,s.hits,s.added,s.owner,s.comment, u.username FROM subtitles AS s LEFT JOIN users AS u ON s.owner=u.id ORDER BY s.owner DESC 5");
while ($arr = mysql_fetch_assoc($res)) {
$num = 0;
//$arr3 = mysql_fetch_row($res); $subs = $arr3[0]; ++$num; if($CURUSER["id"] == $arr["owner"]) $highlight = " class=browse2"; else $highlight = " class=browse1"; print("<tr$highlight><td align=center>$num</td><td><a href=userdetails.php?id=" . $arr["owner"] . "><b>" . $arr["username"] . "</b></a></td>"); print("<td align=right>" . $subs . "</td><td>" . gmdate("Y-m-d",strtotime($arr["added"])) . " (" . get_elapsed_time(sql_timestamp_to_unix_timestamp($arr["added"])) . " ago)</td></tr>"); }
end_table(); end_frame(); }
top_subs(); ?>
|