$porno_forums = $bb_cfg['porno_forums'] ? $bb_cfg['porno_forums'] : 0;
$new_torrent = DB()->sql_query("SELECT t.topic_id, ph.post_html, ph.post_id, tt.topic_title, tt.topic_time, t.size, t.poster_id, u.username, u.user_id, f.forum_id, t.forum_id, f.forum_name
FROM ".BB_BT_TORRENTS." AS t,
".BB_POSTS_HTML." AS ph,
".BB_TOPICS." AS tt,
".BB_USERS." AS u,
".BB_FORUMS." AS f
WHERE ph.post_id = t.post_id
AND tt.topic_id = t.topic_id
AND tt.topic_id = t.topic_id
AND t.poster_id = u.user_id
AND t.forum_id = f.forum_id
AND tt.forum_id NOT IN (".$porno_forums.")
GROUP BY t.reg_time DESC LIMIT 30
");