|
#1
|
||||
|
||||
imperialbt statistics code
i think this is messed up
Code:
echo " <div class=\"maintitle_base\"><div class=\"header_left\"><div class=\"header_right\"> <h3 class=\"maintitle\"> Our Statistics</h3> </div></div></div> <div class=\"border2\"> <div id=\"board_statistics\" class=\"statistics stats_container\"> <div id=\"stats\"> <h2> Statistics</h2> <dl> "; echo "<dt>Torrents</dt><dd>".$tottorrent."</dd>\n"; echo "<dt>We have shared </dt><dd>".mksize($totshare)."</dd>\n"; echo "<dt>Seeders</dt><dd>".$totseeders."</dd>\n"; echo "<dt>Leechers</dt><dd>".$totleechers."</dd>\n"; echo "<dt>Members</dt><dd>".$totuser."</dd>\n"; echo " </dl> </div> <div id=\"active_users\" class=\"stats_list\"> <h2>"; $legend = '<b>'; $sqlev = "SELECT name, color FROM ".$db_prefix."_levels"; $reslev = $db->sql_query($sqlev); while ($rowlev = $db->sql_fetchrow($reslev)) { $legend .='<a href="memberslist.php?mode=group&g='.$rowlev['name'].'" style="color: '.$rowlev['color'].'; font-weight: bold;">'.$rowlev['name'].'</a> '; } $legend .= '</b>'; $db->sql_freeresult($reslev); $sql = "SELECT O.id AS id, O.page AS page, UNIX_TIMESTAMP(O.logged_in) AS logged_in, IF(U.name IS NULL, U.username, U.name) as name, U.donator AS donator, U.warned AS warned, U.can_do as can_do, U.level AS level, U.Show_online AS Show_online, U.uploaded as uploaded, U.downloaded AS downloaded FROM ".$db_prefix."_online_users O LEFT JOIN ".$db_prefix."_users U ON O.id = U.id WHERE UNIX_TIMESTAMP(NOW()-U.lastlogin) < 1800 AND U.Show_online = true;"; $res = $db->sql_query($sql); $tot = $db->sql_numrows($res); $i = 1; $simple = "\n<p>"; $user_now = $db->sql_numrows($res); if ($user_now == 0) $simple .= _btnouseronline; else { while ($row = $db->sql_fetchrow($res)) { //if($row[id] == $user->id)break; if($row["donator"] == 'true')$donator = true; else $donator = false; $simple .= "<a href=\"user.php?op=profile&id=".$row["id"]."\"><font color=\"".getusercolor($row["can_do"])."\">"; $simple .= htmlspecialchars($row["name"])."</font></a>"; if ($row["level"] == "premium") $simple .= pic("icon_premium.gif",'','premium'); elseif ($row["level"] == "moderator") $simple .= pic("icon_moderator.gif",'','moderator'); elseif ($row["level"] == "admin") $simple .= pic("icon_admin.gif",'','admin'); if($donator) $simple .= '<img src="images/donator.gif" height="16" width="16" title="donator" alt="donator" />'; if($row["warned"] == "1") $simple .= '<img src="images/warning.gif" title="warned" alt="warned" />'; if ($i < $tot) $simple .= ", "; $i++; } $simple .= ""; } $db->sql_freeresult($res); echo"$simple"; echo "<br /> $user_now active user(s) <span>(in past 5 minutes)</span><br /> <span class=\"desc\">$legend</span> </h2> </div> </div></div>"; |
#2
|
||||
|
||||
where is the query for stats? did you change it?
__________________
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/ |
#3
|
||||
|
||||
yes i taked out a lot
query thing starts AFTER Code:
echo " <div class=\"maintitle_base\"><div class=\"header_left\"><div class=\"header_right\"> <h3 class=\"maintitle\"> Our Statistics</h3> </div></div></div> <div class=\"border2\"> <div id=\"board_statistics\" class=\"statistics stats_container\"> <div id=\"stats\"> <h2> Statistics</h2> <dl> "; echo "<dt>Torrents</dt><dd>".$tottorrent."</dd>\n"; echo "<dt>We have shared </dt><dd>".mksize($totshare)."</dd>\n"; echo "<dt>Seeders</dt><dd>".$totseeders."</dd>\n"; echo "<dt>Leechers</dt><dd>".$totleechers."</dd>\n"; echo "<dt>Members</dt><dd>".$totuser."</dd>\n"; echo " </dl> </div> <div id=\"active_users\" class=\"stats_list\"> <h2>"; |
#4
|
||||
|
||||
I still need to see the complete code if Im to help improve it.
__________________
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/ |
#5
|
||||
|
||||
all the code is in my first post there is noting else for this block
everything else in index.php is basicly the same as original only some blocks are comented out old statistics function is removed basicly that's all there is changed in index.php |
#6
|
||||
|
||||
Quote:
I well look at it l8r as I got stuff going on here rite now.
__________________
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/ |
#7
|
||||
|
||||
ok it's not realy important at this point so no wories
|
#8
|
||||
|
||||
try this
PHP Code:
__________________
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/ |
#9
|
||||
|
||||
perfect :bubble:
|
#10
|
|||
|
|||
all the code is in my first post there is noting else for this block
everything else in index.php is basicly the same as original only some blocks are comented out |
Tags |
code , imperialbt , statistics |
|
|