improve global promotion tips

This commit is contained in:
xiaomlove
2022-08-26 18:10:23 +08:00
parent e6888c043c
commit 5a4e8ddc1a
4 changed files with 12 additions and 8 deletions

View File

@@ -2690,11 +2690,12 @@ if ($msgalert)
$spStateGlobal = get_global_sp_state();
if ($spStateGlobal != \App\Models\Torrent::PROMOTION_NORMAL) {
$torrentGlobalStateRow = \Nexus\Database\NexusDB::cache_get(\App\Models\Setting::TORRENT_GLOBAL_STATE_CACHE_KEY);
$timeRange = sprintf('%s ~ %s', $torrentGlobalStateRow['begin'] ?? '', $torrentGlobalStateRow['deadline'] ?? '');
msgalert("torrents.php", sprintf(
$lang_functions['full_site_promotion_in_effect'],
\App\Models\Torrent::$promotionTypes[$spStateGlobal]['text'], $timeRange
), "green");
$msg = sprintf($lang_functions['full_site_promotion_in_effect'], \App\Models\Torrent::$promotionTypes[$spStateGlobal]['text']);
if (!empty($torrentGlobalStateRow['begin']) || !empty($torrentGlobalStateRow['deadline'])) {
$timeRange = sprintf($lang_functions['full_site_promotion_time_range'], $torrentGlobalStateRow['begin'] ?? '-∞', $torrentGlobalStateRow['deadline'] ?? '∞');
$msg .= $timeRange;
}
msgalert("torrents.php", $msg, "green");
}
if($CURUSER['leechwarn'] == 'yes')
{

View File

@@ -321,7 +321,8 @@ $lang_functions = array
'menu_claim' => '认领: ',
'text_complains' => '有%s%u个待处理的申诉%s',
'text_contactstaff' => '联系管理组',
'full_site_promotion_in_effect' => '全站 [%s] 生效中!时间:%s',
'full_site_promotion_in_effect' => '全站 [%s] 生效中!',
'full_site_promotion_time_range' => '时间:%s ~ %s',
'text_torrent_to_approval' => '有 %s%u 个待审核的种子%s',
'std_confirm_remove' => '确定要删除吗?',
'select_an_user_class' => '选择一个用户等级',

View File

@@ -328,7 +328,8 @@ $lang_functions = array
'menu_claim' => '認領: ',
'text_complains' => '有%s%u個待處理的申诉%s',
'text_contactstaff' => '聯系管理組',
'full_site_promotion_in_effect' => '全站 [%s] 生效中!時間:%s',
'full_site_promotion_in_effect' => '全站 [%s] 生效中!',
'full_site_promotion_time_range' => '時間:%s ~ %s',
'text_torrent_to_approval' => '有 %s%u 個待審核的種子%s',
'std_confirm_remove' => '確定要刪除嗎?',
'select_an_user_class' => '選擇一個用戶等級',

View File

@@ -329,7 +329,8 @@ $lang_functions = array
'menu_claim' => 'Claim: ',
'text_complains' => 'There %s %u pending complaint%s.',
'text_contactstaff' => 'Contact staff',
'full_site_promotion_in_effect' => 'Full site [%s] in effect! Time range: %s',
'full_site_promotion_in_effect' => 'Full site [%s] in effect!',
'full_site_promotion_time_range' => 'Time range: %s ~ %s',
'text_torrent_to_approval' => 'There %s%u not approval torrent%s.',
'std_confirm_remove' => 'Are you sure you want to delete it?',
'select_an_user_class' => 'Select an user class',