diff --git a/assets/css/terminal.css b/assets/css/terminal.css index cd84221..f7ce835 100644 --- a/assets/css/terminal.css +++ b/assets/css/terminal.css @@ -7,7 +7,7 @@ --term-primary: #0062ff; --term-success: #26a69a; --term-danger: #ef5350; - --header-height: 60px; + --header-height: 70px; --sidebar-width: 280px; --orderbook-width: 300px; } @@ -364,65 +364,216 @@ display: none; } -/* Binary Order Panel */ +/* Binary Order Panel Improvements */ .cycle-grid { display: grid; grid-template-columns: repeat(5, 1fr); - gap: 1px; - background: var(--term-border); - border: 1px solid var(--term-border); - border-radius: 4px; - overflow: hidden; + gap: 8px; + background: transparent; + border: none; + padding: 0; + margin-bottom: 20px; } .cycle-btn { - background: var(--term-bg); - border: none; + background: #1e2329; + border: 1px solid var(--term-border); color: var(--term-muted); - padding: 12px 5px; + padding: 10px 4px; font-size: 11px; - font-weight: 600; - transition: all 0.2s; + font-weight: 700; + border-radius: 8px; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 2px; } .cycle-btn:hover { - background: rgba(255,255,255,0.05); - color: var(--term-text); + background: #2b3139; + border-color: var(--term-primary); + color: #fff; + transform: translateY(-2px); } .cycle-btn.active { - background: var(--term-primary); + background: linear-gradient(135deg, var(--term-primary), #004ecc); + border-color: var(--term-primary); + color: #fff; + box-shadow: 0 4px 15px rgba(0, 98, 255, 0.3); +} + +.cycle-btn .cycle-time { font-size: 13px; } +.cycle-btn .cycle-profit { font-size: 10px; opacity: 0.8; } + +.amount-input-wrapper input { + height: 44px; + font-size: 16px; + font-weight: 700; + text-align: center; + border-radius: 8px; + background: #0b0e11 !important; + border: 1px solid var(--term-border) !important; + color: #fff !important; +} + +.amount-input-wrapper input:focus { + border-color: var(--term-primary) !important; + box-shadow: 0 0 0 1px var(--term-primary) !important; +} + +.binary-order-panel .btn-buy-sell { + height: 60px; /* Reduced height as requested */ + border-radius: 12px; + transition: all 0.2s; + border: none; + position: relative; + overflow: hidden; +} + +.binary-order-panel .btn-buy-sell:active { + transform: scale(0.98); +} + +.btn-success.btn-buy-sell { + background: linear-gradient(135deg, #26a69a, #1b8076); + box-shadow: 0 4px 12px rgba(38, 166, 154, 0.2); +} + +.btn-danger.btn-buy-sell { + background: linear-gradient(135deg, #ef5350, #c62828); + box-shadow: 0 4px 12px rgba(239, 83, 80, 0.2); +} + +/* Ensure history is visible */ +.terminal-content { + display: flex; + flex-direction: column; + height: 100%; +} + +.kline-container { + flex: 1; + min-height: 300px; /* Allow it to shrink slightly to show more history */ +} + +.order-history { + height: 300px; /* Fixed height for scrollable area */ + border-top: 1px solid var(--term-border); + background: var(--term-surface); +} + +.trading-panels { + padding: 15px 20px; + border-bottom: 1px solid var(--term-border); +} + +/* Enhanced Balance and Profit visibility */ +.balance-highlight { + color: #0062ff !important; + text-shadow: 0 0 10px rgba(0, 98, 255, 0.3); +} + +.profit-highlight { + color: #26a69a !important; + font-size: 1.1rem; + text-shadow: 0 0 10px rgba(38, 166, 154, 0.3); +} + +/* Order Countdown Popup */ +.order-popup-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.85); + backdrop-filter: blur(5px); + z-index: 9999; + display: none; + align-items: center; + justify-content: center; +} + +.order-popup { + background: #1e2329; + width: 360px; + border-radius: 20px; + padding: 30px; + box-shadow: 0 20px 40px rgba(0,0,0,0.5); + text-align: center; + border: 1px solid rgba(255,255,255,0.05); +} + +.order-popup h5 { + color: #848e9c; + font-size: 16px; + margin-bottom: 30px; +} + +.countdown-circle { + position: relative; + width: 160px; + height: 160px; + margin: 0 auto 30px; +} + +.countdown-circle svg { + width: 160px; + height: 160px; + transform: rotate(-90deg); +} + +.countdown-circle circle { + fill: none; + stroke-width: 8; +} + +.countdown-circle .bg { + stroke: #2b3139; +} + +.countdown-circle .progress { + stroke: #26a69a; + stroke-linecap: round; + transition: stroke-dashoffset 1s linear; +} + +.countdown-circle .time-text { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 36px; + font-weight: 700; color: #fff; } -.amount-input-wrapper input { - height: 50px; - font-size: 18px; - font-weight: bold; - text-align: center; - border-radius: 8px; -} - -.section-title { - font-size: 12px; - font-weight: 600; - color: var(--term-muted); - text-transform: uppercase; - letter-spacing: 0.5px; -} - -.quick-amounts .btn { - font-weight: 600; - background: #2b3139; - border: none; -} - -.quick-amounts .btn:hover { - background: #3b424c; -} - -.binary-order-panel { - background: var(--term-surface); +.popup-details { + background: rgba(255,255,255,0.03); border-radius: 12px; + padding: 15px; + margin-bottom: 20px; +} + +.popup-row { + display: flex; + justify-content: space-between; + margin-bottom: 8px; + font-size: 13px; +} + +.popup-row .label { color: #848e9c; } +.popup-row .value { color: #eaecef; font-weight: 600; } + +.popup-footer { + font-size: 11px; + color: #5e6673; +} + +.terminal-main { + height: calc(100vh - var(--header-height)); } diff --git a/assets/pasted-20260216-060142-d6502859.png b/assets/pasted-20260216-060142-d6502859.png new file mode 100644 index 0000000..79fbbed Binary files /dev/null and b/assets/pasted-20260216-060142-d6502859.png differ diff --git a/assets/pasted-20260216-072002-eb8999c7.png b/assets/pasted-20260216-072002-eb8999c7.png new file mode 100644 index 0000000..fb6ac7c Binary files /dev/null and b/assets/pasted-20260216-072002-eb8999c7.png differ diff --git a/auth/register.php b/auth/register.php index 437818a..c2957dc 100644 --- a/auth/register.php +++ b/auth/register.php @@ -33,8 +33,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } else { try { $hash = password_hash($password, PASSWORD_DEFAULT); - $uid = '618120' . mt_rand(100000, 999999); - $stmt = db()->prepare("INSERT INTO users (username, email, password_hash, uid, credit_score) VALUES (?, ?, ?, ?, ?)"); + $uid = str_pad(mt_rand(0, 99999999), 8, '0', STR_PAD_LEFT); + $stmt = db()->prepare("INSERT INTO users (username, email, password_hash, uid, credit_score, total_recharge) VALUES (?, ?, ?, ?, ?, 0)"); $username = strpos($account, '@') === false ? $account : explode('@', $account)[0]; $email = strpos($account, '@') !== false ? $account : $account . '@byro.io'; diff --git a/db/migrations/003_update_users_for_profile.sql b/db/migrations/003_update_users_for_profile.sql new file mode 100644 index 0000000..88080bb --- /dev/null +++ b/db/migrations/003_update_users_for_profile.sql @@ -0,0 +1,17 @@ +-- Add missing fields for Profile, KYC and Security +ALTER TABLE users +ADD COLUMN total_recharge DECIMAL(16,4) DEFAULT 0, +ADD COLUMN transaction_password VARCHAR(255) DEFAULT NULL, +ADD COLUMN kyc_name VARCHAR(100) DEFAULT NULL, +ADD COLUMN kyc_id_number VARCHAR(50) DEFAULT NULL, +ADD COLUMN kyc_photo_front VARCHAR(255) DEFAULT NULL, +ADD COLUMN kyc_photo_back VARCHAR(255) DEFAULT NULL, +ADD COLUMN kyc_photo_handheld VARCHAR(255) DEFAULT NULL, +ADD COLUMN kyc_status INT DEFAULT 0 COMMENT '0: Unverified, 1: Pending, 2: Verified, 3: Rejected'; + +-- Update credit_score default +ALTER TABLE users MODIFY COLUMN credit_score INT DEFAULT 80; + +-- Ensure existing users have a credit score and UID if missing +UPDATE users SET credit_score = 80 WHERE credit_score IS NULL; +UPDATE users SET uid = LPAD(FLOOR(RAND() * 100000000), 8, '0') WHERE uid IS NULL OR uid = ''; diff --git a/includes/footer.php b/includes/footer.php index eecf857..4ed7499 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -72,7 +72,10 @@
diff --git a/includes/header.php b/includes/header.php index 872291a..42b1ec5 100644 --- a/includes/header.php +++ b/includes/header.php @@ -322,8 +322,11 @@ function getSetting($key, $default = null) {
- - + + __('unverified'), 1 => __('pending'), 2 => __('verified'), 3 => __('rejected')]; + echo $statusMap[$user['kyc_status'] ?? 0] ?? __('unverified'); + ?>
diff --git a/includes/lang.php b/includes/lang.php index b86b2de..ca9b2b1 100644 --- a/includes/lang.php +++ b/includes/lang.php @@ -122,6 +122,83 @@ $translations = [ 'buy_up' => '买涨', 'buy_down' => '买跌', 'profit' => '收益', + 'enter_amount' => '请输入有效金额', + 'insufficient_balance' => '余额不足', + 'order_in_progress' => '订单进行中', + 'current_price' => '现价', + 'cycle' => '周期', + 'direction' => '方向', + 'quantity' => '数量', + 'opening_price' => '开仓价', + 'final_price_settlement' => '最终价格以系统结算为准', + 'open_orders' => '当前委托', + 'settlement_history' => '历史结算', + 'no_records_found' => '暂无记录', + 'executing' => '正在执行', + 'loss' => '亏损', + 'amount_too_low' => '买入金额低于最小限制', + 'amount_too_high' => '买入金额超过最大限制', + 'fiat_recharge' => '法币充值', + 'crypto_recharge' => '数字货币充值', + 'select_currency' => '选择币种', + 'fiat_amount' => '法币金额', + 'est_usdt' => '预计到账 (USDT)', + 'confirm_order' => '确认订单', + 'recharge_request_sent' => '充值请求已提交给客服', + 'back' => '返回', + 'network' => '网络', + 'address' => '充值地址', + 'copy' => '复制', + 'withdraw_amount' => '提现金额', + 'withdraw_address' => '提现地址', + 'receive' => '预计到账', + 'withdraw_request_sent' => '提现申请已提交,请等待审核', + 'all' => '全部', + 'crypto_withdraw' => 'USDT提现', + 'fiat_withdraw' => '法币提现', + 'withdraw_password' => '提现密码', + 'to_receive' => '预计到账', + 'est_receive_fiat' => '预计收到法币', + 'recharge_steps' => '充值步骤', + 'withdraw_steps' => '提现步骤', + 'security_tips' => '安全提示', + 'secure' => '安全', + 'fast' => '极速', + 'support_247' => '24/7支持', + 'i_have_paid' => '我已完成支付', + 'crypto_recharge_warning' => '请务必仅向此地址发送 USDT。发送其他资产可能会导致永久丢失。', + 'kyc' => '实名认证', + 'security' => '安全设置', + 'vip_level' => 'VIP等级', + 'unverified' => '未认证', + 'pending' => '审核中', + 'verified' => '已认证', + 'rejected' => '已驳回', + 'full_name' => '真实姓名', + 'id_number' => '身份证号', + 'id_front' => '身份证正面', + 'id_back' => '身份证反面', + 'id_handheld' => '手持身份证', + 'upload' => '点击上传', + 'submit' => '提交', + 'login_password' => '登录密码', + 'trade_password' => '交易密码', + 'change_password' => '修改密码', + 'set_password' => '设置密码', + 'kyc_instructions' => '请确保上传的照片清晰可见,且与填写的身份证号一致。', + 'security_instructions' => '请定期修改您的密码,并确保交易密码与登录密码不同。', + 'old_password' => '原密码', + 'new_password' => '新密码', + 'confirm_new_password' => '确认新密码', + 'kyc_steps' => '实名认证步骤', + 'kyc_step1' => '填写您的真实姓名和身份证号码。', + 'kyc_step2' => '上传您的身份证正反面照片。', + 'kyc_step3' => '上传您手持身份证的照片,并确保面部清晰。', + 'security_steps' => '安全设置步骤', + 'security_step1' => '设置强密码,包含字母、数字和符号。', + 'security_step2' => '交易密码用于提现和重要操作,请务必妥善保存。', + 'frozen' => '冻结', + 'converted_to' => '折合', ], 'en' => [ 'home' => 'Home', @@ -237,6 +314,83 @@ $translations = [ 'buy_up' => 'Buy Up', 'buy_down' => 'Buy Down', 'profit' => 'Profit', + 'enter_amount' => 'Please enter a valid amount', + 'insufficient_balance' => 'Insufficient balance', + 'order_in_progress' => 'Order in Progress', + 'current_price' => 'Current Price', + 'cycle' => 'Cycle', + 'direction' => 'Direction', + 'quantity' => 'Quantity', + 'opening_price' => 'Opening Price', + 'final_price_settlement' => 'Final price is subject to system settlement', + 'open_orders' => 'Open Orders', + 'settlement_history' => 'Settlement History', + 'no_records_found' => 'No records found', + 'executing' => 'Executing', + 'loss' => 'Loss', + 'amount_too_low' => 'Amount too low', + 'amount_too_high' => 'Amount too high', + 'fiat_recharge' => 'Fiat Deposit', + 'crypto_recharge' => 'Crypto Deposit', + 'select_currency' => 'Select Currency', + 'fiat_amount' => 'Fiat Amount', + 'est_usdt' => 'Estimated USDT', + 'confirm_order' => 'Confirm Order', + 'recharge_request_sent' => 'Deposit request sent to support', + 'back' => 'Back', + 'network' => 'Network', + 'address' => 'Deposit Address', + 'copy' => 'Copy', + 'withdraw_amount' => 'Withdraw Amount', + 'withdraw_address' => 'Withdraw Address', + 'receive' => 'Receive', + 'withdraw_request_sent' => 'Withdrawal request submitted for review', + 'all' => 'All', + 'crypto_withdraw' => 'USDT Withdrawal', + 'fiat_withdraw' => 'Fiat Withdrawal', + 'withdraw_password' => 'Withdrawal Password', + 'to_receive' => 'To Receive', + 'est_receive_fiat' => 'Est. Fiat Receive', + 'recharge_steps' => 'Recharge Steps', + 'withdraw_steps' => 'Withdrawal Steps', + 'security_tips' => 'Security Tips', + 'secure' => 'Secure', + 'fast' => 'Fast', + 'support_247' => '24/7 Support', + 'i_have_paid' => 'I have paid', + 'crypto_recharge_warning' => 'Please only send USDT to this address. Sending other assets may result in permanent loss.', + 'kyc' => 'Identity Verification', + 'security' => 'Security Settings', + 'vip_level' => 'VIP Level', + 'unverified' => 'Unverified', + 'pending' => 'Pending', + 'verified' => 'Verified', + 'rejected' => 'Rejected', + 'full_name' => 'Full Name', + 'id_number' => 'ID Number', + 'id_front' => 'ID Front', + 'id_back' => 'ID Back', + 'id_handheld' => 'Hand-held ID', + 'upload' => 'Upload', + 'submit' => 'Submit', + 'login_password' => 'Login Password', + 'trade_password' => 'Trade Password', + 'change_password' => 'Change Password', + 'set_password' => 'Set Password', + 'kyc_instructions' => 'Please ensure that the uploaded photos are clear and consistent with the ID number filled in.', + 'security_instructions' => 'Please change your password regularly and ensure that the transaction password is different from the login password.', + 'old_password' => 'Old Password', + 'new_password' => 'New Password', + 'confirm_new_password' => 'Confirm New Password', + 'kyc_steps' => 'KYC Steps', + 'kyc_step1' => 'Fill in your real name and ID number.', + 'kyc_step2' => 'Upload photos of the front and back of your ID card.', + 'kyc_step3' => 'Upload a photo of you holding your ID card, ensuring your face is clear.', + 'security_steps' => 'Security Steps', + 'security_step1' => 'Set a strong password containing letters, numbers, and symbols.', + 'security_step2' => 'The transaction password is used for withdrawals and important operations. Please keep it safe.', + 'frozen' => 'Frozen', + 'converted_to' => 'Equivalent', ] ]; diff --git a/includes/terminal_layout.php b/includes/terminal_layout.php index 4cf1f43..7669500 100644 --- a/includes/terminal_layout.php +++ b/includes/terminal_layout.php @@ -4,6 +4,14 @@ function renderTerminal($activeTab = 'spot') { $currentSymbol = $_GET['symbol'] ?? 'BTC'; $currentSymbol = strtoupper($currentSymbol); + $usdt_balance = 0; + if ($user) { + $stmt = db()->prepare("SELECT available FROM user_balances WHERE user_id = ? AND symbol = 'USDT'"); + $stmt->execute([$user['id']]); + $bal = $stmt->fetch(); + $usdt_balance = $bal['available'] ?? 0; + } + $full_coins = [ ['symbol' => 'BTC', 'name' => 'Bitcoin', 'price' => '64,234.50', 'change' => '+2.45%'], ['symbol' => 'ETH', 'name' => 'Ethereum', 'price' => '3,456.20', 'change' => '+1.12%'], @@ -113,41 +121,59 @@ function renderTerminal($activeTab = 'spot') {
-
-
- - - - - +
+
+
: USDT
+
+
+ + + + +
-
(USDT)
+
(USDT)
- +
- - + +
-
-
1,000.00 USDT
-
0.00 USDT
+
+
+
0.00 USDT
-
-
@@ -156,13 +182,21 @@ function renderTerminal($activeTab = 'spot') { @@ -188,7 +352,7 @@ function renderTerminal($activeTab = 'spot') {
-
: 1,000.00 USDT
+
: USDT
@@ -241,26 +405,68 @@ function renderTerminal($activeTab = 'spot') {
-
当前委托 (Open Orders)
-
结算部位 (Settlement)
-
成交历史 (Trade History)
-
资产 (Assets)
+
+
@@ -329,56 +535,72 @@ function renderTerminal($activeTab = 'spot') { + + +
+
+
+ +
+ + + + + +
+ + + + +
+
diff --git a/kyc.php b/kyc.php new file mode 100644 index 0000000..e5f44f4 --- /dev/null +++ b/kyc.php @@ -0,0 +1,203 @@ +prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$user['id']]); +$userData = $stmt->fetch(); + +$success = ''; +$error = ''; + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $real_name = $_POST['real_name'] ?? ''; + $id_number = $_POST['id_number'] ?? ''; + + // Handle uploads + $uploadDir = 'uploads/kyc/'; + if (!is_dir($uploadDir)) mkdir($uploadDir, 0777, true); + + $front = $userData['kyc_photo_front']; + $back = $userData['kyc_photo_back']; + $handheld = $userData['kyc_photo_handheld']; + + if (isset($_FILES['photo_front']) && $_FILES['photo_front']['error'] === 0) { + $ext = pathinfo($_FILES['photo_front']['name'], PATHINFO_EXTENSION); + $front = $uploadDir . $user['id'] . '_front_' . time() . '.' . $ext; + move_uploaded_file($_FILES['photo_front']['tmp_name'], $front); + } + + if (isset($_FILES['photo_back']) && $_FILES['photo_back']['error'] === 0) { + $ext = pathinfo($_FILES['photo_back']['name'], PATHINFO_EXTENSION); + $back = $uploadDir . $user['id'] . '_back_' . time() . '.' . $ext; + move_uploaded_file($_FILES['photo_back']['tmp_name'], $back); + } + + if (isset($_FILES['photo_handheld']) && $_FILES['photo_handheld']['error'] === 0) { + $ext = pathinfo($_FILES['photo_handheld']['name'], PATHINFO_EXTENSION); + $handheld = $uploadDir . $user['id'] . '_handheld_' . time() . '.' . $ext; + move_uploaded_file($_FILES['photo_handheld']['tmp_name'], $handheld); + } + + if (empty($real_name) || empty($id_number)) { + $error = "Please fill in all fields"; + } else { + $stmt = db()->prepare("UPDATE users SET kyc_name = ?, kyc_id_number = ?, kyc_photo_front = ?, kyc_photo_back = ?, kyc_photo_handheld = ?, kyc_status = 1 WHERE id = ?"); + $stmt->execute([$real_name, $id_number, $front, $back, $handheld, $user['id']]); + $success = "Verification request submitted successfully!"; + // Refresh user data + $userData['kyc_status'] = 1; + } +} + +$kycStatus = $userData['kyc_status'] ?? 0; +?> + +
+
+
+ + +
+
+

+ + +

+
+ +
+ +
+ +
+ + + +
+ +
+ + + +
+ +

+

()

+
+ +
+ +

+

Your application is being reviewed by our team.

+
+ +
+
+
+ + +
+
+ + +
+
+ +
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+ + +
+ +
+
+
+ +
+
+ +
+
    +
  • +
  • +
  • +
+
+ + + + +
+
+ + +
+
+
+

+ +

+
+
+
+
+
+ + + + diff --git a/profile.php b/profile.php index 659c437..eeb6ccf 100644 --- a/profile.php +++ b/profile.php @@ -6,113 +6,163 @@ if (!$user) { exit; } +// Get user data again to ensure we have latest fields +$stmt = db()->prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$user['id']]); +$userData = $stmt->fetch(); + // Get balances $stmt = db()->prepare("SELECT * FROM user_balances WHERE user_id = ?"); $stmt->execute([$user['id']]); $balances = $stmt->fetchAll(); + +// Total USDT Balance calculation +$totalBalanceUsdt = 0; +foreach ($balances as $b) { + if ($b['symbol'] === 'USDT') { + $totalBalanceUsdt += $b['available'] + $b['frozen']; + } +} + +function getVipLevel($totalRecharge) { + if ($totalRecharge >= 10000000) return 7; + if ($totalRecharge >= 5000000) return 6; + if ($totalRecharge >= 1000000) return 5; + if ($totalRecharge >= 500000) return 4; + if ($totalRecharge >= 100000) return 3; + if ($totalRecharge >= 50000) return 2; + if ($totalRecharge >= 10001) return 1; + return 0; +} + +$vipLevel = getVipLevel($userData['total_recharge'] ?? 0); + +$kycStatusText = [ + 0 => __('unverified'), + 1 => __('pending'), + 2 => __('verified'), + 3 => __('rejected') +]; +$kycStatusColor = [ + 0 => 'text-white-50', + 1 => 'text-warning', + 2 => 'text-success', + 3 => 'text-danger' +]; ?> -
+
- -
-
-
-
-
- -
-
-
-

-

- -
-
- UID - -
-
- Account Status - Verified -
-
- Credit Score - + +
+
+
+ +
+
+
+ +
+
-
- - + +
+
+ UID + +
+
+ + +
+
+ + VIP +
+ + + + + + + + + + + + + + + + +
- -
-
+ +
+ +
-
-

Wallet Balances

-
- - +
+
+

(USDT)

+

USDT

+
+
- -
-
- - - - - - - - - - - '325/small/tether.png', - 'BTC' => '1/small/bitcoin.png', - 'ETH' => '279/small/ethereum.png', - 'BNB' => '825/small/binance-coin-logo.png' - ]; - foreach($balances as $b): - ?> - - - - - - - - + + - - - - - - -
AssetIconAvailableFrozenAction
-
-
- - -
-
- - - -
- - No assets found in your wallet. -
-
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
(USDT)
+
+ + +
+
+ + + + + + + +
diff --git a/recharge.php b/recharge.php new file mode 100644 index 0000000..a91fc1e --- /dev/null +++ b/recharge.php @@ -0,0 +1,295 @@ +query("SELECT setting_key, setting_value FROM system_settings"); +$settings = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); + +$trc20_addr = $settings['usdt_trc20_address'] ?? 'TYv9V5J1P1eEwz7y3WqJg9M2yv7f7xXv3x'; +$erc20_addr = $settings['usdt_erc20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'; +$bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'; +?> + +
+
+
+ + + +
+
+

+ + +

+
+ +
+ + + +
+ +
+
+
+ + +
+ +
+ +
+ + USD +
+
+ +
+
+ + 0.00 USDT +
+
+ + : 1 USDT ≈ 1.00 USD +
+
+ + +
+
+ + +
+
+ +
+ USDT +
+
USDT
+
Tether USD
+
+
+
+ +
+ +
+ + + +
+
+ +
+ QR Code +
+ +
+ +
+ + +
+
+ +
+ + ⚠️ +
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+ 1 + 选择充值方式(法币或加密货币) +
+
+ 2 + 填写金额或复制充值地址 +
+
+ 3 + 完成支付后点击确认提交 +
+
+ 4 + 等待客服核实,资金通常在2-5分钟内到账 +
+
+
+
+
+
+
+
+
+
+
    +
  • 请勿向任何非官方提供的地址充值
  • +
  • 充值前请仔细核对主网协议(如 TRC20/ERC20)
  • +
  • 请保管好您的支付凭证,以便在需要时提供给客服
  • +
  • 平台绝不会要求您在非官方页面输入支付密码
  • +
+
+
+
+
+
+ +
+
+ + + +
+
+
+
+
+ + + + + + diff --git a/security.php b/security.php new file mode 100644 index 0000000..97bb15a --- /dev/null +++ b/security.php @@ -0,0 +1,162 @@ +prepare("SELECT password_hash FROM users WHERE id = ?"); + $stmt->execute([$user['id']]); + $current_pwd_hash = $stmt->fetchColumn(); + + if (!password_verify($old_pwd, $current_pwd_hash)) { + $error = "Old password incorrect"; + } elseif ($new_pwd !== $confirm_pwd) { + $error = "Passwords do not match"; + } elseif (strlen($new_pwd) < 6) { + $error = "Password must be at least 6 characters"; + } else { + $new_hash = password_hash($new_pwd, PASSWORD_DEFAULT); + $stmt = db()->prepare("UPDATE users SET password_hash = ? WHERE id = ?"); + $stmt->execute([$new_hash, $user['id']]); + $success = "Login password changed successfully"; + } + } elseif ($action === 'set_trade_password') { + $trade_pwd = $_POST['trade_password'] ?? ''; + $confirm_trade_pwd = $_POST['confirm_trade_password'] ?? ''; + + if ($trade_pwd !== $confirm_trade_pwd) { + $error = "Passwords do not match"; + } elseif (strlen($trade_pwd) < 6) { + $error = "Transaction password must be at least 6 characters"; + } else { + // Store plain or hashed? Usually hashed but user might want simple numeric. + // I'll hash it for security. + $trade_hash = password_hash($trade_pwd, PASSWORD_DEFAULT); + $stmt = db()->prepare("UPDATE users SET transaction_password = ? WHERE id = ?"); + $stmt->execute([$trade_hash, $user['id']]); + $success = "Transaction password updated successfully"; + } + } +} + +$stmt = db()->prepare("SELECT transaction_password FROM users WHERE id = ?"); +$stmt->execute([$user['id']]); +$hasTradePwd = !empty($stmt->fetchColumn()); +?> + +
+
+
+ + +
+
+

+ + +

+
+ +
+ +
+ +
+ + + +
+ +
+ + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+ + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
    +
  • +
  • +
+
+ +
+
+
+

+ +

+
+
+
+
+
+
+
+ + diff --git a/swap.php b/swap.php index 40cec13..76e2551 100644 --- a/swap.php +++ b/swap.php @@ -1,6 +1,14 @@ prepare("SELECT available FROM user_balances WHERE user_id = ? AND symbol = 'USDT'"); + $stmt->execute([$user['id']]); + $bal = $stmt->fetch(); + $usdt_balance = $bal['available'] ?? 0; +} ?>
@@ -14,7 +22,7 @@ require_once __DIR__ . '/includes/header.php';
- : 1,000.00 + :
diff --git a/withdraw.php b/withdraw.php new file mode 100644 index 0000000..c336e2f --- /dev/null +++ b/withdraw.php @@ -0,0 +1,325 @@ +prepare("SELECT available FROM user_balances WHERE user_id = ? AND symbol = 'USDT'"); +$stmt->execute([$user['id']]); +$bal = $stmt->fetch(); +$available = $bal['available'] ?? 0; +?> + +
+
+
+ + + +
+
+

+ + +

+
+ +
+ + + +
+ +
+
+
+ +
+ USDT +
+
USDT
+
Tether USD
+
+
+
+ +
+ +
+ + + +
+
+ +
+ + +
+ +
+
+ + : USDT +
+
+ + +
+
+ +
+ + +
+ +
+
+ 手续费 (Fee) + 1.00 USDT +
+
+ + 0.00 USDT +
+
+ + +
+
+ + +
+
+
+ + +
+ +
+
+ + : USDT +
+
+ + +
+
+ +
+ + +
+ +
+
+ : 1 USDT ≈ + 1.00 USD +
+
+ + 0.00 USD +
+
+ + +
+
+
+
+
+ + +
+
+
+
+
+
+
+ 1 + 选择提现方式(加密货币或法币) +
+
+ 2 + 填写提现地址/选择币种并输入金额 +
+
+ 3 + 输入提现密码(默认123456) +
+
+ 4 + 确认后提交审核,预计10-30分钟内处理 +
+
+
+
+
+
+
+
+
+
+
    +
  • 提现前请务必确认地址正确,转错将无法找回
  • +
  • 为了您的资金安全,大额提现可能需要人工电话核实
  • +
  • 请确保提现主网与接收端主网一致(如均为 TRC20)
  • +
  • 严禁参与任何非法洗钱活动,平台将配合监管部门调查
  • +
+
+
+
+
+
+ +
+
+ + + +
+
+
+
+
+ + + + + +