mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
增加显示用户详细页的实际上传、下载、分享率和显示用户UID (#19)
* 增加用户详细页种子列表显示相关信息 * 增加用户详细页面种子列表显示当前发布做种下载的总大小 * 增加用户详细页显示实际上传、下载、分享率 * 增加用户详细页显示上传、下载、分享率 * 增加用户详细页显示实际上传、下载、分享率显示 * 增加用户详细页显示实际上传、下载、分享率和显示用户的UID * 增加显示用户UID * 增加显示用户UID * 增加显示用户UID Co-authored-by: xiaomlove <353856593@qq.com>
This commit is contained in:
@@ -29,6 +29,10 @@ $lang_userdetails = array
|
||||
'row_uploaded' => "上传量",
|
||||
'row_downloaded' => "下载量",
|
||||
'row_share_ratio' => "分享率",
|
||||
'row_real_uploaded' => "实际上传量",
|
||||
'row_real_downloaded' => "实际下载量",
|
||||
'row_real_share_ratio' => "实际分享率",
|
||||
'row_real_ps' => "实际上传/下载量 (仅用于记录, 不参与分享率计算)",
|
||||
'row_internet_speed' => "网络带宽",
|
||||
'row_gender' => "性别",
|
||||
'row_donated' => "捐赠",
|
||||
@@ -142,5 +146,6 @@ $lang_userdetails = array
|
||||
'row_no_ad_until' => "不显示广告直到",
|
||||
'text_no_ad_until_note' => "时间格式为'年年年年-月月-日日 时时:分分:秒秒'。无广告待遇结束的时间。",
|
||||
'disable_user_migrated' => '启用或禁用用户请到管理后台操作',
|
||||
'text_user_id'=> "用户ID/UID",
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -29,6 +29,10 @@ $lang_userdetails = array
|
||||
'row_uploaded' => "上傳量",
|
||||
'row_downloaded' => "下載量",
|
||||
'row_share_ratio' => "分享率",
|
||||
'row_real_uploaded' => "實際上傳量",
|
||||
'row_real_downloaded' => "實際下載量",
|
||||
'row_real_share_ratio' => "實際分享率",
|
||||
'row_real_ps' => "實際上傳/下載量 (僅用於記錄, 不參與分享率計算)",
|
||||
'row_internet_speed' => "網路頻寬",
|
||||
'row_gender' => "性別",
|
||||
'row_donated' => "捐贈",
|
||||
@@ -142,5 +146,6 @@ $lang_userdetails = array
|
||||
'row_no_ad_until' => "不顯示廣告直到",
|
||||
'text_no_ad_until_note' => "時間格式為'年年年年-月月-日日 時時:分分:秒秒'。無廣告待遇結束的時間。",
|
||||
'disable_user_migrated' => '啟用或禁用用戶請到管理後臺操作',
|
||||
'text_user_id'=> "用戶ID/UID",
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -29,6 +29,10 @@ $lang_userdetails = array
|
||||
'row_uploaded' => "Uploaded",
|
||||
'row_downloaded' => "Downloaded",
|
||||
'row_share_ratio' => "Share Ratio",
|
||||
'row_real_uploaded' => "Actual Uploaded",
|
||||
'row_real_downloaded' => "Actual Downloaded",
|
||||
'row_real_share_ratio' => "Actual Share Ratio",
|
||||
'row_real_ps' => "Actual Uploaded/Actual Downloaded (For record purposes only, not for share rate calculation)",
|
||||
'row_internet_speed' => "Network Bandwidth",
|
||||
'row_gender' => "Gender",
|
||||
'row_donated' => "Donated",
|
||||
@@ -142,5 +146,6 @@ $lang_userdetails = array
|
||||
'row_no_ad_until' => "No Ad Until",
|
||||
'text_no_ad_until_note' => "Time format is YYYY-MM-DD hh:mm:ss. The time until when the user can turn ads off.",
|
||||
'disable_user_migrated' => 'Enable or disable use please go to the new management system.',
|
||||
'text_user_id'=> "User ID",
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -167,7 +167,7 @@ if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) ||
|
||||
print("<tr><td class=rowhead width=13%>".$lang_userdetails['row_compatibility']."</td><td class=rowfollow align=left width=87%>". $compatibility_info ."</td></tr>\n");
|
||||
}
|
||||
*/
|
||||
|
||||
tr_small($lang_userdetails['text_user_id'], $user['id'], 1);
|
||||
if ($CURUSER['id'] == $user['id'] || get_user_class() >= $viewinvite_class){
|
||||
if ($user["invites"] <= 0)
|
||||
tr_small($lang_userdetails['row_invitation'], $lang_userdetails['text_no_invitation'], 1);
|
||||
@@ -227,15 +227,29 @@ if ($clientselect)
|
||||
tr_small($lang_userdetails['row_bt_client'], $clientselect, 1);
|
||||
|
||||
|
||||
if ($user["downloaded"] > 0)
|
||||
//真实分享、上传、下载率显示
|
||||
$rs_true_trans = sql_query("SELECT SUM(uploaded), SUM(downloaded) FROM snatched WHERE userid = $user[id]") or sqlerr(__FILE__, __LINE__);
|
||||
$true_download = 0;
|
||||
$true_upload = 0;
|
||||
if(mysql_num_rows($rs_true_trans) > 0)
|
||||
{
|
||||
$row_true_trans = mysql_fetch_assoc($rs_true_trans);
|
||||
$true_upload = $row_true_trans['SUM(uploaded)'];
|
||||
$true_download = $row_true_trans['SUM(downloaded)'];
|
||||
|
||||
}
|
||||
if ($user["downloaded"] > 0 || $true_download > 0)
|
||||
{
|
||||
$sr = floor($user["uploaded"] / $user["downloaded"] * 1000) / 1000;
|
||||
$sr = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['row_share_ratio'] . "</strong>: <font color=\"" . get_ratio_color($sr) . "\">" . number_format($sr, 3) . "</font></td><td class=\"embedded\"> " . get_ratio_img($sr) . "</td></tr>";
|
||||
$true_ratio = floor($true_upload / $true_download * 1000) / 1000;
|
||||
$sr = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['row_share_ratio'] . "</strong>: <font color=\"" . get_ratio_color($sr) . "\">" . number_format($sr, 3) . "</font>(<strong>".$lang_userdetails['row_real_share_ratio']."</strong>:".number_format($true_ratio, 3).")</td><td class=\"embedded\"> " . get_ratio_img($sr) . "</td></tr>";
|
||||
|
||||
}
|
||||
//end
|
||||
|
||||
$xfer = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['row_uploaded'] . "</strong>: ". mksize($user["uploaded"]) . "</td><td class=\"embedded\"> <strong>" . $lang_userdetails['row_downloaded'] . "</strong>: " . mksize($user["downloaded"]) . "</td></tr>";
|
||||
|
||||
tr_small($lang_userdetails['row_transfer'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . ($sr ?? '') . $xfer . "</table>", 1);
|
||||
$true_xfer = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['row_real_uploaded'] . "</strong>: ". mksize($true_upload) . "</td><td class=\"embedded\"> <strong>" . $lang_userdetails['row_real_downloaded'] . "</strong>: " . mksize($true_download) . "</td><td class=\"embedded\" style=\"color: #7d7b7b;\"> " . $lang_userdetails['row_real_ps'] . "</td></tr>";
|
||||
tr_small($lang_userdetails['row_transfer'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . ($sr ?? '') . $xfer . $true_xfer . "</table>", 1);
|
||||
|
||||
|
||||
if ($user["leechtime"] > 0)
|
||||
|
||||
Reference in New Issue
Block a user