diff --git a/lang/chs/lang_invite.php b/lang/chs/lang_invite.php index ce3c0cb2..c5dd06df 100644 --- a/lang/chs/lang_invite.php +++ b/lang/chs/lang_invite.php @@ -51,6 +51,7 @@ $lang_invite = array 'harem_addition' => '后宫加成', 'signup_link_help' => '右键复制', 'signup_link' => '注册链接', + 'text_uploaded_count' => '上传种子数量', 'text_seed_torrent_count' => '当前做种数', 'text_seed_torrent_size' => '当前做种体积', 'text_seed_torrent_bonus_per_hour' => '当前纯做种时魔', diff --git a/lang/en/lang_invite.php b/lang/en/lang_invite.php index 84180927..1916e345 100644 --- a/lang/en/lang_invite.php +++ b/lang/en/lang_invite.php @@ -54,6 +54,7 @@ Best Regards, 'harem_addition' => 'Harem addition', 'signup_link_help' => 'Right click to copy', 'signup_link' => 'Signup link', + 'text_uploaded_count' => 'Uploaded counts', 'text_seed_torrent_count' => 'Seeding counts', 'text_seed_torrent_size' => 'Seeding size', 'text_seed_torrent_bonus_per_hour' => 'Seeding bonus per hour', diff --git a/public/invite.php b/public/invite.php index 0fa79a13..d60b5397 100644 --- a/public/invite.php +++ b/public/invite.php @@ -100,14 +100,14 @@ if ($type == 'new'){ } else { inviteMenu($menuSelected); if ($menuSelected == 'invitee') { - $whereStr = "invited_by = " . sqlesc($id); + $whereStr = "u.invited_by = " . sqlesc($id); if (!empty($_GET['status'])) { - $whereStr .= " and status = " . sqlesc($_GET['status']); + $whereStr .= " and u.status = " . sqlesc($_GET['status']); } if (!empty($_GET['enabled'])) { - $whereStr .= " and enabled = " . sqlesc($_GET['enabled']); + $whereStr .= " and u.enabled = " . sqlesc($_GET['enabled']); } - $rel = sql_query("SELECT COUNT(*) FROM users WHERE $whereStr") or sqlerr(__FILE__, __LINE__); + $rel = sql_query("SELECT COUNT(*) FROM users u WHERE $whereStr") or sqlerr(__FILE__, __LINE__); $arro = mysql_fetch_row($rel); $number = $arro[0]; $textSelectOnePlease = nexus_trans('nexus.select_one_please'); @@ -164,13 +164,14 @@ JS; } else { list($pagertop, $pagerbottom, $limit) = pager($pageSize, $number, "?id=$id&menu=$menuSelected&"); $haremAdditionFactor = (float)get_setting('bonus.harem_addition'); - $ret = sql_query("SELECT id, username, email, uploaded, downloaded, status, warned, enabled, donor, email, seed_points_per_hour, seeding_torrent_count, seeding_torrent_size, last_announce_at FROM users WHERE $whereStr $limit") or sqlerr(); + $ret = sql_query("SELECT u.id, u.username, u.email, u.uploaded, u.downloaded, u.status, u.warned, u.enabled, u.donor, u.email, u.seed_points_per_hour, u.seeding_torrent_count, u.seeding_torrent_size, u.last_announce_at, COUNT(t.id) AS torrent_count FROM users u LEFT JOIN torrents t ON t.owner = u.id WHERE $whereStr GROUP BY u.id $limit") or sqlerr(); $num = mysql_num_rows($ret); print(" ".$lang_invite['text_username']." ".$lang_invite['text_email']." ".$lang_invite['text_enabled']." +".$lang_invite['text_uploaded_count']." ".$lang_invite['text_uploaded']." ".$lang_invite['text_downloaded']." ".$lang_invite['text_ratio']." @@ -212,6 +213,7 @@ JS; ".get_username($arr['id'])." ".$arr['email']." ".$arr['enabled']." + " . $arr['torrent_count'] . " " . mksize($arr['uploaded']) . " " . mksize($arr['downloaded']) . " ".$ratio."