From c6e1a23d69fddc75d57c4b070d52e7541a291fc9 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 18 Feb 2026 09:17:22 +0000 Subject: [PATCH] Autosave: 20260218-091722 --- admin/backend_settings.php | 2 +- admin/binary.php | 16 ++- admin/customer_service.php | 4 +- admin/finance.php | 13 +- admin/kyc.php | 29 +++++ admin/layout.php | 125 ++++++++++++++++--- admin/users.php | 5 + api/admin_notifications.php | 82 ++++++++---- api/binary.php | 2 +- api/chat.php | 32 ++++- api/finance.php | 16 ++- assets/css/style.css | 90 +++++++++++++- assets/css/terminal.css | 80 +++++++++++- assets/images/logo.png | Bin 0 -> 1260309 bytes assets/images/logo_custom.png | Bin 0 -> 1186434 bytes assets/pasted-20260218-075920-f55ca6ff.png | Bin 0 -> 7782 bytes assets/pasted-20260218-082009-bc12c708.png | Bin 0 -> 1260309 bytes assets/pasted-20260218-082948-e6b4ae29.png | Bin 0 -> 1186434 bytes assets/pasted-20260218-084447-aec369d3.png | Bin 0 -> 79439 bytes auth/login.php | 2 +- auth/register.php | 27 ++-- cookie-policy.php | 39 ++++++ favicon.ico | Bin 0 -> 1186434 bytes includes/footer.php | 60 ++++++--- includes/header.php | 2 +- includes/lang.php | 86 ++++++++++++- includes/terminal_layout.php | 138 +++++++++++---------- index.php | 27 ++++ profile.php | 48 ++++--- recharge.php | 56 ++++----- withdraw.php | 28 ++--- 31 files changed, 792 insertions(+), 217 deletions(-) create mode 100644 assets/images/logo.png create mode 100644 assets/images/logo_custom.png create mode 100644 assets/pasted-20260218-075920-f55ca6ff.png create mode 100644 assets/pasted-20260218-082009-bc12c708.png create mode 100644 assets/pasted-20260218-082948-e6b4ae29.png create mode 100644 assets/pasted-20260218-084447-aec369d3.png create mode 100644 cookie-policy.php create mode 100644 favicon.ico diff --git a/admin/backend_settings.php b/admin/backend_settings.php index bae5fc6..6ff73fc 100644 --- a/admin/backend_settings.php +++ b/admin/backend_settings.php @@ -137,7 +137,7 @@ ob_start();
-
+
使用说明
  • 网站名称:影响浏览器标签页标题。
  • diff --git a/admin/binary.php b/admin/binary.php index 90720af..17d87c6 100644 --- a/admin/binary.php +++ b/admin/binary.php @@ -17,7 +17,16 @@ try { $expired = $stmt->fetchAll(); foreach ($expired as $o) { $result = ($o['control_status'] == 1 || $o['user_control'] == 1) ? 'won' : (($o['control_status'] == 2 || $o['user_control'] == 2) ? 'lost' : ((rand(0, 100) > 50) ? 'won' : 'lost')); - $db->prepare("UPDATE binary_orders SET status = ?, settled_at = NOW() WHERE id = ?")->execute([$result, $o['id']]); + + // Get a dummy close price if we don't have one (should match the result) + $close_price = $o['entry_price']; + if ($result === 'won') { + $close_price = ($o['direction'] === 'up' || $o['direction'] === 'buy') ? $o['entry_price'] * 1.01 : $o['entry_price'] * 0.99; + } else { + $close_price = ($o['direction'] === 'up' || $o['direction'] === 'buy') ? $o['entry_price'] * 0.99 : $o['entry_price'] * 1.01; + } + + $db->prepare("UPDATE binary_orders SET status = ?, close_price = ?, end_at = NOW() WHERE id = ?")->execute([$result, $close_price, $o['id']]); if ($result === 'won') { $win_amount = $o['amount'] + ($o['amount'] * $o['profit_rate'] / 100); $db->prepare("UPDATE user_balances SET available = available + ? WHERE user_id = ? AND symbol = 'USDT'")->execute([$win_amount, $o['user_id']]); @@ -70,6 +79,11 @@ $orders = $stmt->fetchAll();
+
+
管理提示
+

在此页面您可以实时监控用户的秒合约订单。对于进行中的订单,您可以手动设置“控赢”或“控亏”来干预交易结果。订单到期后系统会自动根据设置或市场价进行结算。

+
+
控制状态已更新!
diff --git a/admin/customer_service.php b/admin/customer_service.php index eea001c..1603b6b 100644 --- a/admin/customer_service.php +++ b/admin/customer_service.php @@ -162,8 +162,8 @@ document.getElementById('chat-form').addEventListener('submit', async (e) => { fetchMessages(); }); -setInterval(refreshUsers, 5000); -setInterval(fetchMessages, 2000); +setInterval(refreshUsers, 3000); +setInterval(fetchMessages, 1000); refreshUsers(); diff --git a/admin/finance.php b/admin/finance.php index 209549f..006692e 100644 --- a/admin/finance.php +++ b/admin/finance.php @@ -48,6 +48,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { ->execute([$req['user_id'], $req['amount'], $req['symbol']]); } + // If withdrawal, update transaction status + if ($req['type'] === 'withdrawal') { + $db->prepare("UPDATE transactions SET status = 'completed' WHERE user_id = ? AND type = 'withdrawal' AND amount = ? AND symbol = ? AND status = 'pending' ORDER BY created_at DESC LIMIT 1") + ->execute([$req['user_id'], $req['amount'], $req['symbol']]); + } + $db->commit(); header("Location: finance.php?msg=approved"); } catch (Exception $e) { @@ -69,7 +75,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { $db->prepare("UPDATE user_balances SET available = available + ? WHERE user_id = ? AND symbol = ?") ->execute([$req['amount'], $req['user_id'], $req['symbol']]); - $db->prepare("INSERT INTO transactions (user_id, type, amount, symbol, status) VALUES (?, 'withdrawal_refund', ?, ?, 'completed')") + $db->prepare("UPDATE transactions SET status = 'rejected' WHERE user_id = ? AND type = 'withdrawal' AND amount = ? AND symbol = ? AND status = 'pending' ORDER BY created_at DESC LIMIT 1") ->execute([$req['user_id'], $req['amount'], $req['symbol']]); } @@ -119,6 +125,11 @@ $requests = $stmt->fetchAll();
+
+
充提管理说明
+

在此页面您可以审核用户的充值和提现申请。通过充值申请会自动增加用户余额;通过提现申请则完成资产扣除;拒绝提现申请会自动退回冻结金额。

+
+
操作成功!
diff --git a/admin/kyc.php b/admin/kyc.php index 181cb35..8a4d1bd 100644 --- a/admin/kyc.php +++ b/admin/kyc.php @@ -74,6 +74,11 @@ if ($user_id) { +
+
实名审核说明
+

在此页面您可以审核用户的实名认证申请。请仔细对比用户提交的证件照片和填写的身份信息。审核通过后用户将获得认证标识。

+
+
操作成功!
@@ -165,6 +170,30 @@ if ($user_id) { + + +
diff --git a/profile.php b/profile.php index 1bd715c..c4cc313 100644 --- a/profile.php +++ b/profile.php @@ -228,12 +228,20 @@ $kycStatusColor = [ - - - - + + + + +
+ + +
+ + @@ -247,31 +255,37 @@ $kycStatusColor = [ $typeColor = 'text-primary'; $typeName = __($t['type']); - if (strpos($t['type'], 'win') !== false || $t['type'] === 'deposit' || $t['type'] === 'binary_win') $typeColor = 'text-success'; - elseif (strpos($t['type'], 'loss') !== false || $t['type'] === 'withdraw' || $t['type'] === 'binary_loss') $typeColor = 'text-danger'; + if (strpos($t['type'], 'win') !== false || $t['type'] === 'deposit' || $t['type'] === 'binary_win' || $t['type'] === 'recharge') $typeColor = 'text-success'; + elseif (strpos($t['type'], 'loss') !== false || $t['type'] === 'withdraw' || $t['type'] === 'withdrawal' || $t['type'] === 'binary_loss') $typeColor = 'text-danger'; elseif ($t['type'] === 'flash_exchange') $typeColor = 'text-info'; elseif ($t['type'] === 'contract_settle') $typeColor = 'text-info'; $prefix = ''; - if ($t['type'] === 'binary_win' || $t['type'] === 'deposit' || $t['type'] === 'contract_settle') $prefix = '+'; - if ($t['type'] === 'binary_loss' || $t['type'] === 'withdraw' || $t['type'] === 'contract_margin') $prefix = '-'; + if ($t['type'] === 'binary_win' || $t['type'] === 'deposit' || $t['type'] === 'recharge' || $t['type'] === 'contract_settle') $prefix = '+'; + if ($t['type'] === 'binary_loss' || $t['type'] === 'withdraw' || $t['type'] === 'withdrawal' || $t['type'] === 'contract_margin') $prefix = '-'; + + $statusText = __('pending') ?? '处理中'; + $statusClass = 'bg-warning text-warning'; + if ($t['status'] === 'completed' || $t['status'] === 'approved') { + $statusText = __('approved') ?? '通过'; + $statusClass = 'bg-success text-success'; + } elseif ($t['status'] === 'rejected') { + $statusText = __('rejected') ?? '拒绝'; + $statusClass = 'bg-danger text-danger'; + } ?> - - - - diff --git a/recharge.php b/recharge.php index 00dd3ed..78d2390 100644 --- a/recharge.php +++ b/recharge.php @@ -151,38 +151,38 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
-
- 1 - 选择充值方式(法币或加密货币) -
-
- 2 - 填写金额或复制充值地址 -
-
- 3 - 完成支付后点击确认提交 -
-
- 4 - 等待客服核实,资金通常在2-5分钟内到账 +
+ 1 + +
+
+ 2 + +
+
+ 3 + +
+
+ 4 + +
- -
-
-
-
-
-
    -
  • 请勿向任何非官方提供的地址充值
  • -
  • 充值前请仔细核对主网协议(如 TRC20/ERC20)
  • -
  • 请保管好您的支付凭证,以便在需要时提供给客服
  • -
  • 平台绝不会要求您在非官方页面输入支付密码
  • -
-
+
+
+
+
+
+
    +
  • +
  • +
  • +
  • +
+
diff --git a/withdraw.php b/withdraw.php index 39d5e3a..7a6557c 100644 --- a/withdraw.php +++ b/withdraw.php @@ -68,7 +68,7 @@ $available = $bal['available'] ?? 0;
- +
@@ -77,19 +77,19 @@ $available = $bal['available'] ?? 0; : USDT
- +
- +
- 手续费 (Fee) + (Fee) 1.00 USDT
@@ -131,14 +131,14 @@ $available = $bal['available'] ?? 0; : USDT
- +
- +
@@ -170,19 +170,19 @@ $available = $bal['available'] ?? 0;
1 - 选择提现方式(加密货币或法币) +
2 - 填写提现地址/选择币种并输入金额 +
3 - 输入提现密码(默认123456) +
4 - 确认后提交审核,预计10-30分钟内处理 +
@@ -194,10 +194,10 @@ $available = $bal['available'] ?? 0;
    -
  • 提现前请务必确认地址正确,转错将无法找回
  • -
  • 为了您的资金安全,大额提现可能需要人工电话核实
  • -
  • 请确保提现主网与接收端主网一致(如均为 TRC20)
  • -
  • 严禁参与任何非法洗钱活动,平台将配合监管部门调查
  • +
  • +
  • +
  • +
+ + - - - - - + + +