mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-27 22:47:23 +08:00
seedBox record alert + destroy disabled account
This commit is contained in:
@@ -11,6 +11,7 @@ header("Pragma: no-cache" );
|
||||
|
||||
$torrentRep = new \App\Repositories\TorrentRepository();
|
||||
$claimRep = new \App\Repositories\ClaimRepository();
|
||||
$seedBoxRep = new \App\Repositories\SeedBoxRepository();
|
||||
$claimTorrentTTL = \App\Models\Claim::getConfigTorrentTTL();
|
||||
$id = intval($_GET['userid'] ?? 0);
|
||||
$type = $_GET['type'];
|
||||
@@ -22,7 +23,7 @@ if(!user_can('torrenthistory') && $id != $CURUSER["id"])
|
||||
function maketable($res, $mode = 'seeding')
|
||||
{
|
||||
global $lang_getusertorrentlistajax,$CURUSER,$smalldescription_main, $lang_functions, $id;
|
||||
global $torrentRep, $claimRep, $claimTorrentTTL;
|
||||
global $torrentRep, $claimRep, $claimTorrentTTL, $seedBoxRep;
|
||||
$showActionClaim = $showClient = false;
|
||||
switch ($mode)
|
||||
{
|
||||
@@ -107,6 +108,10 @@ function maketable($res, $mode = 'seeding')
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
$shouldShowClient = false;
|
||||
if ($showClient && (user_can('userprofile') || $CURUSER['id'] == $id)) {
|
||||
$shouldShowClient = true;
|
||||
}
|
||||
$results = $torrentIdArr = [];
|
||||
while ($row = mysql_fetch_assoc($res)) {
|
||||
$results[] = $row;
|
||||
@@ -131,7 +136,7 @@ function maketable($res, $mode = 'seeding')
|
||||
|
||||
$ret = "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\"><tr><td class=\"colhead\" style=\"padding: 0px\">".$lang_getusertorrentlistajax['col_type']."</td><td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_name']."</td><td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_added']."</td>".
|
||||
($showsize ? "<td class=\"colhead\" align=\"center\"><img class=\"size\" src=\"pic/trans.gif\" alt=\"size\" title=\"".$lang_getusertorrentlistajax['title_size']."\" /></td>" : "").($showsenum ? "<td class=\"colhead\" align=\"center\"><img class=\"seeders\" src=\"pic/trans.gif\" alt=\"seeders\" title=\"".$lang_getusertorrentlistajax['title_seeders']."\" /></td>" : "").($showlenum ? "<td class=\"colhead\" align=\"center\"><img class=\"leechers\" src=\"pic/trans.gif\" alt=\"leechers\" title=\"".$lang_getusertorrentlistajax['title_leechers']."\" /></td>" : "").($showuploaded ? "<td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_uploaded']."</td>" : "") . ($showdownloaded ? "<td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_downloaded']."</td>" : "").($showratio ? "<td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_ratio']."</td>" : "").($showsetime ? "<td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_se_time']."</td>" : "").($showletime ? "<td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_le_time']."</td>" : "").($showcotime ? "<td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_time_completed']."</td>" : "").($showanonymous ? "<td class=\"colhead\" align=\"center\">".$lang_getusertorrentlistajax['col_anonymous']."</td>" : "");
|
||||
if ($showClient) {
|
||||
if ($shouldShowClient) {
|
||||
$ret .= sprintf('<td class="colhead" align="center">%s</td><td class="colhead" align="center">IP</td>', $lang_getusertorrentlistajax['col_client']);
|
||||
}
|
||||
$ret .= sprintf('<td class="colhead" align="center">%s</td>', $lang_functions['std_action']);
|
||||
@@ -217,8 +222,11 @@ function maketable($res, $mode = 'seeding')
|
||||
$ret .= "<td class=\"rowfollow\" align=\"center\">"."". str_replace(" ", "<br />", gettime($arr['completedat'],false)). "</td>";
|
||||
if ($showanonymous)
|
||||
$ret .= "<td class=\"rowfollow\" align=\"center\">".$arr['anonymous']."</td>";
|
||||
if ($showClient) {
|
||||
if ($shouldShowClient) {
|
||||
$ipArr = array_filter([$arr['ipv4'], $arr['ipv6']]);
|
||||
foreach ($ipArr as &$_ip) {
|
||||
$_ip = sprintf('<span class="nowrap">%s</span>', $_ip . $seedBoxRep->renderIcon($_ip, $arr['userid']));
|
||||
}
|
||||
$ret .= sprintf(
|
||||
'<td class="rowfollow" align="center">%s<br/>%s</td><td class="rowfollow" align="center">%s</td>',
|
||||
get_agent($arr['peer_id'], $arr['agent']), $arr['port'],
|
||||
|
||||
Reference in New Issue
Block a user