View Single Post
  #1  
Old 26th February 2013, 17:25
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default 100 newest users
this script shows the 100 newest users

Add this code where you want to show:

PHP Code:
///////////for TBDEV.NET , posted by TripleH a.k.a Sharky
begin_frame("Latest 100 Users");

echo 
'<table width="500" border="1" align="center" cellpadding="2" cellspacing="1">';
echo 
"<tr><td class=colhead align=left>User</td><td class=colhead>Ratio</td><td class=colhead>IP</td><td class=colhead>Date Joined</td><td class=colhead>Last Access</td><td class=colhead>Download</td><td class=colhead>Upload</td></tr>";

$result mysql_query ("SELECT * FROM users WHERE enabled = 'yes' AND status = 'confirmed' ORDER BY added DESC limit 100");
if (
$row mysql_fetch_array($result)) {
do {
if (
$row["uploaded"] == "0") { $ratio "inf"; }
elseif (
$row["downloaded"] == "0") { $ratio "inf"; }
else {
$ratio number_format($row["uploaded"] / $row["downloaded"], 3);

$ratio "<font color=" get_ratio_color($ratio) . ">$ratio</font>";
}
echo 
"<tr><td><a href=userdetails.php?id=".$row["id"]."><b>".$row["username"]."</b></a></td><td><strong>".$ratio."</strong></td><td>".$row["ip"]."</td><td>".$row["added"]."</td><td>".$row["last_access"]."</td><td>".mksize($row["downloaded"])."</td><td>".mksize($row["uploaded"])."</td></tr>";


} while(
$row mysql_fetch_array($result));
} else {print 
"<tr><td>Sorry, no records were found!</td></tr>";}
echo 
"</table>";
end_frame(); 
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
The Following 2 Users Say Thank You to Chez For This Useful Post:
Daz (7th March 2013), Velo (10th November 2016)