Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent)
Reply
Thread Tools
  #1  
Old 28th January 2012, 14:29
romano1's Avatar
romano1 romano1 is offline
Senior Member
 
Join Date: Jan 2012
Portugal
Posts: 107
Default Visited users in the index?
Joe what code should i use and where, to show the block of what users visited the tracker? i see that in some of the pmbt trackers..
Reply With Quote
  #2  
Old 28th January 2012, 15:23
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
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&amp;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/
Reply With Quote
The Following User Says Thank You to joeroberts For This Useful Post:
romano1 (28th January 2012)
  #3  
Old 28th January 2012, 18:17
romano1's Avatar
romano1 romano1 is offline
Senior Member
 
Join Date: Jan 2012
Portugal
Posts: 107
Default
i put this on main.php or index.html?

Thank you Joe, you are great.

i guess its in index.php. sorry
Reply With Quote
  #4  
Old 28th January 2012, 19:51
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
:shock:
where ever you want it to show Most likely on the index so then index.php
__________________
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/
Reply With Quote
Reply

Tags
index , users , visited


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 17:40. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.