From 4e9ea68a5dac9cb0544b41b765cca700985d34be Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 18 Feb 2026 15:50:40 +0000 Subject: [PATCH] jiaoyisuo --- admin/layout.php | 114 +++++++++++++++++++++++++++----------------- admin/users.php | 24 ++++++++-- includes/footer.php | 26 +++++++--- includes/header.php | 4 +- includes/lang.php | 16 ++++++- install.sql | 3 +- profile.php | 12 ++++- 7 files changed, 138 insertions(+), 61 deletions(-) diff --git a/admin/layout.php b/admin/layout.php index 9e3d376..fb18bb6 100644 --- a/admin/layout.php +++ b/admin/layout.php @@ -3,6 +3,9 @@ require_once __DIR__ . '/../db/config.php'; require_once __DIR__ . '/../includes/lang.php'; if (session_status() === PHP_SESSION_NONE) session_start(); +// Force admin to be Chinese +$lang = 'zh'; + // Admin check $admin = null; if (isset($_SESSION['admin_id'])) { @@ -150,8 +153,12 @@ function renderAdminPage($content, $title = '后台管理') {
- + + + + + @@ -159,35 +166,14 @@ function renderAdminPage($content, $title = '后台管理') { + - - - - - - - 0 - - - - - - - - - - 0 - - - - 0 - - - - 0 + + + @@ -195,18 +181,71 @@ function renderAdminPage($content, $title = '后台管理') { + + + + + 0 + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + 0 + + + + - - - + + + + + + + + + + + + + + + 0 - + + + + + - + + + +
@@ -215,19 +254,6 @@ function renderAdminPage($content, $title = '后台管理') {
-
欢迎您,
diff --git a/admin/users.php b/admin/users.php index 04f654a..a2729ae 100644 --- a/admin/users.php +++ b/admin/users.php @@ -91,9 +91,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { $win_loss = (int)$_POST['win_loss_control']; $remark = $_POST['remark']; $email = $_POST['email']; + $vip_level = (int)$_POST['vip_level']; - $sql = "UPDATE users SET credit_score = ?, status = ?, win_loss_control = ?, remark = ?, email = ?"; - $params = [$credit_score, $status, $win_loss, $remark, $email]; + $sql = "UPDATE users SET credit_score = ?, status = ?, win_loss_control = ?, remark = ?, email = ?, vip_level = ?"; + $params = [$credit_score, $status, $win_loss, $remark, $email, $vip_level]; if (!$admin['is_agent'] && isset($_POST['agent_id'])) { $sql .= ", agent_id = ?"; @@ -178,7 +179,7 @@ ob_start(); UID - 用户名 + 用户名 / VIP 所属代理 注册IP 身份证信息 @@ -209,7 +210,7 @@ ob_start(); -
+
VIP
@@ -380,6 +381,20 @@ ob_start();
+
+ + +
@@ -427,6 +442,7 @@ function editUser(user) { document.getElementById('edit_credit_score').value = user.credit_score; document.getElementById('edit_status').value = user.status; document.getElementById('edit_win_loss').value = user.win_loss_control; + document.getElementById('edit_vip_level').value = user.vip_level || 0; document.getElementById('edit_remark').value = user.remark || ''; if (document.getElementById('edit_agent_id_select')) { document.getElementById('edit_agent_id_select').value = user.agent_id || ''; diff --git a/includes/footer.php b/includes/footer.php index c720bc1..509f3a3 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -137,13 +137,25 @@ +
- + + +
+ + +
+
+ + +
@@ -164,7 +176,7 @@ 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.5); opacity: 0; } } -#cs-toggle:hover { +#cs-toggle:hover, #cs-widget a:hover { transform: scale(1.1) rotate(5deg); box-shadow: 0 10px 25px rgba(0, 98, 255, 0.4) !important; } diff --git a/includes/header.php b/includes/header.php index 62fd21e..ca2fd33 100644 --- a/includes/header.php +++ b/includes/header.php @@ -24,8 +24,8 @@ if (!function_exists('getSetting')) { <?= $site_name ?> | <?= __('site_title') ?> diff --git a/includes/lang.php b/includes/lang.php index 19c20f3..da08b5e 100644 --- a/includes/lang.php +++ b/includes/lang.php @@ -281,7 +281,7 @@ $translations = [ 'mission_content' => '让数字资产交易对每个人、每个地方都变得触手可及、安全且直观。我们相信区块链的力量能够改变全球金融格局。', 'global_presence' => '全球业务', 'presence_content' => 'BYRO在新加坡、伦敦和东京设有办事处,服务于多元化的全球社区。我们符合国际标准,并优先考虑用户资产的安全。', - 'users' => '用户', + 'users' => '用户管理', 'countries' => '国家', 'daily_volume' => '每日交易量', 'about_content' => 'BYRO是成立于 2023 年的全球领先数字货币交易所。', @@ -491,6 +491,20 @@ $translations = [ 'mxn_name' => '墨西哥比索', 'php_name' => '菲律宾比索', 'idr_name' => '印尼盾', + 'platform_home' => '平台首页', + 'admin_panel' => '超级管理后台', + 'agent_panel' => '代理管理后台', + 'finance_management' => '充提管理', + 'finance_details' => '财务明细', + 'sec_contract_management' => '秒合约管理', + 'contract_trading' => '合约交易', + 'spot_trading' => '现货交易', + 'exchange_management' => '兑换管理', + 'mining_management' => '挖矿管理', + 'ai_control' => 'AI控盘', + 'backend_settings' => '后台设置', + 'personal_settings' => '个人设置', + 'agents' => '代理管理', ], 'en' => [ 'home' => 'Home', diff --git a/install.sql b/install.sql index ef66cdc..3afab31 100644 --- a/install.sql +++ b/install.sql @@ -507,6 +507,7 @@ CREATE TABLE `users` ( `credit_score` int(11) DEFAULT 80, `real_name_status` int(11) DEFAULT 0, `role` varchar(20) DEFAULT 'user', + `vip_level` int(11) DEFAULT 0, `total_recharge` decimal(16,4) DEFAULT 0.0000, `transaction_password` varchar(255) DEFAULT NULL, `kyc_name` varchar(100) DEFAULT NULL, @@ -535,7 +536,7 @@ CREATE TABLE `users` ( LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; INSERT INTO `users` VALUES -(2,'ahao8988998','ahao8988@gmail.com','$2y$10$tdT4vIgddq1kh2isoBRIPe4goiZ3X1cbf2l6vtButmyZx71xP527q','2026-02-18 02:56:51','05617613',80,0,'user',0.0000,NULL,'张世豪','123456789','uploads/kyc/2_front_1771391536.jpg','uploads/kyc/2_back_1771391536.jpg','uploads/kyc/2_handheld_1771391536.jpg',2,NULL,'normal',1,'',NULL,NULL); +(2,'ahao8988998','ahao8988@gmail.com','$2y$10$tdT4vIgddq1kh2isoBRIPe4goiZ3X1cbf2l6vtButmyZx71xP527q','2026-02-18 02:56:51','05617613',80,0,'user',0,0.0000,NULL,'张世豪','123456789','uploads/kyc/2_front_1771391536.jpg','uploads/kyc/2_back_1771391536.jpg','uploads/kyc/2_handheld_1771391536.jpg',2,NULL,'normal',1,'',NULL,NULL); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/profile.php b/profile.php index 2ad1302..f6dab19 100644 --- a/profile.php +++ b/profile.php @@ -60,7 +60,10 @@ function getCoinPrice($symbol) { return $prices[strtoupper($symbol)] ?? 1.00; } -function getVipLevel($totalRecharge) { +// Use the VIP level from the database column as the source of truth +$vipLevel = $userData['vip_level'] ?? 0; + +function getAutoVipLevel($totalRecharge) { if ($totalRecharge >= 10000000) return 7; if ($totalRecharge >= 5000000) return 6; if ($totalRecharge >= 1000000) return 5; @@ -71,7 +74,12 @@ function getVipLevel($totalRecharge) { return 0; } -$vipLevel = getVipLevel($userData['total_recharge'] ?? 0); +// If the database VIP level is 0, we can optionally fall back to calculation, +// but since the admin can now set it to any level, we should respect the database. +// However, to keep it "automatic" for new users, we can do: +if ($vipLevel == 0) { + $vipLevel = getAutoVipLevel($userData['total_recharge'] ?? 0); +} // Fetch transactions $stmt = db()->prepare("SELECT * FROM transactions WHERE user_id = ? ORDER BY created_at DESC LIMIT 50");