if(!isset($_GET['torrentid']) || !is_number($_GET['torrentid']) || !check_perms('site_view_torrent_snatchlist')) { error(404); } $TorrentID = $_GET['torrentid']; if(!empty($_GET['page']) && is_number($_GET['page'])) { $Page = $_GET['page']; $Limit = (string)(($Page-1)*100) .', 100'; } else { $Page = 1; $Limit = 100; } $DB->query("SELECT SQL_CALC_FOUND_ROWS ud.UserID, ud.Time FROM users_downloads AS ud WHERE ud.TorrentID='$TorrentID' ORDER BY ud.Time DESC LIMIT $Limit"); $UserIDs = $DB->collect('UserID'); $Results = $DB->to_array('UserID', MYSQLI_ASSOC); $DB->query("SELECT FOUND_ROWS()"); list($NumResults) = $DB->next_record(); if(count($UserIDs)>0) { $UserIDs = implode(',',$UserIDs); $DB->query("SELECT uid FROM xbt_snatched WHERE fid='$TorrentID' AND uid IN($UserIDs)"); $Snatched = $DB->to_array('uid'); $DB->query("SELECT uid FROM xbt_files_users WHERE fid='$TorrentID' AND Remaining=0 AND uid IN($UserIDs)"); $Seeding = $DB->to_array('uid'); } ?>
User | Time | User | Time |
=$User?> | =time_diff($Timestamp)?> | $i++; } ?>