mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
show official addition only when had set official tag
This commit is contained in:
@@ -5837,7 +5837,7 @@ function calculate_seed_bonus($uid, $torrentIdArr = null): array
|
|||||||
$tagGrouped[$tagItem['torrent_id']][$tagItem['tag_id']] = 1;
|
$tagGrouped[$tagItem['torrent_id']][$tagItem['tag_id']] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$officialTag = \App\Models\Setting::get('system.official_tag');
|
$officialTag = \App\Models\Setting::get('bonus.official_tag');
|
||||||
$officialAdditionalFactor = \App\Models\Setting::get('bonus.official_addition');
|
$officialAdditionalFactor = \App\Models\Setting::get('bonus.official_addition');
|
||||||
$zeroBonusTag = \App\Models\Setting::get('bonus.zero_bonus_tag');
|
$zeroBonusTag = \App\Models\Setting::get('bonus.zero_bonus_tag');
|
||||||
$zeroBonusFactor = \App\Models\Setting::get('bonus.zero_bonus_factor');
|
$zeroBonusFactor = \App\Models\Setting::get('bonus.zero_bonus_factor');
|
||||||
|
|||||||
+5
-4
@@ -461,8 +461,9 @@ $A = $seedBonusResult['A'];
|
|||||||
$width = $percent * 4;
|
$width = $percent * 4;
|
||||||
print("<img class=\"".$loadpic."\" src=\"pic/trans.gif\" style=\"width: ".$width."px;\" alt=\"".$percent."%\" /></td></tr></table>");
|
print("<img class=\"".$loadpic."\" src=\"pic/trans.gif\" style=\"width: ".$width."px;\" alt=\"".$percent."%\" /></td></tr></table>");
|
||||||
|
|
||||||
$officialAdditionalFactor = get_setting('bonus.official_addition');
|
$officialAdditionalFactor = get_setting('bonus.official_addition', 0);
|
||||||
if ($officialAdditionalFactor > 0) {
|
$officialTag = get_setting('bonus.official_tag');
|
||||||
|
if ($officialAdditionalFactor > 0 && $officialTag) {
|
||||||
print("<h1>".$lang_mybonus['text_get_by_seeding_official']."</h1>");
|
print("<h1>".$lang_mybonus['text_get_by_seeding_official']."</h1>");
|
||||||
print("<ul>");
|
print("<ul>");
|
||||||
print("<li>".$lang_mybonus['official_calculate_method']."</li>");
|
print("<li>".$lang_mybonus['official_calculate_method']."</li>");
|
||||||
@@ -482,7 +483,7 @@ $rowSpan = 1;
|
|||||||
if ($haremFactor > 0) {
|
if ($haremFactor > 0) {
|
||||||
$rowSpan++;
|
$rowSpan++;
|
||||||
}
|
}
|
||||||
if ($officialAdditionalFactor > 0) {
|
if ($officialAdditionalFactor > 0 && $officialTag) {
|
||||||
$rowSpan++;
|
$rowSpan++;
|
||||||
}
|
}
|
||||||
$summaryTable = '<table cellspacing="4" cellpadding="4" style="width: 50%"><tbody>';
|
$summaryTable = '<table cellspacing="4" cellpadding="4" style="width: 50%"><tbody>';
|
||||||
@@ -505,7 +506,7 @@ if ($haremFactor > 0) {
|
|||||||
number_format($haremAddition * $haremFactor, 3)
|
number_format($haremAddition * $haremFactor, 3)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($officialAdditionalFactor > 0) {
|
if ($officialAdditionalFactor > 0 && $officialTag) {
|
||||||
$summaryTable .= sprintf(
|
$summaryTable .= sprintf(
|
||||||
'<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',
|
'<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',
|
||||||
$lang_mybonus['reward_type_official_addition'],
|
$lang_mybonus['reward_type_official_addition'],
|
||||||
|
|||||||
Reference in New Issue
Block a user