mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
self enable
This commit is contained in:
@@ -21,6 +21,7 @@ class BonusLogs extends NexusModel
|
|||||||
const DEFAULT_BONUS_BUY_TEMPORARY_INVITE = 500;
|
const DEFAULT_BONUS_BUY_TEMPORARY_INVITE = 500;
|
||||||
const DEFAULT_BONUS_BUY_RAINBOW_ID = 5000;
|
const DEFAULT_BONUS_BUY_RAINBOW_ID = 5000;
|
||||||
const DEFAULT_BONUS_BUY_CHANGE_USERNAME_CARD = 100000;
|
const DEFAULT_BONUS_BUY_CHANGE_USERNAME_CARD = 100000;
|
||||||
|
const DEFAULT_BONUS_SELF_ENABLE = 100000;
|
||||||
|
|
||||||
//扣除类,1开始
|
//扣除类,1开始
|
||||||
const BUSINESS_TYPE_CANCEL_HIT_AND_RUN = 1;
|
const BUSINESS_TYPE_CANCEL_HIT_AND_RUN = 1;
|
||||||
@@ -46,6 +47,7 @@ class BonusLogs extends NexusModel
|
|||||||
const BUSINESS_TYPE_TASK_PASS_REWARD = 21;
|
const BUSINESS_TYPE_TASK_PASS_REWARD = 21;
|
||||||
const BUSINESS_TYPE_REWARD_TORRENT = 22;
|
const BUSINESS_TYPE_REWARD_TORRENT = 22;
|
||||||
const BUSINESS_TYPE_CLAIMED_UNREACHED = 23;
|
const BUSINESS_TYPE_CLAIMED_UNREACHED = 23;
|
||||||
|
const BUSINESS_TYPE_SELF_ENABLE = 24;
|
||||||
|
|
||||||
//获得类,普通获得,1000 起步
|
//获得类,普通获得,1000 起步
|
||||||
const BUSINESS_TYPE_ROLE_WORK_SALARY = 1000;
|
const BUSINESS_TYPE_ROLE_WORK_SALARY = 1000;
|
||||||
@@ -87,6 +89,7 @@ class BonusLogs extends NexusModel
|
|||||||
self::BUSINESS_TYPE_TASK_PASS_REWARD => ['text' => 'Task success reward'],
|
self::BUSINESS_TYPE_TASK_PASS_REWARD => ['text' => 'Task success reward'],
|
||||||
self::BUSINESS_TYPE_REWARD_TORRENT => ['text' => 'Reward torrent'],
|
self::BUSINESS_TYPE_REWARD_TORRENT => ['text' => 'Reward torrent'],
|
||||||
self::BUSINESS_TYPE_CLAIMED_UNREACHED => ['text' => 'Claimed torrent unreached'],
|
self::BUSINESS_TYPE_CLAIMED_UNREACHED => ['text' => 'Claimed torrent unreached'],
|
||||||
|
self::BUSINESS_TYPE_SELF_ENABLE => ['text' => 'Self enable'],
|
||||||
|
|
||||||
self::BUSINESS_TYPE_ROLE_WORK_SALARY => ['text' => 'Role work salary'],
|
self::BUSINESS_TYPE_ROLE_WORK_SALARY => ['text' => 'Role work salary'],
|
||||||
self::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => ['text' => 'Torrent be downloaded'],
|
self::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => ['text' => 'Torrent be downloaded'],
|
||||||
|
|||||||
@@ -334,4 +334,9 @@ class Setting extends NexusModel
|
|||||||
{
|
{
|
||||||
return self::get('main.showimdbinfo') == 'yes';
|
return self::get('main.showimdbinfo') == 'yes';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getSelfEnableBonus(): int
|
||||||
|
{
|
||||||
|
return (int)self::get("bonus.self_enable", BonusLogs::DEFAULT_BONUS_SELF_ENABLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ class UserBanLog extends NexusModel
|
|||||||
|
|
||||||
protected $fillable = ['uid', 'username', 'operator', 'reason'];
|
protected $fillable = ['uid', 'username', 'operator', 'reason'];
|
||||||
|
|
||||||
|
public $timestamps = true;
|
||||||
|
|
||||||
public static function clearUserBanLogDuplicate()
|
public static function clearUserBanLogDuplicate()
|
||||||
{
|
{
|
||||||
$lists = UserBanLog::query()
|
$lists = UserBanLog::query()
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
namespace App\Repositories;
|
namespace App\Repositories;
|
||||||
|
|
||||||
use App\Enums\ModelEventEnum;
|
use App\Enums\ModelEventEnum;
|
||||||
use App\Enums\RedisKeysEnum;
|
|
||||||
use App\Exceptions\InsufficientPermissionException;
|
use App\Exceptions\InsufficientPermissionException;
|
||||||
use App\Exceptions\NexusException;
|
use App\Exceptions\NexusException;
|
||||||
use App\Http\Resources\ExamUserResource;
|
use App\Http\Resources\ExamUserResource;
|
||||||
@@ -29,7 +28,6 @@ use Illuminate\Database\Eloquent\Builder;
|
|||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Nexus\Database\NexusDB;
|
use Nexus\Database\NexusDB;
|
||||||
@@ -228,9 +226,9 @@ class UserRepository extends BaseRepository
|
|||||||
'operator' => $operator->id,
|
'operator' => $operator->id,
|
||||||
];
|
];
|
||||||
$modCommentText = sprintf("%s - Disable by %s, reason: %s.", now()->format('Y-m-d'), $operator->username, $reason);
|
$modCommentText = sprintf("%s - Disable by %s, reason: %s.", now()->format('Y-m-d'), $operator->username, $reason);
|
||||||
DB::transaction(function () use ($targetUser, $banLog, $modCommentText) {
|
NexusDB::transaction(function () use ($targetUser, $banLog, $modCommentText) {
|
||||||
$targetUser->updateWithModComment(['enabled' => User::ENABLED_NO], $modCommentText);
|
$targetUser->updateWithModComment(['enabled' => User::ENABLED_NO], $modCommentText);
|
||||||
UserBanLog::query()->insert($banLog);
|
UserBanLog::query()->create($banLog);
|
||||||
});
|
});
|
||||||
do_log("user: $uid, $modCommentText");
|
do_log("user: $uid, $modCommentText");
|
||||||
$this->clearCache($targetUser);
|
$this->clearCache($targetUser);
|
||||||
|
|||||||
@@ -2072,7 +2072,6 @@ function userlogin() {
|
|||||||
if (empty($row)) {
|
if (empty($row)) {
|
||||||
return $loginResult = false;
|
return $loginResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$row["passkey"]){
|
if (!$row["passkey"]){
|
||||||
$passkey = md5($row['username'].date("Y-m-d H:i:s").$row['passhash']);
|
$passkey = md5($row['username'].date("Y-m-d H:i:s").$row['passhash']);
|
||||||
sql_query("UPDATE users SET passkey = ".sqlesc($passkey)." WHERE id=" . sqlesc($row["id"]));
|
sql_query("UPDATE users SET passkey = ".sqlesc($passkey)." WHERE id=" . sqlesc($row["id"]));
|
||||||
@@ -2093,6 +2092,9 @@ function userlogin() {
|
|||||||
// error_reporting(E_ALL & ~E_NOTICE);
|
// error_reporting(E_ALL & ~E_NOTICE);
|
||||||
// error_reporting(-1);
|
// error_reporting(-1);
|
||||||
// }
|
// }
|
||||||
|
if ($row['enabled'] !== 'yes') {
|
||||||
|
|
||||||
|
}
|
||||||
return $loginResult = true;
|
return $loginResult = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3168,8 +3170,9 @@ function base64 ($string, $encode=true) {
|
|||||||
|
|
||||||
function loggedinorreturn($mainpage = false) {
|
function loggedinorreturn($mainpage = false) {
|
||||||
global $CURUSER,$BASEURL;
|
global $CURUSER,$BASEURL;
|
||||||
|
$script = nexus()->getScript();
|
||||||
if (!$CURUSER) {
|
if (!$CURUSER) {
|
||||||
if (nexus()->getScript() == 'ajax') {
|
if ($script == 'ajax') {
|
||||||
exit(fail('Not login!', $_POST));
|
exit(fail('Not login!', $_POST));
|
||||||
}
|
}
|
||||||
if ($mainpage) {
|
if ($mainpage) {
|
||||||
@@ -3181,7 +3184,9 @@ function loggedinorreturn($mainpage = false) {
|
|||||||
}
|
}
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
// do_log("[USER]: " . $CURUSER['id']);
|
if ($CURUSER['enabled'] != 'yes' && $script != 'self-enable') {
|
||||||
|
nexus_redirect('self-enable.php');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletetorrent($id, $notify = false) {
|
function deletetorrent($id, $notify = false) {
|
||||||
|
|||||||
@@ -1505,8 +1505,15 @@ function get_user_from_cookie(array $cookie, $isArray = true): array|\App\Models
|
|||||||
$tokenJson = $result['token_json'];
|
$tokenJson = $result['token_json'];
|
||||||
$signature = $result['signature'];
|
$signature = $result['signature'];
|
||||||
$log .= ", uid = $id";
|
$log .= ", uid = $id";
|
||||||
|
$isAjax = nexus()->isAjax();
|
||||||
|
//only in nexus web can self-enable
|
||||||
|
$shouldIgnoreEnabled = IN_NEXUS && !$isAjax;
|
||||||
if ($isArray) {
|
if ($isArray) {
|
||||||
$res = sql_query("SELECT * FROM users WHERE users.id = ".sqlesc($id)." AND users.enabled='yes' AND users.status = 'confirmed' LIMIT 1");
|
$whereStr = sprintf("id = %d and status = 'confirmed'", $id);
|
||||||
|
if (!$shouldIgnoreEnabled) {
|
||||||
|
$whereStr .= " and enabled = 'yes'";
|
||||||
|
}
|
||||||
|
$res = sql_query("SELECT * FROM users WHERE $whereStr LIMIT 1");
|
||||||
$row = mysql_fetch_array($res);
|
$row = mysql_fetch_array($res);
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
do_log("$log, user not exists");
|
do_log("$log, user not exists");
|
||||||
@@ -1520,7 +1527,11 @@ function get_user_from_cookie(array $cookie, $isArray = true): array|\App\Models
|
|||||||
do_log("$log, user not exists");
|
do_log("$log, user not exists");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$row->checkIsNormal();
|
$checkFields = ['status'];
|
||||||
|
if (!$shouldIgnoreEnabled) {
|
||||||
|
$checkFields[] = 'enabled';
|
||||||
|
}
|
||||||
|
$row->checkIsNormal($checkFields);
|
||||||
$authKey = $row->auth_key;
|
$authKey = $row->auth_key;
|
||||||
}
|
}
|
||||||
$expectedSignature = hash_hmac('sha256', $tokenJson, $authKey);
|
$expectedSignature = hash_hmac('sha256', $tokenJson, $authKey);
|
||||||
|
|||||||
@@ -826,6 +826,8 @@ $lang_settings = array
|
|||||||
'text_reward_bonus_options_note' => '种子详情页的魔力值奖励选项,多个用英文逗号分割',
|
'text_reward_bonus_options_note' => '种子详情页的魔力值奖励选项,多个用英文逗号分割',
|
||||||
'row_reward_times_limit' => '魔力奖励次数限制',
|
'row_reward_times_limit' => '魔力奖励次数限制',
|
||||||
'text_reward_times_limit_note' => '种子详情页的魔力奖励每人每天次数限制,设置为 0 不限制。默认:0',
|
'text_reward_times_limit_note' => '种子详情页的魔力奖励每人每天次数限制,设置为 0 不限制。默认:0',
|
||||||
|
'row_self_enable' => '自助解封',
|
||||||
|
'text_self_enable_note' => '个魔力值,如果他选择在被封禁 1 天内解封。封禁时长为 N 天,失去的魔力值将会是此值的 N 倍。',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -826,6 +826,8 @@ $lang_settings = array
|
|||||||
'text_reward_bonus_options_note' => '種子詳情頁的魔力值獎勵選項,多個用英文逗號分割',
|
'text_reward_bonus_options_note' => '種子詳情頁的魔力值獎勵選項,多個用英文逗號分割',
|
||||||
'row_reward_times_limit' => '魔力獎勵次數限制',
|
'row_reward_times_limit' => '魔力獎勵次數限制',
|
||||||
'text_reward_times_limit_note' => '種子詳情頁的魔力獎勵每人每天次數限制,設置爲 0 不限制。默認:0',
|
'text_reward_times_limit_note' => '種子詳情頁的魔力獎勵每人每天次數限制,設置爲 0 不限制。默認:0',
|
||||||
|
'row_self_enable' => '自助解封',
|
||||||
|
'text_self_enable_note' => '個魔力值,如果他選擇在被封禁 1 天內解封。封禁時長為 N 天,失去的魔力值將會是此值的 N 倍。',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -826,6 +826,8 @@ $lang_settings = array
|
|||||||
'text_reward_bonus_options_note' => 'Reward bonus options on the torrent details page, multiple options separated by commas',
|
'text_reward_bonus_options_note' => 'Reward bonus options on the torrent details page, multiple options separated by commas',
|
||||||
'row_reward_times_limit' => 'Reward Frequency Limit',
|
'row_reward_times_limit' => 'Reward Frequency Limit',
|
||||||
'text_reward_times_limit_note' => 'Daily limit per user for bonus rewards on seed detail pages. Set to 0 for no limit. Default: 0',
|
'text_reward_times_limit_note' => 'Daily limit per user for bonus rewards on seed detail pages. Set to 0 for no limit. Default: 0',
|
||||||
|
'row_self_enable' => 'Self-service unblocking',
|
||||||
|
'text_self_enable_note' => 'points. If he chooses to unblock within 1 day of being banned. If the ban duration is N days, the lost mana points will be N times this value.',
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -176,6 +176,22 @@ final class Nexus
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isAjax(): bool
|
||||||
|
{
|
||||||
|
if ($this->getScript() == 'ajax') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$ajax = $this->retrieveFromServer(['HTTP_X_REQUESTED_WITH'], true);
|
||||||
|
if (!empty($ajax) && strtolower($ajax) == 'xmlhttprequest') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$json = $this->retrieveFromServer(['HTTP_ACCEPT'], true);
|
||||||
|
if (!empty($json) && strtolower($json) == 'application/json') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private function generateRequestId(): string
|
private function generateRequestId(): string
|
||||||
{
|
{
|
||||||
$prefix = ($_SERVER['SCRIPT_FILENAME'] ?? '') . implode('', $_SERVER['argv'] ?? []);
|
$prefix = ($_SERVER['SCRIPT_FILENAME'] ?? '') . implode('', $_SERVER['argv'] ?? []);
|
||||||
@@ -426,4 +442,6 @@ final class Nexus
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
62
public/self-enable.php
Normal file
62
public/self-enable.php
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
require_once("../include/bittorrent.php");
|
||||||
|
dbconn();
|
||||||
|
loggedinorreturn();
|
||||||
|
parked();
|
||||||
|
\Nexus\Nexus::css('#ban-info td {border: none}', 'header', false);
|
||||||
|
|
||||||
|
$title = nexus_trans('self-enable.title');
|
||||||
|
stdhead($title);
|
||||||
|
begin_main_frame();
|
||||||
|
begin_frame($title, true,10,"100%","center");
|
||||||
|
|
||||||
|
|
||||||
|
if ($CURUSER['enabled'] == 'yes') {
|
||||||
|
printf('<h3>%s</h3>', nexus_trans('self-enable.enable_status_normal'));
|
||||||
|
} else {
|
||||||
|
$latestBanLog = \App\Models\UserBanLog::query()
|
||||||
|
->where('uid', $CURUSER['id'])
|
||||||
|
->orderBy('id', 'desc')
|
||||||
|
->first();
|
||||||
|
if (!$latestBanLog) {
|
||||||
|
printf('<h3>%s</h3>', nexus_trans('self-enable.no_ban_info'));
|
||||||
|
} else {
|
||||||
|
$unit = \App\Models\Setting::getSelfEnableBonus();
|
||||||
|
$elapsedDay = ceil((time() - $latestBanLog->created_at->getTimestamp()) / 86400);
|
||||||
|
$total = $unit * $elapsedDay;
|
||||||
|
$isUserBonusEnough = $CURUSER['seedbonus'] >= $total;
|
||||||
|
$userBonusNotEnoughTip = nexus_trans('self-enable.bonus_not_enough', ['bonus' => $CURUSER['seedbonus']]);
|
||||||
|
if (!empty($_POST['submit'])) {
|
||||||
|
if (!$isUserBonusEnough) {
|
||||||
|
stdmsg('Error', $userBonusNotEnoughTip);
|
||||||
|
} else {
|
||||||
|
$userRep = new \App\Repositories\UserRepository();
|
||||||
|
$bonusRep = new \App\Repositories\BonusRepository();
|
||||||
|
$operator = \App\Models\User::query()->find($CURUSER['id']);
|
||||||
|
$bonusRep->consumeUserBonus($CURUSER['id'], $total, \App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE, $title);
|
||||||
|
$userRep->enableUser($operator, $CURUSER['id'], $title);
|
||||||
|
nexus_redirect('index.php');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
printf('<h3>%s</h3>', nexus_trans('self-enable.latest_ban_info'));
|
||||||
|
printf('<table id="ban-info" border="1" cellpadding="5" cellspacing="0"><tbody>');
|
||||||
|
printf('<tr><th>UID:</th><td>%s</td></tr>', $latestBanLog->uid);
|
||||||
|
printf('<tr><th>Username:</th><td>%s</td></tr>', $latestBanLog->username);
|
||||||
|
printf('<tr><th>Reason:</th><td>%s</td></tr>', $latestBanLog->reason);
|
||||||
|
printf('<tr><th>CreatedAt:</th><td>%s</td></tr>', $latestBanLog->created_at);
|
||||||
|
printf('</tbody></table>');
|
||||||
|
printf('<p>%s</p>', nexus_trans('self-enable.deduct_bonus_per_day', ['unit' => number_format($unit)]));
|
||||||
|
printf('<p>%s</p>', nexus_trans('self-enable.deduct_bonus_total', ['days' => number_format($elapsedDay), 'total' => number_format($total)]));
|
||||||
|
if ($isUserBonusEnough) {
|
||||||
|
printf('<p>%s</p>', nexus_trans('self-enable.enable_desc'));
|
||||||
|
printf('<form method="post"><input type="hidden" name="submit" value="1"><input type="submit" value="%s"></form>', nexus_trans('self-enable.enable_button'));
|
||||||
|
} else {
|
||||||
|
printf('<p>%s</p>', $userBonusNotEnoughTip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_frame();
|
||||||
|
end_main_frame();
|
||||||
|
stdfoot();
|
||||||
|
?>
|
||||||
@@ -99,7 +99,7 @@ elseif ($action == 'savesettings_bonus') // save bonus
|
|||||||
'tengbupload', 'ratiolimit','dlamountlimit','oneinvite','customtitle','vipstatus','bonusgift', 'basictax', 'taxpercentage',
|
'tengbupload', 'ratiolimit','dlamountlimit','oneinvite','customtitle','vipstatus','bonusgift', 'basictax', 'taxpercentage',
|
||||||
'prolinkpoint', 'prolinktime', 'attendance_initial', 'attendance_step', 'attendance_max', 'cancel_hr', 'attendance_card',
|
'prolinkpoint', 'prolinktime', 'attendance_initial', 'attendance_step', 'attendance_max', 'cancel_hr', 'attendance_card',
|
||||||
'harem_addition', 'hundredgbupload', 'tengbdownload', 'hundredgbdownload', 'official_addition', 'official_tag', 'zero_bonus_tag', 'zero_bonus_factor',
|
'harem_addition', 'hundredgbupload', 'tengbdownload', 'hundredgbdownload', 'official_addition', 'official_tag', 'zero_bonus_tag', 'zero_bonus_factor',
|
||||||
'one_tmp_invite', 'rainbow_id', 'change_username_card', 'min_size'
|
'one_tmp_invite', 'rainbow_id', 'change_username_card', 'min_size', 'self_enable'
|
||||||
);
|
);
|
||||||
GetVar($validConfig);
|
GetVar($validConfig);
|
||||||
$BONUS = [];
|
$BONUS = [];
|
||||||
@@ -630,6 +630,7 @@ elseif ($action == 'bonussettings'){
|
|||||||
tr($lang_settings['row_attendance_card'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=attendance_card value='".(isset($BONUS["attendance_card"]) ? $BONUS["attendance_card"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_ATTENDANCE_CARD )."'>".$lang_settings['text_attendance_card_note'], 1);
|
tr($lang_settings['row_attendance_card'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=attendance_card value='".(isset($BONUS["attendance_card"]) ? $BONUS["attendance_card"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_ATTENDANCE_CARD )."'>".$lang_settings['text_attendance_card_note'], 1);
|
||||||
tr($lang_settings['row_buy_rainbow_id'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=rainbow_id value='".(isset($BONUS["rainbow_id"]) ? $BONUS["rainbow_id"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_RAINBOW_ID )."'>".$lang_settings['text_buy_rainbow_id_note'], 1);
|
tr($lang_settings['row_buy_rainbow_id'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=rainbow_id value='".(isset($BONUS["rainbow_id"]) ? $BONUS["rainbow_id"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_RAINBOW_ID )."'>".$lang_settings['text_buy_rainbow_id_note'], 1);
|
||||||
tr($lang_settings['row_buy_change_username_card'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=change_username_card value='".(isset($BONUS["change_username_card"]) ? $BONUS["change_username_card"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_CHANGE_USERNAME_CARD )."'>".$lang_settings['text_buy_change_username_card_note'], 1);
|
tr($lang_settings['row_buy_change_username_card'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=change_username_card value='".(isset($BONUS["change_username_card"]) ? $BONUS["change_username_card"] : \App\Models\BonusLogs::DEFAULT_BONUS_BUY_CHANGE_USERNAME_CARD )."'>".$lang_settings['text_buy_change_username_card_note'], 1);
|
||||||
|
tr($lang_settings['row_self_enable'],$lang_settings['text_it_costs_user']."<input type='text' style=\"width: 50px\" name=self_enable value='".(isset($BONUS["self_enable"]) ? $BONUS["self_enable"] : \App\Models\BonusLogs::DEFAULT_BONUS_SELF_ENABLE )."'>".$lang_settings['text_self_enable_note'], 1);
|
||||||
|
|
||||||
|
|
||||||
echo '<tr><td colspan="2" align="center"><b>' . $lang_settings['text_attendance_get_bonus'] . '</b></td></tr>';
|
echo '<tr><td colspan="2" align="center"><b>' . $lang_settings['text_attendance_get_bonus'] . '</b></td></tr>';
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ if (!$row)
|
|||||||
failedlogins();
|
failedlogins();
|
||||||
if ($row['status'] == 'pending')
|
if ($row['status'] == 'pending')
|
||||||
failedlogins($lang_takelogin['std_user_account_unconfirmed']);
|
failedlogins($lang_takelogin['std_user_account_unconfirmed']);
|
||||||
if ($row["enabled"] == "no")
|
//if ($row["enabled"] == "no")
|
||||||
bark($lang_takelogin['std_account_disabled']);
|
// bark($lang_takelogin['std_account_disabled']);
|
||||||
|
|
||||||
if (!empty($row['two_step_secret'])) {
|
if (!empty($row['two_step_secret'])) {
|
||||||
if (empty($_POST['two_step_code'])) {
|
if (empty($_POST['two_step_code'])) {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ return [
|
|||||||
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => 'Task unfinished deduct',
|
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => 'Task unfinished deduct',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => 'Reward torrent',
|
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => 'Reward torrent',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => 'Claimed torrent unreached',
|
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => 'Claimed torrent unreached',
|
||||||
|
\App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE => 'Self enable',
|
||||||
|
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => 'Role work salary',
|
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => 'Role work salary',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => 'Torrent be downloaded',
|
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => 'Torrent be downloaded',
|
||||||
|
|||||||
13
resources/lang/en/self-enable.php
Normal file
13
resources/lang/en/self-enable.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'title' => 'Self-service unblocking',
|
||||||
|
'enable_status_normal' => 'Your account status is normal, no self-service unblocking is required.',
|
||||||
|
'no_ban_info' => 'Your ban information cannot be found, self-service unblocking is not possible, please contact the administrator.',
|
||||||
|
'bonus_not_enough' => 'You currently only have :bonus bonus, self-service unblocking is not possible, please contact the administrator.',
|
||||||
|
'latest_ban_info' => 'Your latest ban information is as follows:',
|
||||||
|
'deduct_bonus_per_day' => 'Each ban day (less than 1 day is counted as 1 day) requires deducting :unit bonus.',
|
||||||
|
'deduct_bonus_total' => 'Currently banned for :days days, total bonus to be deducted :total',
|
||||||
|
'enable_desc' => 'If you need to unblock, click the button below, the corresponding bonus points will be deducted and the account will return to normal.',
|
||||||
|
'enable_button' => 'Click to unblock',
|
||||||
|
];
|
||||||
@@ -25,6 +25,7 @@ return [
|
|||||||
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => '任务未完成扣除',
|
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => '任务未完成扣除',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => '奖励种子',
|
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => '奖励种子',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => '认领种子未达标扣除',
|
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => '认领种子未达标扣除',
|
||||||
|
\App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE => '自助解封',
|
||||||
|
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => '工作组工资',
|
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => '工作组工资',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '种子被下载',
|
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '种子被下载',
|
||||||
|
|||||||
13
resources/lang/zh_CN/self-enable.php
Normal file
13
resources/lang/zh_CN/self-enable.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'title' => '自助解封',
|
||||||
|
'enable_status_normal' => '你的账号状态是正常的,无需自助解封。',
|
||||||
|
'no_ban_info' => '找不到你的封禁信息,无法自助解封,请联系管理员。',
|
||||||
|
'bonus_not_enough' => '你目前仅有魔力 :bonus, 无法自助解封,请联系管理员。',
|
||||||
|
'latest_ban_info' => '你的最新封禁信息如下:',
|
||||||
|
'deduct_bonus_per_day' => '每封禁 1 天(不足 1 天按 1 天算)需扣除魔力 :unit',
|
||||||
|
'deduct_bonus_total' => '当前已封禁 :days 天,共需扣除魔力 :total',
|
||||||
|
'enable_desc' => '若需要解封,点击下面按钮,扣除相应魔力后账号即恢复正常。',
|
||||||
|
'enable_button' => '点我解封',
|
||||||
|
];
|
||||||
@@ -25,6 +25,7 @@ return [
|
|||||||
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => '任務未完成扣除',
|
\App\Models\BonusLogs::BUSINESS_TYPE_TASK_NOT_PASS_DEDUCT => '任務未完成扣除',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => '獎勵種子',
|
\App\Models\BonusLogs::BUSINESS_TYPE_REWARD_TORRENT => '獎勵種子',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => '認領種子未達標扣除',
|
\App\Models\BonusLogs::BUSINESS_TYPE_CLAIMED_UNREACHED => '認領種子未達標扣除',
|
||||||
|
\App\Models\BonusLogs::BUSINESS_TYPE_SELF_ENABLE => '自助解封',
|
||||||
|
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => '工作組工資',
|
\App\Models\BonusLogs::BUSINESS_TYPE_ROLE_WORK_SALARY => '工作組工資',
|
||||||
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '種子被下載',
|
\App\Models\BonusLogs::BUSINESS_TYPE_TORRENT_BE_DOWNLOADED => '種子被下載',
|
||||||
|
|||||||
13
resources/lang/zh_TW/self-enable.php
Normal file
13
resources/lang/zh_TW/self-enable.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'title' => '自助解封',
|
||||||
|
'enable_status_normal' => '妳的賬號狀態是正常的,無需自助解封。',
|
||||||
|
'no_ban_info' => '找不到妳的封禁信息,無法自助解封,請聯系管理員。',
|
||||||
|
'bonus_not_enough' => '妳目前僅有魔力 :bonus, 無法自助解封,請聯系管理員。',
|
||||||
|
'latest_ban_info' => '妳的最新封禁信息如下:',
|
||||||
|
'deduct_bonus_per_day' => '每封禁 1 天(不足 1 天按 1 天算)需扣除魔力 :unit',
|
||||||
|
'deduct_bonus_total' => '當前已封禁 :days 天,共需扣除魔力 :total',
|
||||||
|
'enable_desc' => '若需要解封,點擊下面按鈕,扣除相應魔力後賬號即恢復正常。',
|
||||||
|
'enable_button' => '點我解封',
|
||||||
|
];
|
||||||
Reference in New Issue
Block a user