PHP Code:
OpenTable("Users active in the past 24 hours");
$sql = "SELECT * FROM ".$db_prefix."_users WHERE `active` = 1 AND UNIX_TIMESTAMP(lastlogin) > UNIX_TIMESTAMP(NOW()) - 486400;";
$res = $db->sql_query($sql);
$tot = $db->sql_numrows($res);
while ($row = $db->sql_fetchrow($res)) {
if($row["donator"] == 'true')$donator = true;
else
$donator = false;
$img = '';
if ($row["level"] == "premium") $img .= pic("icon_premium.gif",'','premium');
elseif ($row["level"] == "moderator") $img .= pic("icon_moderator.gif",'','moderator');
elseif ($row["level"] == "admin") $img .= pic("icon_admin.gif",'','admin');
if($donator) $img .= '<img src="images/donator.gif" height="16" width="16" title="donator" alt="donator" />';
if($row["warned"] == "1") $img .= '<img src="images/warning.gif" title="warned" alt="warned" />';
$name = (!$row['username'] == 'NULL' ? $row['name'] : $row['username']);
echo"<a href=\"user.php?op=profile&id=".$row["id"]."\" title=\"".get_formatted_timediff(sql_timestamp_to_unix_timestamp($row["lastlogin"]))._btago."\"><font color=\"".getusercolor($row["can_do"])."\">{$name}</font></a>{$img}";
if($tot > 1)echo ",";
echo " ";
}
$db->sql_freeresult($res);
CloseTable();
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in
BT.Manager™ forum
My Current Demo is here
http://demo.btmanager.org/