diff --git a/lang/chs/lang_getusertorrentlistajax.php b/lang/chs/lang_getusertorrentlistajax.php
index ed72e43b..7dc0428c 100644
--- a/lang/chs/lang_getusertorrentlistajax.php
+++ b/lang/chs/lang_getusertorrentlistajax.php
@@ -18,5 +18,6 @@ $lang_getusertorrentlistajax = array
'text_no_record' => "没有记录",
'text_total_size' => " | 总大小:",
'col_added' => "发布时间",
+ 'col_client' => '客户端',
);
?>
diff --git a/lang/cht/lang_getusertorrentlistajax.php b/lang/cht/lang_getusertorrentlistajax.php
index 3f8f1835..7de473ba 100644
--- a/lang/cht/lang_getusertorrentlistajax.php
+++ b/lang/cht/lang_getusertorrentlistajax.php
@@ -18,5 +18,6 @@ $lang_getusertorrentlistajax = array
'text_no_record' => "沒有記錄",
'text_total_size' => " | 總大小:",
'col_added' => "發布時間",
+ 'col_client' => '客戶端',
);
?>
diff --git a/lang/en/lang_getusertorrentlistajax.php b/lang/en/lang_getusertorrentlistajax.php
index a86a31bd..1be0f156 100644
--- a/lang/en/lang_getusertorrentlistajax.php
+++ b/lang/en/lang_getusertorrentlistajax.php
@@ -18,5 +18,6 @@ $lang_getusertorrentlistajax = array
'text_no_record' => "No record.",
'text_total_size' => " | Total size: ",
'col_added' => "Added",
+ 'col_client' => 'Client',
);
?>
diff --git a/public/getusertorrentlistajax.php b/public/getusertorrentlistajax.php
index c63b7426..d5d234fa 100644
--- a/public/getusertorrentlistajax.php
+++ b/public/getusertorrentlistajax.php
@@ -23,7 +23,7 @@ function maketable($res, $mode = 'seeding')
{
global $lang_getusertorrentlistajax,$CURUSER,$smalldescription_main, $lang_functions, $id;
global $torrentRep, $claimRep, $claimTorrentTTL;
- $showActionClaim = false;
+ $showActionClaim = $showClient = false;
switch ($mode)
{
case 'uploaded': {
@@ -55,6 +55,7 @@ function maketable($res, $mode = 'seeding')
$showtotalsize = true;
$columncount = 8;
$showActionClaim = true;
+ $showClient = true;
break;
}
case 'leeching': {
@@ -69,6 +70,7 @@ function maketable($res, $mode = 'seeding')
$showcotime = false;
$showanonymous = false;
$showtotalsize = true;
+ $showClient = true;
$columncount = 8;
break;
}
@@ -129,6 +131,9 @@ function maketable($res, $mode = 'seeding')
$ret = "
| ".$lang_getusertorrentlistajax['col_type']." | ".$lang_getusertorrentlistajax['col_name']." | ".$lang_getusertorrentlistajax['col_added']." | ".
($showsize ? "![\"".$lang_getusertorrentlistajax['title_size']."\" \"size\"](\"pic/trans.gif\") | " : "").($showsenum ? "![\"".$lang_getusertorrentlistajax['title_seeders']."\" \"seeders\"](\"pic/trans.gif\") | " : "").($showlenum ? "![\"".$lang_getusertorrentlistajax['title_leechers']."\" \"leechers\"](\"pic/trans.gif\") | " : "").($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']." | " : "");
+ if ($showClient) {
+ $ret .= sprintf('%s | IP | ', $lang_getusertorrentlistajax['col_client']);
+ }
$ret .= sprintf('%s | ', $lang_functions['std_action']);
$ret .= "
";
$total_size = 0;
@@ -212,6 +217,14 @@ function maketable($res, $mode = 'seeding')
$ret .= ""."". str_replace(" ", " ", gettime($arr['completedat'],false)). " | ";
if ($showanonymous)
$ret .= "".$arr['anonymous']." | ";
+ if ($showClient) {
+ $ipArr = array_filter([$arr['ipv4'], $arr['ipv6']]);
+ $ret .= sprintf(
+ '%s %s | %s | ',
+ get_agent($arr['peer_id'], $arr['agent']), $arr['port'],
+ implode('
', $ipArr)
+ );
+ }
$claimButton = '';
if (
$showActionClaim
@@ -258,7 +271,7 @@ switch ($type)
case 'seeding':
{
// $res = sql_query("SELECT torrent,added,snatched.uploaded,snatched.downloaded,torrents.name as torrentname, torrents.small_descr, torrents.sp_state, torrents.banned, torrents.approval_status, categories.name as catname,size,torrents.hr,image,category,seeders,leechers FROM peers LEFT JOIN torrents ON peers.torrent = torrents.id LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN snatched ON torrents.id = snatched.torrentid WHERE peers.userid=$id AND snatched.userid = $id AND peers.seeder='yes' ORDER BY torrents.id DESC") or sqlerr();
- $fields = "torrent,added,snatched.uploaded,snatched.downloaded,torrents.name as torrentname, torrents.small_descr, torrents.sp_state, torrents.banned, torrents.approval_status, categories.name as catname,size,torrents.hr,image,category,seeders,leechers,snatched.seedtime,snatched.uploaded,snatched.userid, categories.mode as search_box_id";
+ $fields = "torrent,added,snatched.uploaded,snatched.downloaded,snatched.seedtime,torrents.name as torrentname, torrents.small_descr, torrents.sp_state, torrents.banned, torrents.approval_status, categories.name as catname,size,torrents.hr,image,category,seeders,leechers,snatched.userid, categories.mode as search_box_id, peers.peer_id, peers.agent, peers.port, peers.ipv4, peers.ipv6";
$tableWhere = "peers LEFT JOIN torrents ON peers.torrent = torrents.id LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN snatched ON torrents.id = snatched.torrentid WHERE peers.userid=$id AND snatched.userid = $id AND peers.seeder='yes'";
$order = "torrents.id DESC";
break;
@@ -268,7 +281,7 @@ switch ($type)
case 'leeching':
{
// $res = sql_query("SELECT torrent,snatched.uploaded,snatched.downloaded,torrents.name as torrentname, torrents.small_descr, torrents.sp_state, torrents.banned, torrents.approval_status, categories.name as catname,size,torrents.hr,image,category,seeders,leechers, torrents.added FROM peers LEFT JOIN torrents ON peers.torrent = torrents.id LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN snatched ON torrents.id = snatched.torrentid WHERE peers.userid=$id AND snatched.userid = $id AND peers.seeder='no' ORDER BY torrents.id DESC") or sqlerr();
- $fields = "torrent,snatched.uploaded,snatched.downloaded,torrents.name as torrentname, torrents.small_descr, torrents.sp_state, torrents.banned, torrents.approval_status, categories.name as catname,size,torrents.hr,image,category,seeders,leechers, torrents.added,snatched.seedtime,snatched.uploaded,snatched.userid, categories.mode as search_box_id";
+ $fields = "torrent,snatched.uploaded,snatched.downloaded,snatched.seedtime,torrents.name as torrentname, torrents.small_descr, torrents.sp_state, torrents.banned, torrents.approval_status, categories.name as catname,size,torrents.hr,image,category,seeders,leechers, torrents.added,snatched.userid, categories.mode as search_box_id, peers.peer_id, peers.agent, peers.port, peers.ipv4, peers.ipv6";
$tableWhere = "peers LEFT JOIN torrents ON peers.torrent = torrents.id LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN snatched ON torrents.id = snatched.torrentid WHERE peers.userid=$id AND snatched.userid = $id AND peers.seeder='no'";
$order = "torrents.id DESC";
break;
@@ -288,7 +301,7 @@ switch ($type)
case 'incomplete':
{
// $res = sql_query("SELECT torrents.id AS torrent, torrents.name AS torrentname, small_descr, torrents.banned, torrents.approval_status, categories.name AS catname, categories.image, category, sp_state, size, torrents.hr, torrents.added,snatched.uploaded, snatched.downloaded, snatched.leechtime FROM torrents LEFT JOIN snatched ON torrents.id = snatched.torrentid LEFT JOIN categories on torrents.category = categories.id WHERE snatched.finished='no' AND userid=$id AND torrents.owner != $id ORDER BY snatched.id DESC") or sqlerr();
- $fields = "torrents.id AS torrent, torrents.name AS torrentname, small_descr, torrents.banned, torrents.approval_status, categories.name AS catname, categories.image, category, sp_state, size, torrents.hr, torrents.added,snatched.uploaded, snatched.downloaded, snatched.leechtime,snatched.seedtime,snatched.uploaded,snatched.userid, categories.mode as search_box_id";
+ $fields = "torrents.id AS torrent, torrents.name AS torrentname, small_descr, torrents.banned, torrents.approval_status, categories.name AS catname, categories.image, category, sp_state, size, torrents.hr, torrents.added,snatched.uploaded, snatched.downloaded, snatched.leechtime,snatched.seedtime,snatched.userid, categories.mode as search_box_id";
$tableWhere = "torrents LEFT JOIN snatched ON torrents.id = snatched.torrentid LEFT JOIN categories on torrents.category = categories.id WHERE snatched.finished='no' AND userid=$id AND torrents.owner != $id";
$order = "snatched.id DESC";
break;