diff --git a/public/modtask.php b/public/modtask.php index a67d2a33..9ee993fb 100644 --- a/public/modtask.php +++ b/public/modtask.php @@ -30,8 +30,10 @@ if ($action == "edituser") // $class = intval($_POST["class"] ?? 0); $class = $userInfo->class; $locale = get_user_locale($userid); - $vip_added = ($_POST["vip_added"] == 'yes' ? 'yes' : 'no'); - $vip_until = !empty($_POST["vip_until"]) ? $_POST['vip_until'] : null; +// $vip_added = ($_POST["vip_added"] == 'yes' ? 'yes' : 'no'); + $vip_added = $userInfo->vip_added; +// $vip_until = !empty($_POST["vip_until"]) ? $_POST['vip_until'] : null; + $vip_until = $userInfo->vip_until; $warned = $_POST["warned"] ?? ''; $warnlength = intval($_POST["warnlength"] ?? 0); @@ -251,26 +253,26 @@ if ($action == "edituser") // $what = ($class > $curclass ? "Promoted" : "Demoted"); // $modcomment = date("Y-m-d") . " - $what to '" . get_user_class_name($class) . "' by {$CURUSER['username']}.\n". $modcomment; // } - if ($class == UC_VIP) - { - $updateset[] = "vip_added = ".sqlesc($vip_added); - if ($vip_added == 'yes') - $updateset[] = "vip_until = ".sqlesc($vip_until); - $subject = nexus_trans("user.msg_your_vip_status_changed", [], $locale); - $msg = nexus_trans("user.msg_vip_status_changed_by", [], $locale).$CURUSER['username']; - $added = sqlesc(date("Y-m-d H:i:s")); - - \App\Models\Message::add([ - 'sender' => 0, - 'receiver' => $userid, - 'subject' => $subject, - 'msg' => $msg, - 'added' => now(), - ]); - -// $modcomment = date("Y-m-d") . " - VIP status changed by {$CURUSER['username']}. VIP added: ".$vip_added.($vip_added == 'yes' ? "; VIP until: ".$vip_until : "").".\n". $modcomment; - $userModifyLogs[] = "VIP status changed by {$CURUSER['username']}. VIP added: ".$vip_added.($vip_added == 'yes' ? "; VIP until: ".$vip_until : ""); - } +// if ($class == UC_VIP) +// { +// $updateset[] = "vip_added = ".sqlesc($vip_added); +// if ($vip_added == 'yes') +// $updateset[] = "vip_until = ".sqlesc($vip_until); +// $subject = nexus_trans("user.msg_your_vip_status_changed", [], $locale); +// $msg = nexus_trans("user.msg_vip_status_changed_by", [], $locale).$CURUSER['username']; +// $added = sqlesc(date("Y-m-d H:i:s")); +// +// \App\Models\Message::add([ +// 'sender' => 0, +// 'receiver' => $userid, +// 'subject' => $subject, +// 'msg' => $msg, +// 'added' => now(), +// ]); +// +//// $modcomment = date("Y-m-d") . " - VIP status changed by {$CURUSER['username']}. VIP added: ".$vip_added.($vip_added == 'yes' ? "; VIP until: ".$vip_until : "").".\n". $modcomment; +// $userModifyLogs[] = "VIP status changed by {$CURUSER['username']}. VIP added: ".$vip_added.($vip_added == 'yes' ? "; VIP until: ".$vip_until : ""); +// } if ($warned && $curwarned != $warned) { diff --git a/public/userdetails.php b/public/userdetails.php index 8ebde2c3..5137d5a8 100644 --- a/public/userdetails.php +++ b/public/userdetails.php @@ -122,7 +122,7 @@ if ($CURUSER['id'] == $user['id'] || user_can('cruprfmanage')) $userIdDisplay = $user['id']; $userManageSystemUrl = sprintf('%s/%s/user/users/%s',getSchemeAndHttpHost(), nexus_env('FILAMENT_PATH', 'nexusphp'), $user['id']); $userManageSystemText = sprintf('%s', $userManageSystemUrl, $lang_functions['text_management_system']); -$migratedHelp = sprintf($lang_userdetails['change_field_value_migrated'], $userManageSystemText); +$migratedHelp = "  ".sprintf($lang_userdetails['change_field_value_migrated'], $userManageSystemText); if (user_can('prfmanage') && $user["class"] < get_user_class()) { $userIdDisplay .= " [$userManageSystemText]"; } @@ -484,8 +484,8 @@ if (user_can('prfmanage') && $user["class"] < get_user_class()) $classselect=classlist('class', $maxclass, $user["class"], 0, false, true); tr($lang_userdetails['row_class'], $classselect . $migratedHelp, 1); } - tr($lang_userdetails['row_vip_by_bonus'], "".$lang_userdetails['radio_yes']." ".$lang_userdetails['radio_no']."
", 1); - tr($lang_userdetails['row_vip_until'], " ".$lang_userdetails['text_vip_until_note'], 1); + tr($lang_userdetails['row_vip_by_bonus'], "".$lang_userdetails['radio_yes']." ".$lang_userdetails['radio_no'].$migratedHelp, 1); + tr($lang_userdetails['row_vip_until'], " ".$lang_userdetails['text_vip_until_note']. $migratedHelp, 1); $supportlang = htmlspecialchars($user["supportlang"]); $supportfor = htmlspecialchars($user["supportfor"]); $pickfor = htmlspecialchars($user["pickfor"]); diff --git a/resources/lang/en/user.php b/resources/lang/en/user.php index fa3812b9..1eb94b35 100644 --- a/resources/lang/en/user.php +++ b/resources/lang/en/user.php @@ -17,10 +17,10 @@ return [ 'attendance_card' => 'Attend card', 'props' => 'Props', 'class' => 'Class', - 'vip_added' => 'VIP status is obtained by bonus', - 'vip_added_help' => 'Is the VIP status redeemed by bonus.', + 'vip_added' => 'VIP status auto expires', + 'vip_added_help' => 'Is the VIP status auto expires.', 'vip_until' => 'VIP status end time', - 'vip_until_help' => "The time format is 'Year-Year-Month-Day Hour:Minute:Second The time when the VIP status ends.' VIP status is obtained by bonus' must be set to 'Yes' for this rule to take effect.", + 'vip_until_help' => "The time format is 'Year-Year-Month-Day Hour:Minute:Second The time when the VIP status ends.' VIP status auto expires' must be set to 'Yes' for this rule to take effect.", ], 'class_names' => [ \App\Models\User::CLASS_VIP => 'Vip', diff --git a/resources/lang/zh_CN/user.php b/resources/lang/zh_CN/user.php index 2ba204bf..945bede3 100644 --- a/resources/lang/zh_CN/user.php +++ b/resources/lang/zh_CN/user.php @@ -17,10 +17,10 @@ return [ 'attendance_card' => '补签卡', 'props' => '道具', 'class' => '等级', - 'vip_added' => '贵宾资格为通过魔力值获得', - 'vip_added_help' => '该贵宾资格是否为通过魔力值换取。', + 'vip_added' => '贵宾资格是否自动过期', + 'vip_added_help' => '该贵宾资格是否自动过期。', 'vip_until' => '贵宾资格结束时间', - 'vip_until_help' => "时间格式为'年年年年-月月-日日 时时:分分:秒秒'。贵宾资格结束的时间。'贵宾资格为通过魔力值获得'必须设为'是'此规则才能生效。", + 'vip_until_help' => "时间格式为'年年年年-月月-日日 时时:分分:秒秒'。贵宾资格结束的时间。'贵宾资格是否自动过期'必须设为'是'此规则才能生效。", ], 'class_names' => [ \App\Models\User::CLASS_VIP => '贵宾', diff --git a/resources/lang/zh_TW/user.php b/resources/lang/zh_TW/user.php index 4a26f032..e7586272 100644 --- a/resources/lang/zh_TW/user.php +++ b/resources/lang/zh_TW/user.php @@ -17,10 +17,10 @@ return [ 'attendance_card' => '補簽卡', 'props' => '道具', 'class' => '等級', - 'vip_added' => '貴賓資格為通過魔力值獲得', - 'vip_added_help' => '該貴賓資格是否為通過魔力值換取。', + 'vip_added' => '貴賓資格是否自動過期', + 'vip_added_help' => '該貴賓資格是否自動過期。', 'vip_until' => '貴賓資格結束時間', - 'vip_until_help' => "時間格式為'年年年年-月月-日日 時時:分分:秒秒'。貴賓資格結束的時間。'貴賓資格為通過魔力值獲得'必須設為'是'此規則才能生效。", + 'vip_until_help' => "時間格式為'年年年年-月月-日日 時時:分分:秒秒'。貴賓資格結束的時間。'貴賓資格是否自動過期'必須設為'是'此規則才能生效。", ], 'class_names' => [ \App\Models\User::CLASS_VIP => '貴賓',