//Store LastAdded
if($bb_cfg['t_last_added_num'])
{
$data = DB()->fetch_rowset("SELECT
tr.topic_id, tr.forum_id, tr.reg_time,
tr.post_id,
<script type="text/javascript" src="{#BB_ROOT}misc/js/jtip.js?v={$bb_cfg['js_ver']}"></script>
<link rel="stylesheet" href="./templates/default/css/jtip.css" type="text/css">
<div style="font-size:10px">{L_FORUM}: <a href="viewforum.php?f={lastAdded.FORUM_ID}">{lastAdded.FORUM}</a></div>
<div class="tCenter"><a href="http://{$bb_cfg['server_name']}{$bb_cfg['script_path']}viewpost.php?id={lastAdded.POST_ID}" class="jTip" name="{lastAdded.TITLE}" id="post_{lastAdded.POST_ID}">Пред.просмотр</a></div>
$template -> assign_block_vars('lastAdded',array(
'TITLE' => wbr(str_short($last_add['topic_title'], $bb_cfg['max_last_title'])),
'TOPIC_ID' => $last_add['topic_id'],
'POST_ID' => $last_add['post_id'],
<script type="text/javascript" src="{#BB_ROOT}misc/js/jtip.js?v={$bb_cfg['js_ver']}"></script>
<link rel="stylesheet" href="./templates/default/css/jtip.css" type="text/css">
Разрешил скачивать без реги, теперь отображается в топ-10 личеров Анонимус, причем плюсует на него всех кто скачивал без реги, как исправить?
Dr_Brown, дык возьми и сделай условие. user_id != -1 а лучше
user_id NOT IN(". EXCLUDED_USERS_CSV .")
$data = DB()->fetch_rowset("SELECT t.user_id, u.username, u.user_rank, SUM( t.u_down_total ) sum
FROM ". BB_BT_USERS ." t
LEFT JOIN ". BB_USERS ." u ON ( t.user_id = u.user_id )
GROUP BY t.user_id
ORDER BY sum DESC
LIMIT 0 ,".$bb_cfg['t_top_downloaders']);
$this->store('top_downloaders', $data);
$data = DB()->fetch_rowset("SELECT t.user_id, u.username, u.user_rank, SUM( t.u_down_total ) sum
FROM ". BB_BT_USERS ." t
WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")
LEFT JOIN ". BB_USERS ." u ON ( t.user_id = u.user_id )
GROUP BY t.user_id
ORDER BY sum DESC
LIMIT 0 ,".$bb_cfg['t_top_downloaders']);
$this->store('top_downloaders', $data);