Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Community Cafe
Reply
Thread Tools
  #1  
Old 4th July 2011, 16:08
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Smile Personal stats
Personal stats joes site code for evo_blue
Reply With Quote
  #2  
Old 4th July 2011, 16:12
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
PHP Code:
if ($user->user)
{

OpenTable("Personal stats");
        
$sql "SELECT seedbonus, avatar, uploaded,  downloaded, invites, uploaded/downloaded AS ratio FROM ".$db_prefix."_users WHERE id = '".$user->id."';";
        
$res $db->sql_query($sql);
        list (
$seedbonus$avatar$uploaded$downloaded$invites$ratio) = $db->sql_fetchrow($res);
        
$db->sql_freeresult($res);
        echo 
"<p>".pic("pic_uploaded.gif").mksize($uploaded)."<br>";
        echo 
pic("pic_downloaded.gif").mksize($downloaded)."<br>";
        echo 
pic("pic_ratio.gif");
        echo 
"&nbsp;";
        if (
$downloaded == 0)
                echo 
"&infin;";
        elseif (
$ratio 0.1)
                echo 
"<font color=\"#ff0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.2)
                echo 
"<font color=\"#ee0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.3)
                echo 
"<font color=\"#dd0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.4)
                echo 
"<font color=\"#cc0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.5)
                echo 
"<font color=\"#bb0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.6)
                echo 
"<font color=\"#aa0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.7)
                echo 
"<font color=\"#990000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.8)
                echo 
"<font color=\"#880000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.9)
                echo 
"<font color=\"#770000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 1)
                echo 
"<font color=\"#660000\">" number_format($ratio2) . "</font>";
        else
                echo 
"<font color=\"#00FF00\">".  number_format($ratio2) . "</font>";
        echo 
"<br>\n";
        
#Numer of seeding Torrents
        
$sql "SELECT P.torrent AS id, T.name as name FROM ".$db_prefix."_peers P, ".$db_prefix."_torrents T WHERE P.uid = '".$user->id."' AND P.seeder = 'yes' AND T.id = P.torrent;";
        
$res $db->sql_query($sql);
        
$cnt $db->sql_numrows($res);
        
$torrents = Array();
        while (
$tor $db->sql_fetchrow($res)) {
                
$torrents[] = htmlspecialchars((strlen($tor["name"]) > 33) ? substr($tor["name"],0,30)."..." $tor["name"]);
        }
        if (
$cnt 0help(pic("upload.gif"),"<p>".implode($torrents,"<br>")."</p>",_btyoureseeding);
        else echo 
pic("upload.gif",null,_btyoureseeding);
        echo 
$cnt;
        
$db->sql_freeresult($sql);
        unset(
$sql$res$torrents$tor$cnt);
        
#Number of downloading Torrents
        
echo "<br>\n";
        
$sql "SELECT P.torrent AS id, T.name as name FROM ".$db_prefix."_peers P, ".$db_prefix."_torrents T WHERE P.uid = '".$user->id."' AND P.seeder = 'no' AND T.id = P.torrent;";
        
$res $db->sql_query($sql);
        
$cnt $db->sql_numrows($res);
        
$torrents = Array();
        while (
$tor $db->sql_fetchrow($res)) {
                
$torrents[] = htmlspecialchars((strlen($tor["name"]) > 33) ? substr($tor["name"],0,30)."..." $tor["name"]);
        }
        if (
$cnt 0help(pic("download.gif"),"<p>".implode($torrents,"<br>")."</p>",_btyoureleeching);
        else echo 
pic("download.gif",null,_btyoureleeching);
        echo 
$cnt;
        
$db->sql_freeresult($sql);
        unset(
$sql$res$torrents$tor$cnt);
        if(
$avatar=="blank.gif")$thavatar "themes/eVo_blue/pics/noavatar.gif";
        else 
        
$thavatar "avatars/".$avatar;
        echo 
"</p>";
        echo 
"<br>\n";
        echo 
"<br>\n";
        echo 
"<p align=\"center\"><b>"._btwelcomebk."</b></p>\n";
        echo 
"<p align=\"center\"><b>".$user->name."</b></p>\n";        
        echo 
"<b>".$thavatar."</b><br>";
        echo 
"<br>\n";
        print(
"<p>Seeding Bonus: <a href='mybonus.php'>".$seedbonus."</a></p>");

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
  #3  
Old 4th July 2011, 16:20
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Smile
thax n1 working like a dream
Reply With Quote
  #4  
Old 4th July 2011, 16:46
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
sorry was a error in that try this one
PHP Code:
if ($user->user)
{

OpenTable("Personal stats");
        
$sql "SELECT seedbonus, avatar, uploaded,  downloaded, invites, uploaded/downloaded AS ratio FROM ".$db_prefix."_users WHERE id = '".$user->id."';";
        
$res $db->sql_query($sql);
        list (
$seedbonus$avatar$uploaded$downloaded$invites$ratio) = $db->sql_fetchrow($res);
        
$db->sql_freeresult($res);
        echo 
"<p>".pic("pic_uploaded.gif").mksize($uploaded)."<br>";
        echo 
pic("pic_downloaded.gif").mksize($downloaded)."<br>";
        echo 
pic("pic_ratio.gif");
        echo 
"&nbsp;";
        if (
$downloaded == 0)
                echo 
"&infin;";
        elseif (
$ratio 0.1)
                echo 
"<font color=\"#ff0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.2)
                echo 
"<font color=\"#ee0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.3)
                echo 
"<font color=\"#dd0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.4)
                echo 
"<font color=\"#cc0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.5)
                echo 
"<font color=\"#bb0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.6)
                echo 
"<font color=\"#aa0000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.7)
                echo 
"<font color=\"#990000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.8)
                echo 
"<font color=\"#880000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 0.9)
                echo 
"<font color=\"#770000\">" number_format($ratio2) . "</font>";
        elseif (
$ratio 1)
                echo 
"<font color=\"#660000\">" number_format($ratio2) . "</font>";
        else
                echo 
"<font color=\"#00FF00\">".  number_format($ratio2) . "</font>";
        echo 
"<br>\n";
        
#Numer of seeding Torrents
        
$sql "SELECT P.torrent AS id, T.name as name FROM ".$db_prefix."_peers P, ".$db_prefix."_torrents T WHERE P.uid = '".$user->id."' AND P.seeder = 'yes' AND T.id = P.torrent;";
        
$res $db->sql_query($sql);
        
$cnt $db->sql_numrows($res);
        
$torrents = Array();
        while (
$tor $db->sql_fetchrow($res)) {
                
$torrents[] = htmlspecialchars((strlen($tor["name"]) > 33) ? substr($tor["name"],0,30)."..." $tor["name"]);
        }
        if (
$cnt 0help(pic("upload.gif"),"<p>".implode($torrents,"<br>")."</p>",_btyoureseeding);
        else echo 
pic("upload.gif",null,_btyoureseeding);
        echo 
$cnt;
        
$db->sql_freeresult($sql);
        unset(
$sql$res$torrents$tor$cnt);
        
#Number of downloading Torrents
        
echo "<br>\n";
        
$sql "SELECT P.torrent AS id, T.name as name FROM ".$db_prefix."_peers P, ".$db_prefix."_torrents T WHERE P.uid = '".$user->id."' AND P.seeder = 'no' AND T.id = P.torrent;";
        
$res $db->sql_query($sql);
        
$cnt $db->sql_numrows($res);
        
$torrents = Array();
        while (
$tor $db->sql_fetchrow($res)) {
                
$torrents[] = htmlspecialchars((strlen($tor["name"]) > 33) ? substr($tor["name"],0,30)."..." $tor["name"]);
        }
        if (
$cnt 0help(pic("download.gif"),"<p>".implode($torrents,"<br>")."</p>",_btyoureleeching);
        else echo 
pic("download.gif",null,_btyoureleeching);
        echo 
$cnt;
        
$db->sql_freeresult($sql);
        unset(
$sql$res$torrents$tor$cnt);
        if(
$avatar=="blank.gif")$thavatar "<img src=\"themes/".$theme."/pics/noavatar.gif\" alt=\"".$user->name."\" border=\"0\">";
        else 
        
$thavatar "<img src=\"avatars/".$avatar."\" alt=\"".$user->name."\" border=\"0\">";
        echo 
"</p>";
        echo 
"<br>\n";
        echo 
"<br>\n";
        echo 
"<p align=\"center\"><b>"._btwelcomebk."</b></p>\n";
        echo 
"<p align=\"center\"><b>".$user->name."</b></p>\n";        
        echo 
"<b>".$thavatar."</b><br>";
        echo 
"<br>\n";
        print(
"<p>Seeding Bonus: <a href='mybonus.php'>".$seedbonus."</a></p>");

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
  #5  
Old 4th July 2011, 16:48
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Smile
Quote:
Originally Posted by joeroberts View Post
sorry was a error in that try this one
working a treat joe thank you
Reply With Quote
Reply

Tags
personal , stats


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 01:29. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.