#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
// Generate logged in/logged out status
if ($logged_in)
{
$u_login_logout = BB_ROOT ."login.php?logout=1";
}
else
{
$u_login_logout = BB_ROOT ."login.php";
}
#
#-----[ AFTER, ADD ]-----------------------------------------
#
show_bt_userdata($userdata['user_id']);
if ($bb_cfg['bt_show_dl_stat_on_index'] && !IS_GUEST)
{
show_bt_userdata($userdata['user_id']);
}
$profile_user_id = $userdata['user_id'];
$seeding = $leeching = $releasing = array();
$sql = 'SELECT f.forum_id, f.forum_name, t.topic_title, tor.size,sn.seeders, sn.leechers, tr.*
FROM '. BB_FORUMS .' f, '. BB_TOPICS .' t, '. BB_BT_TRACKER .' tr, '. BB_BT_TORRENTS .' tor, '. BB_BT_TRACKER_SNAP ." sn
WHERE tr.user_id = $profile_user_id
AND tr.topic_id = tor.topic_id
AND sn.topic_id = tor.topic_id
AND tor.topic_id = t.topic_id
AND t.forum_id = f.forum_id
GROUP BY tr.topic_id
ORDER BY f.forum_name, t.topic_title";
if (!$result = DB()->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query users torrent profile information', '', __LINE__, __FILE__, $sql);
}
if ($rowset = DB()->sql_fetchrowset($result))
{
DB()->sql_freeresult($result);
$rowset_count = count($rowset);
for ($i=0; $i<$rowset_count; $i++)
{
if ($rowset[$i]['releaser'])
{
$releasing[] = $rowset[$i];
}
else if ($rowset[$i]['seeder'])
{
$seeding[] = $rowset[$i];
}
else
{
$leeching[] = $rowset[$i];
}
}
unset($rowset);
}
$seeding_count = count($seeding);
$leeching_count = count($leeching);
$releasing_count = count($releasing);
#
#-----[ FIND ]------------------------------------------------
#
'FULL_URL' => FULL_URL,
#
#-----[ AFTER, ADD ]------------------------------------------------
#
'RELEASING' => ($releasing_count) ? ($releasing_count) : 0,
'SEEDING' => ($seeding_count) ? ($seeding_count) : 0,
'LEECHING' => ($leeching_count) ? ($leeching_count) : 0,
#
#-----[ OPEN ]------------------------------------------------
#
templates/default/page_header.tpl
#
#-----[ FIND ]------------------------------------------------
#
<!--/logo-->
#
#-----[ AFTER, ADD ]------------------------------------------------
#
<td>
<table style="float: right;">
<tr>
<td rowspan="8" >{THIS_AVATAR}</td>
<td><tr><td>
<a class="med">{L_USER_RATIO}</a></td>
<td><i style="color: silver !important; font-size: 9px" class="bold">(DL < {MIN_DL_FOR_RATIO})</i></td></tr>
<tr><td>{L_DOWNLOADED}</td><td class="leechmed">{DOWN_TOTAL}</td></tr>
<tr><td>{L_UPLOADED}</td><td class="seedmed">{UP_TOTAL}</td></tr>
<tr><td>{L_RELEASED}</td><td class="seedmed">{RELEASED}</td></tr>
<tr><td>{L_BONUS}</td><td class="seedmed">{UP_BONUS}</td></tr>
<!-- IF $bb_cfg['seed_bonus_enabled'] --><tr><td>{L_SEED_BONUS}</td><td><span class="points">{POINTS}</span></td></tr><!-- ENDIF -->
</td></tr></table>
</td>
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#