where('userid', $id) ->whereIn('torrentid', $torrentIdArr) ->select(['seedtime', 'uploaded', 'torrentid']) ->get() ->keyBy('torrentid'); } if ($showActionClaim) { $claimData = \App\Models\Claim::query() ->where('uid', $CURUSER['id']) ->whereIn('torrent_id', $torrentIdArr) ->get() ->keyBy('torrent_id'); } $ret = "
| ".$lang_getusertorrentlistajax['col_type']." | ".$lang_getusertorrentlistajax['col_name']." | ".$lang_getusertorrentlistajax['col_added']." | ". ($showsize ? "![]() | " : "").($showsenum ? "![]() | " : "").($showlenum ? "![]() | " : "").($showuploaded ? "".$lang_getusertorrentlistajax['col_uploaded']." | " : "") . ($showdownloaded ? "".$lang_getusertorrentlistajax['col_downloaded']." | " : "").($showratio ? "".$lang_getusertorrentlistajax['col_ratio']." | " : "").($showsetime ? "".$lang_getusertorrentlistajax['col_se_time']." | " : "").($showletime ? "".$lang_getusertorrentlistajax['col_le_time']." | " : "").($showcotime ? "".$lang_getusertorrentlistajax['col_time_completed']." | " : "").($showanonymous ? "".$lang_getusertorrentlistajax['col_anonymous']." | " : ""); $ret .= sprintf('%s | ', $lang_functions['std_action']); $ret .= "
| ".return_category_image($arr['category'], "torrents.php?allsec=1&")." | \n" . "" . $dispname . "". $banned_torrent . $sp_torrent . $hrImg . $approvalStatusIcon .($dissmall_descr == "" ? "" : " " . $dissmall_descr) . " | ";
$ret .= sprintf('%s %s | ', substr($arr['added'], 0, 10), substr($arr['added'], 11));
//size
if ($showsize)
$ret .= "". mksize_compact($arr['size'])." | "; //number of seeders if ($showsenum) $ret .= "".$arr['seeders']." | "; //number of leechers if ($showlenum) $ret .= "".$arr['leechers']." | "; //uploaded amount if ($showuploaded){ $uploaded = mksize_compact($arr["uploaded"]); $ret .= "".$uploaded." | "; } //downloaded amount if ($showdownloaded){ $downloaded = mksize_compact($arr["downloaded"]); $ret .= "".$downloaded." | "; } //ratio if ($showratio){ if ($arr['downloaded'] > 0) { $ratio = number_format($arr['uploaded'] / $arr['downloaded'], 3); $ratio = "".$ratio.""; } elseif ($arr['uploaded'] > 0) $ratio = "Inf."; else $ratio = "---"; $ret .= "".$ratio." | "; } if ($showsetime){ $ret .= "".mkprettytime($arr['seedtime'])." | "; } if ($showletime){ $ret .= "".mkprettytime($arr['leechtime'])." | "; } if ($showcotime) $ret .= ""."". str_replace(" ", " ", gettime($arr['completedat'],false)). " | ";
if ($showanonymous)
$ret .= "".$arr['anonymous']." | "; $claimButton = ''; if ( $showActionClaim && \App\Models\Claim::getConfigIsEnabled() && \Carbon\Carbon::parse($arr['added'])->addDays($claimTorrentTTL)->lte(\Carbon\Carbon::now()) ) { $claim = $claimData->get($arr['torrent']); if ($CURUSER['id'] == $arr['userid']) { $claimButton = $claimRep->buildActionButtons($arr['torrent'], $claim); } else { if ($claim) { $claimText = nexus_trans('claim.already_claimed'); } else { $claimText = nexus_trans('claim.not_claim_yet'); } $claimButton = sprintf('', $claimText); } } $ret .= sprintf('%s | ', $claimButton); $ret .="