$DB->query("SELECT uid, tstamp FROM xbt_snatched WHERE fid='$TorrentID' ORDER BY tstamp DESC LIMIT 10");
if($DB->record_count()>0){
$Users=$DB->to_array();
foreach($Usersas$User){
$UserID=$User['uid'];
$DB->query("SELECT UserID FROM top_snatchers WHERE UserID='$UserID'");
if($DB->record_count()>0){continue;}
$UserInfo=user_info($UserID);
$Username=$UserInfo['Username'];
$TimeStamp=$User['tstamp'];
$Request="Hi $Username,
Theuser[url=http://".SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url]hasrequestedare-seedforthetorrent[url=http://".SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]".$Name."[/url],whichyousnatchedon".date('M d Y', $TimeStamp).".Thetorrentisnowun-seeded,andweneedyourhelptoresurrectit!
send_pm($UserID,0,'Re-seed request for torrent '.db_string($Name),db_string($Request));
}
$NumUsers=count($Users);
}else{
$UserInfo=user_info($UploaderID);
$Username=$UserInfo['Username'];
$Request="Hi $Username,
Theuser[url=http://".SITE_URL."/user.php?id=$LoggedUser[ID]]$LoggedUser[Username][/url]hasrequestedare-seedforthetorrent[url=http://".SITE_URL."/torrents.php?id=$GroupID&torrentid=$TorrentID]".$Name."[/url],whichyouuploadedon".date('M d Y', strtotime($UploadedTime)).".Thetorrentisnowun-seeded,andweneedyourhelptoresurrectit!
<p>Successfullysentre-seedrequestfortorrent<ahref="torrents.php?id=<?=$GroupID?>&torrentid=<?=$TorrentID?>"><?=display_str($Name)?></a> to <?=$NumUsers?> user(s).</p>