<?php
$sql = "
SELECT ug.user_id
FROM ". BB_GROUPS ." g
LEFT JOIN ". BB_USER_GROUP ." ug ON(g.group_id = ug.group_id AND ug.user_pending != 1)
WHERE g.group_single_user = 0
AND g.group_opt & ". pow(2, $bf['group_opt']['unlim']) ." = ". pow(2, $bf['group_opt']['unlim']) ."
";
$user_ids = array();
$user_ids = DB()->fetch_rowset($sql, 'user_id');
$user_ids_csv = join(',', $user_ids);
CACHE('tr_cache')->set('tr_unlim', $user_ids_csv);
function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVED)
function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVED, $checked_user_id = '', $checked_time = '')
$columns = ' info_hash, post_id, poster_id, topic_id, forum_id, attach_id, size, reg_time, tor_status';
$values = "'$info_hash_sql', $post_id, $poster_id, $topic_id, $forum_id, $attach_id, '$size', $reg_time, $tor_status";
$columns = ' info_hash, post_id, poster_id, topic_id, forum_id, attach_id, size, reg_time, tor_status, checked_user_id, checked_time';
$values = "'$info_hash_sql', $post_id, $poster_id, $topic_id, $forum_id, $attach_id, '$size', $reg_time, $tor_status, '$checked_user_id', '$checked_time'";
else if (bf($userdata['group_opt'], 'group_opt', 'autocheck')) tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_APPROVED);
else if (bf($userdata['group_opt'], 'group_opt', 'autocheck')) tracker_register(TORRENT_ATTACH_ID, 'newtopic', TOR_APPROVED, $userdata['user_id'], TIMENOW);