Autosave: 20260218-145853

This commit is contained in:
Flatlogic Bot 2026-02-18 14:58:53 +00:00
parent 2833b4d05b
commit 042f37a777
22 changed files with 691 additions and 378 deletions

View File

@ -1,5 +1,6 @@
<?php
require_once __DIR__ . '/../db/config.php';
require_once __DIR__ . '/../includes/lang.php';
if (session_status() === PHP_SESSION_NONE) session_start();
// Admin check
@ -26,7 +27,7 @@ if (!function_exists('hasPermission')) {
}
function renderAdminPage($content, $title = '后台管理') {
global $admin;
global $admin, $lang;
$current_page = basename($_SERVER['PHP_SELF']);
$site_logo = '';
@ -42,7 +43,7 @@ function renderAdminPage($content, $title = '后台管理') {
} catch (Exception $e) {}
?>
<!DOCTYPE html>
<html lang="zh">
<html lang="<?= $lang ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -146,66 +147,66 @@ function renderAdminPage($content, $title = '后台管理') {
<?php else: ?>
<i class="bi bi-shield-lock-fill me-2"></i>
<?php endif; ?>
<?= $admin['is_agent'] ? '代理后台' : '管理系统' ?>
<?= $admin['is_agent'] ? __('agent_panel') : __('admin_panel') ?>
</div>
<div class="admin-nav">
<a href="/admin/index.php" class="nav-link <?= $current_page == 'index.php' ? 'active' : '' ?>"><i class="bi bi-house-door"></i> 首页</a>
<a href="/admin/index.php" class="nav-link <?= $current_page == 'index.php' ? 'active' : '' ?>"><i class="bi bi-house-door"></i> <?= __('home') ?></a>
<?php if (hasPermission('manage_users')): ?>
<a href="/admin/users.php" class="nav-link <?= $current_page == 'users.php' ? 'active' : '' ?>">
<i class="bi bi-people"></i> 玩家管理
<i class="bi bi-people"></i> <?= __('users') ?>
<span class="badge bg-success rounded-pill ms-auto d-none" id="users-badge">0</span>
</a>
<?php endif; ?>
<?php if (!$admin['is_agent']): ?>
<a href="/admin/agents.php" class="nav-link <?= $current_page == 'agents.php' ? 'active' : '' ?>"><i class="bi bi-person-badge"></i> 代理管理</a>
<a href="/admin/agents.php" class="nav-link <?= $current_page == 'agents.php' ? 'active' : '' ?>"><i class="bi bi-person-badge"></i> <?= __('agents') ?></a>
<?php endif; ?>
<?php if (hasPermission('audit_finance')): ?>
<a href="/admin/finance.php" class="nav-link <?= $current_page == 'finance.php' ? 'active' : '' ?>">
<i class="bi bi-wallet2"></i> 充提管理
<i class="bi bi-wallet2"></i> <?= __('finance_management') ?>
<span class="badge bg-danger rounded-pill ms-auto d-none" id="finance-badge">0</span>
</a>
<?php endif; ?>
<?php if (hasPermission('view_orders')): ?>
<a href="/admin/transactions.php" class="nav-link <?= $current_page == 'transactions.php' ? 'active' : '' ?>">
<i class="bi bi-list-ul"></i> 财务明细
<i class="bi bi-list-ul"></i> <?= __('finance_details') ?>
</a>
<a href="/admin/binary.php" class="nav-link <?= $current_page == 'binary.php' ? 'active' : '' ?>">
<i class="bi bi-clock"></i> 秒合约管理
<i class="bi bi-clock"></i> <?= __('sec_contract_management') ?>
<span class="badge bg-info rounded-pill ms-auto d-none" id="binary-badge">0</span>
</a>
<a href="/admin/contract.php" class="nav-link <?= $current_page == 'contract.php' ? 'active' : '' ?>">
<i class="bi bi-layers"></i> 永续合约
<i class="bi bi-layers"></i> <?= __('contract_trading') ?>
<span class="badge bg-info rounded-pill ms-auto d-none" id="contract-badge">0</span>
</a>
<a href="/admin/spot.php" class="nav-link <?= $current_page == 'spot.php' ? 'active' : '' ?>">
<i class="bi bi-currency-exchange"></i> 币币交易
<i class="bi bi-currency-exchange"></i> <?= __('spot_trading') ?>
<span class="badge bg-info rounded-pill ms-auto d-none" id="spot-badge">0</span>
</a>
<?php endif; ?>
<?php if (hasPermission('manage_kyc')): ?>
<a href="/admin/kyc.php" class="nav-link <?= $current_page == 'kyc.php' ? 'active' : '' ?>">
<i class="bi bi-person-vcard"></i> 实名认证
<i class="bi bi-person-vcard"></i> <?= __('real_name') ?>
<span class="badge bg-danger rounded-pill ms-auto d-none" id="kyc-badge">0</span>
</a>
<?php endif; ?>
<?php if (!$admin['is_agent']): ?>
<a href="/admin/exchange.php" class="nav-link"><i class="bi bi-arrow-left-right"></i> 兑换管理</a>
<a href="/admin/mining.php" class="nav-link"><i class="bi bi-cpu"></i> 质押挖矿</a>
<a href="/admin/ai_control.php" class="nav-link"><i class="bi bi-robot"></i> AI控盘</a>
<a href="/admin/exchange.php" class="nav-link"><i class="bi bi-arrow-left-right"></i> <?= __('exchange_management') ?></a>
<a href="/admin/mining.php" class="nav-link"><i class="bi bi-cpu"></i> <?= __('mining_management') ?></a>
<a href="/admin/ai_control.php" class="nav-link"><i class="bi bi-robot"></i> <?= __('ai_control') ?></a>
<a href="/admin/customer_service.php" class="nav-link <?= $current_page == 'customer_service.php' ? 'active' : '' ?>">
<i class="bi bi-headset"></i> 客服管理
<i class="bi bi-headset"></i> <?= __('online_support') ?>
<span class="badge bg-warning rounded-pill ms-auto d-none" id="messages-badge">0</span>
</a>
<a href="/admin/backend_settings.php" class="nav-link"><i class="bi bi-gear"></i> 后台设置</a>
<a href="/admin/backend_settings.php" class="nav-link"><i class="bi bi-gear"></i> <?= __('backend_settings') ?></a>
<?php endif; ?>
<a href="/admin/profile.php" class="nav-link <?= $current_page == 'profile.php' ? 'active' : '' ?>"><i class="bi bi-person-gear"></i> 个人设置</a>
<a href="/admin/profile.php" class="nav-link <?= $current_page == 'profile.php' ? 'active' : '' ?>"><i class="bi bi-person-gear"></i> <?= __('personal_settings') ?></a>
</div>
</div>
@ -214,6 +215,19 @@ function renderAdminPage($content, $title = '后台管理') {
<h5 class="mb-0"><?= $title ?></h5>
</div>
<div class="d-flex align-items-center gap-3">
<div class="dropdown">
<button class="btn btn-sm btn-outline-secondary dropdown-toggle d-flex align-items-center gap-2" type="button" data-bs-toggle="dropdown">
<?php if ($lang === 'zh'): ?>
<img src="https://flagcdn.com/w40/cn.png" width="20" alt="CN"> 中文
<?php else: ?>
<img src="https://flagcdn.com/w40/us.png" width="20" alt="US"> EN
<?php endif; ?>
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item d-flex align-items-center gap-2" href="?lang=zh"><img src="https://flagcdn.com/w40/cn.png" width="20"> 中文</a></li>
<li><a class="dropdown-item d-flex align-items-center gap-2" href="?lang=en"><img src="https://flagcdn.com/w40/us.png" width="20"> English</a></li>
</ul>
</div>
<div class="text-muted small">欢迎您, <?= htmlspecialchars($admin['username']) ?></div>
<div class="position-relative me-2">
<i class="bi bi-bell fs-5"></i>

View File

@ -20,7 +20,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
'smtp_pass' => $_POST['smtp_pass'] ?? '',
'smtp_secure' => $_POST['smtp_secure'] ?? 'tls',
'mail_from_email' => $_POST['mail_from_email'] ?? '',
'mail_from_name' => $_POST['mail_from_name'] ?? 'Byro Exchange'
'mail_from_name' => $_POST['mail_from_name'] ?? 'Byro Exchange',
'ios_download_url' => $_POST['ios_download_url'] ?? '#',
'android_download_url' => $_POST['android_download_url'] ?? '#',
'apk_download_url' => $_POST['apk_download_url'] ?? '/downloads/byro.apk'
];
foreach ($settings_to_update as $key => $value) {
@ -117,6 +120,28 @@ ob_start();
</div>
</div>
<hr class="my-4">
<h6 class="fw-bold mb-3"><i class="bi bi-phone me-2 text-primary"></i> APP 下载设置</h6>
<div class="row g-3">
<div class="col-md-12">
<label class="form-label small text-muted">iOS 下载链接 (App Store)</label>
<input type="text" name="ios_download_url" class="form-control" value="<?= htmlspecialchars(getSetting('ios_download_url', '#')) ?>" placeholder="https://apps.apple.com/app/...">
</div>
<div class="col-md-12">
<label class="form-label small text-muted">Android 下载链接 (Google Play)</label>
<input type="text" name="android_download_url" class="form-control" value="<?= htmlspecialchars(getSetting('android_download_url', '#')) ?>" placeholder="https://play.google.com/store/apps/...">
</div>
<div class="col-md-12">
<label class="form-label small text-muted">Android APK 直接下载链接</label>
<div class="input-group">
<input type="text" name="apk_download_url" class="form-control" value="<?= htmlspecialchars(getSetting('apk_download_url', '/downloads/byro.apk')) ?>" placeholder="/downloads/byro.apk">
<span class="input-group-text bg-light"><i class="bi bi-info-circle" title="建议将 APK 文件上传到 /downloads/ 目录下并在此填入路径"></i></span>
</div>
</div>
</div>
<div class="mt-5 text-end">
<button type="submit" class="btn btn-primary px-5 py-2 fw-bold rounded-pill shadow-sm">
保存所有设置

View File

@ -141,4 +141,4 @@ if ($action === 'settle_order') {
exit;
}
echo json_encode(['success' => false, 'error' => 'Invalid action']);
echo json_encode(['success' => false, 'error' => __('invalid_action')]);

View File

@ -217,4 +217,4 @@ if ($action === 'withdraw') {
exit;
}
echo json_encode(['success' => false, 'error' => 'Invalid action']);
echo json_encode(['success' => false, 'error' => __('invalid_action')]);

107
app.php
View File

@ -1,6 +1,30 @@
<?php
require_once __DIR__ . '/includes/lang.php';
require_once __DIR__ . '/includes/header.php';
// Smart Download Redirection Logic
if (isset($_GET['action']) && $_GET['action'] === 'download') {
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$isIos = (strpos($ua, 'iphone') !== false || strpos($ua, 'ipad') !== false || strpos($ua, 'ipod') !== false);
$isAndroid = (strpos($ua, 'android') !== false);
if ($isIos) {
$url = getSetting('ios_download_url', '#');
} elseif ($isAndroid) {
$url = getSetting('apk_download_url', getSetting('android_download_url', '#'));
} else {
$url = getSetting('android_download_url', '#');
}
if ($url && $url !== '#') {
header("Location: $url");
exit;
} else {
// Fallback to page if no URL set
header("Location: /app.php");
exit;
}
}
?>
<main class="app-page-wrapper">
<!-- Hero Section -->
@ -8,15 +32,24 @@ require_once __DIR__ . '/includes/header.php';
<div class="container py-lg-5">
<div class="row align-items-center g-5">
<div class="col-lg-6 text-center text-lg-start animate__animated animate__fadeInLeft">
<h1 class="display-3 fw-bold text-white mb-4 line-height-1-2">
<h1 class="display-4 fw-bold text-white mb-4 line-height-1-2">
<?= __('support_anywhere') ?>
</h1>
<p class="lead text-white-50 mb-5 fs-4">
<p class="lead text-white-50 mb-5 fs-5">
<?= __('app_mockup_desc') ?>
</p>
<div class="download-section mb-5">
<div class="row g-3 justify-content-center justify-content-lg-start">
<div class="col-12 mb-2 d-lg-none">
<a href="?action=download" class="download-btn-modern smart-download w-100">
<i class="bi bi-download"></i>
<div class="text">
<span><?= __('get_started') ?></span>
<div class="store"><?= __('app_download') ?></div>
</div>
</a>
</div>
<div class="col-6 col-md-4">
<a href="<?= getSetting('ios_download_url', '#') ?>" class="download-btn-modern ios">
<i class="bi bi-apple"></i>
@ -35,7 +68,7 @@ require_once __DIR__ . '/includes/header.php';
</div>
</a>
</div>
<div class="col-6 col-md-4">
<div class="col-12 col-md-4">
<a href="<?= getSetting('apk_download_url', '#') ?>" class="download-btn-modern apk">
<i class="bi bi-android2"></i>
<div class="text">
@ -49,7 +82,11 @@ require_once __DIR__ . '/includes/header.php';
<div class="qr-container d-inline-flex align-items-center p-3 rounded-4 bg-white bg-opacity-5 border border-secondary shadow-lg">
<div class="qr-code p-2 bg-white rounded-3">
<img src="https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=<?= urlencode('https://' . $_SERVER['HTTP_HOST'] . '/app.php') ?>" alt="QR" width="120" height="120">
<?php
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';
$download_url = $protocol . '://' . $_SERVER['HTTP_HOST'] . '/app.php?action=download';
?>
<img src="https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=<?= urlencode($download_url) ?>" alt="QR" width="120" height="120">
</div>
<div class="ms-4 text-start">
<h5 class="text-white fw-bold mb-1"><?= __('scan_download') ?></h5>
@ -78,6 +115,39 @@ require_once __DIR__ . '/includes/header.php';
</div>
</section>
<!-- Installation Guide -->
<section class="py-5 bg-black bg-opacity-20">
<div class="container">
<div class="text-center mb-5">
<h2 class="text-white fw-bold"><?= __('kyc_steps') ?></h2>
<p class="text-white-50"><?= __('recharge_steps') ?></p>
</div>
<div class="row g-4">
<div class="col-md-4">
<div class="guide-card p-4 rounded-4 bg-surface border border-secondary h-100">
<div class="step-num mb-3">01</div>
<h4 class="text-white mb-3"><?= __('scan_download') ?></h4>
<p class="text-white-50 small mb-0"><?= __('app_guide_step1') ?></p>
</div>
</div>
<div class="col-md-4">
<div class="guide-card p-4 rounded-4 bg-surface border border-secondary h-100">
<div class="step-num mb-3">02</div>
<h4 class="text-white mb-3"><?= __('app_install_auth') ?></h4>
<p class="text-white-50 small mb-0"><?= __('app_guide_step2') ?></p>
</div>
</div>
<div class="col-md-4">
<div class="guide-card p-4 rounded-4 bg-surface border border-secondary h-100">
<div class="step-num mb-3">03</div>
<h4 class="text-white mb-3"><?= __('app_experience_now') ?></h4>
<p class="text-white-50 small mb-0"><?= __('app_guide_step3') ?></p>
</div>
</div>
</div>
</div>
</section>
<!-- Features -->
<section class="py-5 bg-black bg-opacity-30 border-top border-secondary">
<div class="container">
@ -129,6 +199,34 @@ document.addEventListener('DOMContentLoaded', function() {
</script>
<style>
.guide-card {
transition: all 0.3s ease;
}
.guide-card:hover {
transform: translateY(-5px);
border-color: var(--primary) !important;
}
.step-num {
font-size: 32px;
font-weight: 900;
color: var(--primary);
opacity: 0.5;
font-family: 'Inter', sans-serif;
}
.smart-download {
background: var(--primary) !important;
border-color: var(--primary) !important;
}
.smart-download i {
color: #fff !important;
}
.smart-download .text .store {
color: #fff !important;
}
.smart-download .text span {
color: rgba(255,255,255,0.8) !important;
}
.highlight-pulse {
border-color: var(--primary) !important;
box-shadow: 0 0 15px rgba(0, 98, 255, 0.4);
@ -268,3 +366,4 @@ document.addEventListener('DOMContentLoaded', function() {
</style>
<?php require_once __DIR__ . '/includes/footer.php'; ?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -42,14 +42,7 @@ include __DIR__ . '/../includes/header.php';
<div class="card bg-dark border-0 shadow-lg p-4 p-md-5" style="border-radius: 30px; background: #161a1e !important; border: 1px solid var(--border) !important;">
<div class="text-center mb-5">
<div class="logo-container d-inline-flex mb-4">
<div class="logo-icon p-2" style="width: 45px; height: 45px;">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L2 7L12 12L22 7L12 2Z" fill="white"/>
<path d="M2 17L12 22L22 17" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2 12L12 17L22 12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<span class="logo-text fs-1 ms-2" style="letter-spacing: 2px;"><?= $lang === 'zh' ? '数字交易' : 'BYRO' ?></span>
<img src="/assets/images/logo.png" height="50" alt="BYRO">
</div>
<h2 class="fw-bold text-white mb-2"><?= __('login') ?></h2>
<p class="text-muted"><?= __('welcome_back') ?></p>

View File

@ -170,14 +170,7 @@ include __DIR__ . '/../includes/header.php';
<div class="card register-card p-4 p-md-5">
<div class="text-center mb-5">
<div class="logo-container d-inline-flex mb-4">
<div class="logo-icon p-2" style="width: 48px; height: 48px; background: var(--primary); border-radius: 12px;">
<svg width="30" height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L2 7L12 12L22 7L12 2Z" fill="white"/>
<path d="M2 17L12 22L22 17" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2 12L12 17L22 12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<span class="logo-text fs-1 ms-3"><?= $lang === 'zh' ? '数字交易' : 'BYRO' ?></span>
<img src="/assets/images/logo.png" height="50" alt="BYRO">
</div>
<h2 class="fw-bold text-white mb-2" style="font-size: 28px;"><?= __('register') ?></h2>
<p class="text-muted" style="font-size: 15px;"><?= __('join_secure') ?></p>

6
downloads/.htaccess Normal file
View File

@ -0,0 +1,6 @@
AddType application/vnd.android.package-archive .apk
<IfModule mod_headers.c>
<Files *.apk>
Header set Content-Disposition attachment
</Files>
</IfModule>

1
downloads/byro.apk Normal file
View File

@ -0,0 +1 @@
BYRO APP APK PLACEHOLDER

View File

@ -3,18 +3,7 @@
<div class="row g-4 mb-5">
<div class="col-lg-4 col-md-12">
<div class="logo-container mb-3">
<?php if ($site_logo): ?>
<img src="<?= $site_logo ?>" height="30" class="me-2">
<?php else: ?>
<div class="logo-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L2 7L12 12L22 7L12 2Z" fill="white"/>
<path d="M2 17L12 22L22 17" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M2 12L12 17L22 12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<?php endif; ?>
<span class="logo-text"><?= $lang === 'zh' ? '数字交易' : $site_name ?></span>
<img src="<?= $site_logo ?>" height="40" alt="BYRO">
</div>
<p class="text-muted small mb-4">
<?= __('footer_desc') ?>

View File

@ -24,16 +24,14 @@ if (!function_exists('getSetting')) {
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
$site_logo = getSetting('site_logo', '');
$site_name = getSetting('site_name', 'Byro');
$site_logo = '/assets/images/logo.png';
$site_name = 'BYRO';
?>
<title><?= $site_name ?> | <?= __('site_title') ?></title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<link rel="stylesheet" href="/assets/css/style.css?v=<?= time() ?>">
<?php if ($site_logo): ?>
<link rel="icon" href="<?= $site_logo ?>">
<?php endif; ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
@ -73,6 +71,11 @@ if (!function_exists('getSetting')) {
text-decoration: none;
margin-right: 40px;
}
.logo-container img {
height: 44px;
width: auto;
object-fit: contain;
}
.logo-icon {
width: 32px;
height: 32px;
@ -84,6 +87,7 @@ if (!function_exists('getSetting')) {
margin-right: 10px;
}
.logo-text {
display: none;
font-size: 24px;
font-weight: 800;
color: #fff;
@ -329,18 +333,7 @@ if (!function_exists('getSetting')) {
<body>
<header>
<a href="/" class="logo-container">
<?php if ($site_logo): ?>
<img src="<?= $site_logo ?>" height="32" class="me-2">
<?php else: ?>
<div class="logo-icon">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L2 7L12 12L22 7L12 2Z" fill="white"/>
<path d="M12 22L2 17L12 12L22 17L12 22Z" fill="rgba(255,255,255,0.3)"/>
<path d="M2 12L12 17L22 12" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<?php endif; ?>
<span class="logo-text" style="letter-spacing: 1px;"><?= $lang === 'zh' ? '数字交易' : strtoupper($site_name) ?></span>
<img src="<?= $site_logo ?>" alt="BYRO">
</a>
<nav>
<a href="/"><?= __('home') ?></a>
@ -350,6 +343,7 @@ if (!function_exists('getSetting')) {
<a href="/contract.php"><?= __('contract') ?></a>
<a href="/mining.php"><?= __('mining') ?></a>
<a href="/swap.php"><?= __('swap') ?></a>
<a href="/app.php"><?= __('app_download') ?></a>
</nav>
<div class="header-right">
<div class="lang-switcher">

View File

@ -1,7 +1,7 @@
<?php
session_start();
$lang = $_SESSION['lang'] ?? 'en';
$lang = $_SESSION['lang'] ?? 'zh';
if (isset($_GET['lang'])) {
$lang = $_GET['lang'] === 'zh' ? 'zh' : 'en';
$_SESSION['lang'] = $lang;
@ -36,7 +36,7 @@ $translations = [
'system_status' => '系统状态',
'normal' => '正常',
'cookie_policy' => '隐私政策',
'platform_advantage' => '为什么选择数字交易',
'platform_advantage' => '为什么选择BYRO',
'partners' => '合作伙伴',
'deposit' => '充值',
'withdraw' => '提现',
@ -98,7 +98,7 @@ $translations = [
'market_name' => '行情',
'trading' => '交易',
'status_normal' => '系统状态:正常',
'copyright' => '© 2023-2026 数字交易. 版权所有。',
'copyright' => '© 2023-2026 BYRO. 版权所有。',
'back' => '返回',
'crypto_withdraw' => '加密货币提现',
'fiat_withdraw' => '法币提现',
@ -129,9 +129,9 @@ $translations = [
'popular_markets' => '热门市场',
'view_more' => '更多',
'why_choose_us' => '为什么选择我们',
'footer_desc' => '数字交易是全球领先的数字资产交易平台,为个人和机构提供安全、可靠的交易服务。',
'footer_desc' => 'BYRO是全球领先的数字资产交易平台,为个人和机构提供安全、可靠的交易服务。',
'hero_title' => '全球领先的数字资产平台',
'hero_subtitle' => '在数字交易开启您的加密货币之旅,安全、稳定、可靠。',
'hero_subtitle' => '在BYRO开启您的加密货币之旅,安全、稳定、可靠。',
'get_started' => '立即开启',
'account_exists' => '账号已存在或数据库错误',
'pwd_mismatch' => '两次输入的密码不一致',
@ -246,7 +246,7 @@ $translations = [
'kyc_instructions' => '请确保上传的照片清晰可见,光线充足,不要遮挡关键信息。认证成功后将无法修改,请务必填写真实信息。',
'online_support' => '在线客服',
'type_message' => '输入消息...',
'welcome_support' => '欢迎来到数字交易支持中心!有什么可以帮您的?',
'welcome_support' => '欢迎来到BYRO支持中心!有什么可以帮您的?',
'mining_desc' => '专业的云挖矿和质押平台,加入成千上万的用户。',
'mining_pool' => '矿池',
'day' => '天',
@ -256,7 +256,7 @@ $translations = [
'lock_period' => '锁定周期',
'principal_protected' => '本金保障',
'daily_payouts' => '每日派息',
'why_mining' => '为什么选择数字交易挖矿?',
'why_mining' => '为什么选择BYRO挖矿?',
'adv_hardware' => '先进硬件',
'adv_hardware_desc' => '我们使用最新的矿机,最大化收益。',
'auto_compound' => '自动复利',
@ -269,7 +269,7 @@ $translations = [
'daily_profit' => '每日利润',
'monthly_profit' => '每月利润',
'try_calc' => '开始计算',
'app_desc' => '随时随地进行交易。通过数字交易移动应用掌控您的数字资产。',
'app_desc' => '随时随地进行交易。通过BYRO移动应用掌控您的数字资产。',
'download_on' => '下载于',
'get_it_on' => '立即获取',
'scan_download' => '扫码下载',
@ -280,12 +280,12 @@ $translations = [
'our_mission' => '我们的使命',
'mission_content' => '让数字资产交易对每个人、每个地方都变得触手可及、安全且直观。我们相信区块链的力量能够改变全球金融格局。',
'global_presence' => '全球业务',
'presence_content' => '数字交易在新加坡、伦敦和东京设有办事处,服务于多元化的全球社区。我们符合国际标准,并优先考虑用户资产的安全。',
'presence_content' => 'BYRO在新加坡、伦敦和东京设有办事处,服务于多元化的全球社区。我们符合国际标准,并优先考虑用户资产的安全。',
'users' => '用户',
'countries' => '国家',
'daily_volume' => '每日交易量',
'about_content' => '数字交易是成立于 2023 年的全球领先数字货币交易所。',
'news_content' => '获取数字交易的最新动态、上市公告和市场洞察。',
'about_content' => 'BYRO是成立于 2023 年的全球领先数字货币交易所。',
'news_content' => '获取BYRO的最新动态、上市公告和市场洞察。',
'announcement' => '公告',
'read_more' => '阅读更多',
'newsletter' => '新闻通讯',
@ -295,18 +295,18 @@ $translations = [
'popular_topics' => '热门话题',
'effective_date' => '生效日期2026年2月16日',
'tos_1_title' => '1. 接受条款',
'tos_1_content' => '通过访问或使用数字交易平台,您同意受这些服务条款的约束。如果您不同意这些条款,请不要使用我们的服务。',
'tos_1_content' => '通过访问或使用BYRO平台,您同意受这些服务条款的约束。如果您不同意这些条款,请不要使用我们的服务。',
'tos_2_title' => '2. 资格',
'tos_2_content' => '您必须年满 18 岁,并具有签订约束协议的法律能力,才能使用我们的平台。您有责任确保您对数字交易的使用符合所有当地法律法规。',
'tos_2_content' => '您必须年满 18 岁,并具有签订约束协议的法律能力,才能使用我们的平台。您有责任确保您对BYRO的使用符合所有当地法律法规。',
'tos_3_title' => '3. 账户安全',
'tos_3_content' => '您有责任维护您的账户凭据的机密性,并对在您的账户下发生的所有活动负责。您同意立即通知数字交易任何未经授权使用您账户的情况。',
'tos_3_content' => '您有责任维护您的账户凭据的机密性,并对在您的账户下发生的所有活动负责。您同意立即通知BYRO任何未经授权使用您账户的情况。',
'tos_4_title' => '4. 交易风险',
'tos_4_content' => '数字资产交易涉及重大风险。价格波动剧烈,您可能会损失全部投资。数字交易不提供财务建议。',
'tos_4_content' => '数字资产交易涉及重大风险。价格波动剧烈,您可能会损失全部投资。BYRO不提供财务建议。',
'tos_5_title' => '5. 终止',
'tos_5_content' => '数字交易保留随时因任何原因(包括违反这些条款)暂停或终止您的账户的权利。',
'tos_5_content' => 'BYRO保留随时因任何原因(包括违反这些条款)暂停或终止您的账户的权利。',
'last_updated' => '最后更新2026年2月16日',
'privacy_1_title' => '引言',
'privacy_1_content' => '数字交易(“我们”或“我们的”)尊重您的隐私,并致力于保护您的个人数据。本隐私政策告知您当您访问我们的网站时,我们如何处理您的个人数据。',
'privacy_1_content' => 'BYRO(“我们”或“我们的”)尊重您的隐私,并致力于保护您的个人数据。本隐私政策告知您当您访问我们的网站时,我们如何处理您的个人数据。',
'privacy_2_title' => '我们收集的数据',
'privacy_2_content' => '我们可能会收集、使用、存储和传输有关您的不同种类的个人数据,包括身份数据、联系数据、财务数据和技术数据。',
'privacy_3_title' => '我们如何使用您的数据',
@ -389,110 +389,60 @@ $translations = [
'google_play' => '谷歌商店',
'android_apk' => '安卓应用',
'ios_install' => '苹果安装',
'sec_contract' => '秒合约',
'sec_contract_desc' => '预测涨跌,秒级结算',
'mining_pool_desc' => '矿池算力挖矿,高收益',
'trading_experience' => '极速交易体验',
'security_protection' => '全方位安全防护',
'support_anywhere' => '随时随地,随心交易',
'scan_to_download_app' => '扫描二维码下载应用',
'open_orders' => '当前委托',
'settlement_history' => '历史记录',
'details' => '详情',
'order_in_progress' => '订单进行中',
'current_price' => '当前价格',
'cycle' => '周期',
'opening_price' => '开仓价格',
'final_price_settlement' => '根据最终结算价格为准',
'confirm_close_pos' => '确认平仓吗?',
'pos_closed' => '仓位已关闭',
'quantity' => '数量',
'level' => '等级',
'vip_level' => '会员等级',
'current_level' => '当前等级',
'upgrade_progress' => '升级进度',
'recharge_to_upgrade' => '再充值 %amount% 泰达币 升级到 %level% 级会员',
'vol_unit' => '亿',
'market_stats' => '行情统计',
'highest_level' => '已达最高等级',
'no_records' => '暂无记录',
'order_details' => '订单详情',
'copy' => '复制',
'scan_qr_to_download' => '扫描二维码安装应用',
'download_ios' => '苹果下载',
'download_android' => '安卓下载',
'download_apk' => '应用下载',
'features' => '功能特点',
'app_mockup_desc' => '专业的数字资产管理,随时随地掌握行情',
'getting_started' => '从这里开始',
'getting_started_desc' => '了解如何创建账户、验证身份并保障资金安全。',
'dep_with_title' => '充值与提现',
'dep_with_desc' => '关于资产进出平台的一切须知。',
'trading_tutorials' => '交易教程',
'trading_tutorials_desc' => 'Master master Master 现货、合约和秒合约交易。',
'sec_acc_title' => '安全与账户',
'sec_acc_desc' => '解决登录问题、双重验证并管理您的账户设置。',
'api_doc_title' => '接口文档',
'api_doc_desc' => '将交易功能集成到您自己的应用程序中。',
'contact_sup_title' => '联系客服',
'contact_sup_desc' => '找不到您要找的内容?联系我们的 24/7 团队。',
'help_search_placeholder' => '我们能为您提供什么帮助?',
'help_subtitle' => '在下面搜索文章或浏览类别。',
'news_title_1' => '上线新交易对:阿比特伦/泰达币 和 乐观/泰达币',
'news_title_2' => '关于系统升级维护的通知',
'news_title_3' => '启动 2026 全球合作伙伴计划',
'news_title_4' => '关于加强账户安全验证的提醒',
'news_title_5' => '新币上线LayerZero 即将登陆',
'news_desc_1' => '我们很高兴地宣布,我们将上线阿比特伦和乐观现货交易。',
'news_desc_2' => '为了提供更好的交易体验,我们将于本周末进行系统维护。',
'news_desc_3' => '加入我们,共同构建全球领先的数字资产交易生态。',
'news_desc_4' => '保障您的资金安全是我们的首要任务,请务必开启双重验证。',
'news_desc_5' => '新币现货交易即将开启,敬请期待。',
'news_meta' => '2026年2月14日 • 5分钟阅读',
'price' => '价格',
'app_guide_step1' => '使用手机相机或浏览器扫描上方二维码,或直接点击下载按钮获取安装包。',
'app_guide_step2' => '下载完成后,在手机设置中开启“允许安装未知来源应用”权限,以确保顺利安装。',
'app_guide_step3' => '安装完成后,打开 APP 并登录您的账户,即可开始全球领先的数字资产交易之旅。',
'app_install_auth' => '授权安装',
'app_experience_now' => '立即体验',
'support_anywhere' => '随时随地支持',
'app_mockup_desc' => '在BYRO移动应用中掌控您的数字资产。随时随地进行交易。',
'scan_qr_to_download' => '扫码下载',
'vol_unit' => '万',
'from' => '从',
'to' => '到',
'rate' => '汇率',
'price_impact' => '价格影响',
'slippage' => '滑点',
'order_records' => '下单记录',
'recharge_records' => '充值记录',
'withdrawal_records' => '提现记录',
'unauthorized' => '未授权',
'account_frozen' => '账号已冻结',
'invalid_amount' => '无效金额',
'swap_now' => '立即闪兑',
'start_mining' => '开始挖矿',
'swap_now' => '立即兑换',
'login_password' => '登录密码',
'old_password' => '原密码',
'new_password' => '新密码',
'confirm_new_password' => '确认新密码',
'change_password' => '修改密码',
'trade_password' => '交易密码',
'set_password' => '设置密码',
'security_steps' => '安全提示',
'security_step1' => '为了您的资产安全,请定期更换登录密码。',
'security_step2' => '交易密码用于提现 and and and 重要交易确认,请务必妥善保管。',
'security_instructions' => '系统采用银行级加密技术,多重验证保护您的账户安全。',
'old_pwd_incorrect' => '原密码不正确',
'pwd_too_short' => '密码长度至少为 6 位',
'pwd_changed_success' => '密码修改成功',
'trade_pwd_updated' => '交易密码设置成功',
'indicators' => '指标',
'chart' => '图表',
'depth' => '深度',
'kline' => 'K线',
'time_fs' => '分时',
'time_1m' => '1分',
'time_5m' => '5分',
'time_15m' => '15分',
'time_30m' => '30分',
'time_1h' => '1时',
'time_4h' => '4时',
'time_1h' => '1小时',
'time_4h' => '4小时',
'time_1d' => '1天',
'time_1w' => '1周',
'indicators' => '指标',
'chart' => '图表',
'depth' => '深度',
'price' => '价格',
'quantity' => '数量',
'open_orders' => '当前委托',
'settlement_history' => '历史记录',
'details' => '详情',
'confirm_close_pos' => '确认平仓吗?',
'pos_closed' => '仓位已平',
'order_in_progress' => '订单进行中',
'current_price' => '当前价格',
'opening_price' => '开仓价格',
'final_price_settlement' => '最终价格以结算时为准',
'error_msg_placeholder' => '错误消息',
'unauthorized' => '未授权',
'invalid_amount' => '无效金额',
'account_frozen' => '账号已冻结',
'invalid_action' => '无效操作',
'request_failed' => '请求失败',
'vip_level' => 'VIP等级',
'level' => '等级',
'recharge_to_upgrade' => '还需充值 %amount% USDT 升级到 VIP %level%',
'highest_level' => '已达到最高等级',
'USDT' => '泰达币',
'BTC' => '比特币',
'ETH' => '以太坊',
'USDT' => '泰达币',
'BNB' => '币安币',
'SOL' => '索拉纳',
'XRP' => '瑞波币',
@ -500,23 +450,33 @@ $translations = [
'DOGE' => '狗狗币',
'DOT' => '波卡',
'MATIC' => '多边形',
'AVAX' => '雪崩',
'LINK' => '链连',
'SHIB' => '柴犬币',
'TRX' => '波场',
'BCH' => '比特币现金',
'LTC' => '莱特币',
'UNI' => '独角兽',
'ARB' => '阿比特伦',
'OP' => '乐观',
'APT' => '阿普托斯',
'USDC' => '美元稳定币',
'PEPE' => '佩佩币',
'FIL' => '文件币',
'NEAR' => '协议币',
'ATOM' => '宇宙币',
'IMX' => '不可变币',
'KAS' => '卡斯帕币',
'security_level' => '安全等级',
'login_password' => '登录密码',
'old_password' => '原密码',
'new_password' => '新密码',
'confirm_new_password' => '确认新密码',
'set_password' => '设置密码',
'binding_phone' => '手机绑定',
'google_verification' => '谷歌验证',
'binding_mailbox' => '邮箱绑定',
'update' => '修改',
'low' => '低',
'medium' => '中',
'high' => '高',
'bound' => '已绑定',
'not_bound' => '未绑定',
'copy' => '复制',
'old_pwd_incorrect' => '原密码不正确',
'pwd_changed_success' => '密码修改成功',
'trade_pwd_updated' => '交易密码已更新',
'security_step1' => '为了您的资产安全,请务必绑定手机和邮箱,并开启谷歌验证。',
'security_step2' => '请妥善保管您的登录密码和交易密码,切勿泄露给他人。',
],
'en' => [
'home' => 'Home',
@ -546,7 +506,7 @@ $translations = [
'system_status' => 'System Status',
'normal' => 'Normal',
'cookie_policy' => 'Cookie Policy',
'platform_advantage' => 'Why Choose Byro',
'platform_advantage' => 'Why Choose BYRO',
'partners' => 'Partners',
'deposit' => 'Deposit',
'withdraw' => 'Withdraw',
@ -608,7 +568,7 @@ $translations = [
'market_name' => 'Market',
'trading' => 'Trading',
'status_normal' => 'System Status: Normal',
'copyright' => '© 2023-2026 Byro. All rights reserved.',
'copyright' => '© 2023-2026 BYRO. All rights reserved.',
'back' => 'Back',
'crypto_withdraw' => 'Crypto Withdraw',
'fiat_withdraw' => 'Fiat Withdraw',
@ -639,9 +599,9 @@ $translations = [
'popular_markets' => 'Popular Markets',
'view_more' => 'View More',
'why_choose_us' => 'Why Choose Us',
'footer_desc' => 'Byro is a leading digital asset platform.',
'footer_desc' => 'BYRO is a leading digital asset platform.',
'hero_title' => 'Leading Digital Asset Platform',
'hero_subtitle' => 'Start your crypto journey with Byro.',
'hero_subtitle' => 'Start your crypto journey with BYRO.',
'get_started' => 'Get Started',
'account_exists' => 'Account exists or error',
'pwd_mismatch' => 'Passwords mismatch',
@ -773,7 +733,7 @@ $translations = [
'lock_period' => 'Lock Period',
'principal_protected' => 'Principal Protected',
'daily_payouts' => 'Daily Payouts',
'why_mining' => 'Why Byro Mining?',
'why_mining' => 'Why BYRO Mining?',
'adv_hardware' => 'Adv. Hardware',
'adv_hardware_desc' => 'Latest mining tech.',
'auto_compound' => 'Auto Compound',
@ -873,7 +833,7 @@ $translations = [
'available_balance' => 'Available',
'balance' => 'Balance',
'kyc' => 'KYC',
'security' => 'Security',
'security' => 'Security Center',
'trade' => 'Trade',
'failed' => 'Failed',
'success' => 'Success',
@ -906,98 +866,24 @@ $translations = [
'google_play' => 'Google Play',
'android_apk' => 'Android APK',
'ios_install' => 'iOS Install',
'sec_contract' => 'Binary',
'sec_contract_desc' => 'Binary options.',
'mining_pool_desc' => 'Mining pool.',
'trading_experience' => 'Trading experience.',
'security_protection' => 'Security.',
'support_anywhere' => 'Support.',
'scan_to_download_app' => 'Scan to download.',
'open_orders' => 'Open Orders',
'settlement_history' => 'History',
'details' => 'Details',
'order_in_progress' => 'In progress',
'current_price' => 'Current Price',
'cycle' => 'Cycle',
'opening_price' => 'Opening Price',
'final_price_settlement' => 'Final Price',
'confirm_close_pos' => 'Confirm Close',
'pos_closed' => 'Closed',
'quantity' => 'Quantity',
'level' => 'Level',
'vip_level' => 'VIP Level',
'current_level' => 'Current Level',
'upgrade_progress' => 'Upgrade Progress',
'recharge_to_upgrade' => 'Recharge %amount% USDT to VIP %level%',
'vol_unit' => 'B',
'market_stats' => 'Market Stats',
'highest_level' => 'Highest Level',
'no_records' => 'No Records',
'order_details' => 'Order Details',
'copy' => 'Copy',
'scan_qr_to_download' => 'Scan QR',
'download_ios' => 'iOS',
'download_android' => 'Android',
'download_apk' => 'APK',
'features' => 'Features',
'app_mockup_desc' => 'Professional management.',
'getting_started' => 'Getting Started',
'getting_started_desc' => 'Start here.',
'dep_with_title' => 'Dep/With',
'dep_with_desc' => 'About funds.',
'trading_tutorials' => 'Tutorials',
'trading_tutorials_desc' => 'Learn trading.',
'sec_acc_title' => 'Security',
'sec_acc_desc' => 'Secure account.',
'api_doc_title' => 'API Docs',
'api_doc_desc' => 'Dev tools.',
'contact_sup_title' => 'Support',
'contact_sup_desc' => 'Contact us.',
'help_search_placeholder' => 'Search...',
'help_subtitle' => 'How can we help?',
'news_title_1' => 'New Listings',
'news_title_2' => 'Maintenance',
'news_title_3' => 'Partner Program',
'news_title_4' => 'Security Reminder',
'news_title_5' => 'Coming Soon',
'news_desc_1' => 'New pairs available.',
'news_desc_2' => 'Upgrade notice.',
'news_desc_3' => 'Join us.',
'news_desc_4' => 'Enable 2FA.',
'news_desc_5' => 'Listing soon.',
'news_meta' => 'Feb 14, 2026',
'price' => 'Price',
'app_guide_step1' => 'Scan the QR code with your camera or browser, or click the download button to get the package.',
'app_guide_step2' => 'Enable "Allow unknown sources" in settings after download to ensure smooth installation.',
'app_guide_step3' => 'Open the APP and login to start your digital asset trading journey.',
'app_install_auth' => 'Authorize',
'app_experience_now' => 'Experience Now',
'support_anywhere' => 'Support Anywhere',
'app_mockup_desc' => 'Take control of your digital assets in BYRO mobile app. Trade anywhere.',
'scan_qr_to_download' => 'Scan QR to Download',
'vol_unit' => 'M',
'from' => 'From',
'to' => 'To',
'rate' => 'Rate',
'price_impact' => 'Price Impact',
'slippage' => 'Slippage',
'order_records' => 'Order Records',
'recharge_records' => 'Recharge Records',
'withdrawal_records' => 'Withdrawal Records',
'unauthorized' => 'Unauthorized',
'account_frozen' => 'Account Frozen',
'invalid_amount' => 'Invalid Amount',
'start_mining' => 'Start Mining',
'swap_now' => 'Swap Now',
'login_password' => 'Login Password',
'old_password' => 'Old Password',
'new_password' => 'New Password',
'confirm_new_password' => 'Confirm New Password',
'change_password' => 'Change Password',
'trade_password' => 'Trade Password',
'set_password' => 'Set Password',
'security_steps' => 'Security Steps',
'security_step1' => 'For your asset security, please change your login password regularly.',
'security_step2' => 'The trade password is used for withdrawals and important transaction confirmations. Please keep it safe.',
'security_instructions' => 'The system uses bank-grade encryption technology and multi-factor authentication to protect your account security.',
'old_pwd_incorrect' => 'Old password incorrect',
'pwd_too_short' => 'Password must be at least 6 characters',
'pwd_changed_success' => 'Password changed successfully',
'trade_pwd_updated' => 'Trade password updated successfully',
'indicators' => 'Indicators',
'chart' => 'Chart',
'depth' => 'Depth',
'kline' => 'K-Line',
'start_mining' => 'Start Mining',
'time_fs' => 'Time',
'time_1m' => '1m',
'time_5m' => '5m',
@ -1007,9 +893,33 @@ $translations = [
'time_4h' => '4h',
'time_1d' => '1d',
'time_1w' => '1w',
'indicators' => 'Indicators',
'chart' => 'Chart',
'depth' => 'Depth',
'price' => 'Price',
'quantity' => 'Quantity',
'open_orders' => 'Open Orders',
'settlement_history' => 'Settlement History',
'details' => 'Details',
'confirm_close_pos' => 'Confirm to close position?',
'pos_closed' => 'Position closed',
'order_in_progress' => 'Order in Progress',
'current_price' => 'Current Price',
'opening_price' => 'Opening Price',
'final_price_settlement' => 'Final price settlement',
'error_msg_placeholder' => 'Error message',
'unauthorized' => 'Unauthorized',
'invalid_amount' => 'Invalid amount',
'account_frozen' => 'Account frozen',
'invalid_action' => 'Invalid action',
'request_failed' => 'Request failed',
'vip_level' => 'VIP Level',
'level' => 'Level',
'recharge_to_upgrade' => 'Recharge %amount% USDT more to reach VIP %level%',
'highest_level' => 'Highest Level Reached',
'USDT' => 'USDT',
'BTC' => 'BTC',
'ETH' => 'ETH',
'USDT' => 'USDT',
'BNB' => 'BNB',
'SOL' => 'SOL',
'XRP' => 'XRP',
@ -1017,23 +927,33 @@ $translations = [
'DOGE' => 'DOGE',
'DOT' => 'DOT',
'MATIC' => 'MATIC',
'AVAX' => 'AVAX',
'LINK' => 'LINK',
'SHIB' => 'SHIB',
'TRX' => 'TRX',
'BCH' => 'BCH',
'LTC' => 'LTC',
'UNI' => 'UNI',
'ARB' => 'ARB',
'OP' => 'OP',
'APT' => 'APT',
'USDC' => 'USDC',
'PEPE' => 'PEPE',
'FIL' => 'FIL',
'NEAR' => 'NEAR',
'ATOM' => 'ATOM',
'IMX' => 'IMX',
'KAS' => 'KAS',
'security_level' => 'Security Level',
'login_password' => 'Login Password',
'old_password' => 'Old Password',
'new_password' => 'New Password',
'confirm_new_password' => 'Confirm New Password',
'set_password' => 'Set Password',
'binding_phone' => 'Binding Phone',
'google_verification' => 'Google Verification',
'binding_mailbox' => 'Binding Mailbox',
'update' => 'Update',
'low' => 'Low',
'medium' => 'Medium',
'high' => 'High',
'bound' => 'Bound',
'not_bound' => 'Not Bound',
'copy' => 'Copy',
'old_pwd_incorrect' => 'Old password is incorrect',
'pwd_changed_success' => 'Password changed successfully',
'trade_pwd_updated' => 'Trade password updated',
'security_step1' => 'For your asset security, please bind your phone and email, and enable Google Verification.',
'security_step2' => 'Please keep your login and trade passwords safe and never disclose them to others.',
],
];

View File

@ -432,7 +432,7 @@ function renderTerminal($activeTab = 'spot') {
}
}).catch(err => {
console.error("Settlement failed", err);
order.status = 'Error';
order.status = '<?= __("failed") ?>';
showHistoryTab('open');
});
}
@ -1204,7 +1204,7 @@ function renderTerminal($activeTab = 'spot') {
<i class="bi bi-exclamation-octagon-fill"></i>
</div>
<h4><?= __('warning') ?></h4>
<p id="error-modal-msg">Error message goes here</p>
<p id="error-modal-msg"><?= __("error_msg_placeholder") ?></p>
<button class="btn btn-primary rounded-pill px-5 py-2 fw-bold" onclick="closeErrorModal()"><?= __('confirm') ?></button>
</div>
</div>

View File

@ -90,6 +90,29 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
<?= __('confirm_order') ?>
</button>
</form>
<div class="mt-5 p-4 bg-black bg-opacity-20 rounded-4 border border-secondary border-opacity-50">
<h6 class="text-white fw-bold mb-3 d-flex align-items-center gap-2">
<i class="bi bi-info-circle text-info"></i> <?= __('recharge_steps') ?>
</h6>
<ul class="text-white-50 small mb-0 ps-3">
<li class="mb-2"><?= __('recharge_step1') ?></li>
<li class="mb-2"><?= __('recharge_step2') ?></li>
<li class="mb-2"><?= __('recharge_step3') ?></li>
<li><?= __('recharge_step4') ?></li>
</ul>
</div>
<div class="bg-black bg-opacity-20 rounded-4 p-4 mt-4 border border-secondary border-opacity-50">
<h6 class="text-white fw-bold mb-3 d-flex align-items-center gap-2">
<i class="bi bi-shield-check text-warning"></i> <?= __('security_tips') ?>
</h6>
<ul class="text-white-50 small mb-0 ps-3">
<li class="mb-2"><?= __('recharge_tip1') ?></li>
<li class="mb-2"><?= __('recharge_tip2') ?></li>
<li><?= __('recharge_tip3') ?></li>
</ul>
</div>
</div>
<!-- Crypto Recharge -->
@ -104,15 +127,69 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
</div>
</div>
</div>
...
<style>
@media (max-width: 768px) {
.container { padding-left: 10px !important; padding-right: 10px !important; }
.card-body { padding: 1.25rem !important; }
.nav-pills .nav-link { padding: 10px 15px !important; font-size: 13px; }
.h4 { font-size: 1.25rem !important; }
}
</style>
<div class="mb-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('select_network') ?></label>
<div class="d-flex gap-2" id="networkSelectors">
<button type="button" class="btn btn-outline-primary active flex-fill py-2 rounded-3" onclick="selectNetwork('TRC20', '<?= $trc20_addr ?>')">TRC20</button>
<button type="button" class="btn btn-outline-secondary flex-fill py-2 rounded-3" onclick="selectNetwork('ERC20', '<?= $erc20_addr ?>')">ERC20</button>
<button type="button" class="btn btn-outline-secondary flex-fill py-2 rounded-3" onclick="selectNetwork('BEP20', '<?= $bep20_addr ?>')">BEP20</button>
</div>
</div>
<div class="mb-4 text-center">
<div class="p-3 bg-white rounded-4 d-inline-block mb-3 shadow-sm">
<img id="qrCode" src="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=<?= $trc20_addr ?>" width="150" height="150" alt="QR Code">
</div>
<div class="input-group">
<input type="text" id="cryptoAddress" class="form-control bg-dark border-secondary text-white text-center py-3" value="<?= $trc20_addr ?>" readonly>
<button class="btn btn-outline-primary px-4" type="button" onclick="copyAddress()"><?= __('copy') ?></button>
</div>
<p class="text-warning small mt-3 mb-0">
<i class="bi bi-exclamation-triangle-fill me-1"></i>
<?= __('crypto_recharge_warning') ?>
</p>
</div>
<div class="mb-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('recharge_amount') ?></label>
<div class="input-group">
<input type="number" class="form-control bg-dark border-secondary text-white py-3" id="cryptoAmount" placeholder="0.00">
<span class="input-group-text bg-dark border-secondary text-white-50 fw-bold">USDT</span>
</div>
</div>
<button type="button" class="btn btn-primary w-100 py-3 rounded-pill fw-bold shadow-lg" onclick="confirmCryptoOrder()">
<?= __('i_have_paid') ?>
</button>
<div class="mt-5 p-4 bg-black bg-opacity-20 rounded-4 border border-secondary border-opacity-50">
<h6 class="text-white fw-bold mb-3 d-flex align-items-center gap-2">
<i class="bi bi-info-circle text-info"></i> <?= __('recharge_steps') ?>
</h6>
<ul class="text-white-50 small mb-0 ps-3">
<li class="mb-2"><?= __('recharge_step1') ?></li>
<li class="mb-2"><?= __('recharge_step2') ?></li>
<li class="mb-2"><?= __('recharge_step3') ?></li>
<li><?= __('recharge_step4') ?></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
@media (max-width: 768px) {
.container { padding-left: 10px !important; padding-right: 10px !important; }
.card-body { padding: 1.25rem !important; }
.nav-pills .nav-link { padding: 10px 15px !important; font-size: 13px; }
.h4 { font-size: 1.25rem !important; }
}
</style>
<script>
let currentNetwork = 'TRC20';
@ -173,11 +250,11 @@ function confirmFiatOrder() {
const formData = new FormData();
formData.append('action', 'recharge');
formData.append('amount', estUsdt); // High precision USDT amount
formData.append('amount', estUsdt);
formData.append('symbol', 'USDT');
formData.append('fiat_amount', amount);
formData.append('fiat_currency', currency);
formData.append('method', 'Fiat (' + currency + ')');
formData.append('method', '<?= __('fiat_recharge') ?> (' + currency + ')');
fetch('/api/finance.php', {
method: 'POST',
@ -195,7 +272,7 @@ function confirmFiatOrder() {
.replace('%res%', preciseRes);
sendToCS(message);
} else {
alert(data.error || 'Request failed');
alert(data.error || '<?= __('request_failed') ?>');
}
});
}
@ -228,20 +305,18 @@ function confirmCryptoOrder() {
.replace('%amount%', amount);
sendToCS(message);
} else {
alert(data.error || 'Request failed');
alert(data.error || '<?= __('request_failed') ?>');
}
});
}
function sendToCS(message) {
// Open chat box
const csBox = document.getElementById('cs-box');
if (csBox.classList.contains('d-none')) {
if (csBox && csBox.classList.contains('d-none')) {
const toggle = document.getElementById('cs-toggle');
if (toggle) toggle.click();
}
// Auto-fill and send message
const csInput = document.getElementById('cs-input');
if (csInput) {
csInput.value = message;

View File

@ -53,6 +53,26 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$stmt = db()->prepare("SELECT transaction_password FROM users WHERE id = ?");
$stmt->execute([$user['id']]);
$hasTradePwd = !empty($stmt->fetchColumn());
// Calculate security level
$securityScore = 20; // Base score for having an account
if ($user['email']) $securityScore += 20;
if ($hasTradePwd) $securityScore += 20;
// Placeholders for other security features
$hasPhone = !empty($user['phone'] ?? '');
if ($hasPhone) $securityScore += 20;
$hasGoogle = !empty($user['google_2fa_secret'] ?? '');
if ($hasGoogle) $securityScore += 20;
$securityLevelKey = 'low';
$levelClass = 'bg-danger';
if ($securityScore >= 80) {
$securityLevelKey = 'high';
$levelClass = 'bg-success';
} elseif ($securityScore >= 50) {
$securityLevelKey = 'medium';
$levelClass = 'bg-warning';
}
?>
<div class="container py-4">
@ -68,7 +88,7 @@ $hasTradePwd = !empty($stmt->fetchColumn());
<div class="card bg-surface border-secondary rounded-4 shadow-lg overflow-hidden mb-4">
<div class="card-header border-secondary bg-black bg-opacity-30 p-4">
<h4 class="mb-0 fw-bold d-flex align-items-center gap-3 text-white">
<i class="bi bi-lock text-danger"></i>
<i class="bi bi-shield-lock-fill text-primary"></i>
<?= __('security') ?>
</h4>
</div>
@ -86,80 +106,151 @@ $hasTradePwd = !empty($stmt->fetchColumn());
</div>
<?php endif; ?>
<!-- Login Password Section -->
<!-- Security Level -->
<div class="mb-5">
<h5 class="text-white fw-bold mb-4 d-flex align-items-center gap-2">
<i class="bi bi-key text-primary"></i> <?= __('login_password') ?>
</h5>
<form method="POST">
<input type="hidden" name="action" value="change_login_password">
<div class="row g-3">
<div class="col-md-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('old_password') ?></label>
<input type="password" name="old_password" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('old_password') ?>" required>
</div>
<div class="col-md-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('new_password') ?></label>
<input type="password" name="new_password" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('new_password') ?>" required>
</div>
<div class="col-md-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('confirm_new_password') ?></label>
<input type="password" name="confirm_new_password" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('confirm_new_password') ?>" required>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary rounded-pill px-5 py-2 mt-2 shadow-primary fw-bold"><?= __('change_password') ?></button>
</div>
</div>
</form>
<div class="d-flex justify-content-between align-items-center mb-3">
<h6 class="text-white fw-bold mb-0"><?= __('security_level') ?></h6>
<span class="badge <?= $levelClass ?> px-3 py-2 rounded-pill"><?= __($securityLevelKey) ?></span>
</div>
<div class="progress bg-black bg-opacity-50 rounded-pill shadow-sm" style="height: 10px;">
<div class="progress-bar <?= $levelClass ?> progress-bar-striped progress-bar-animated" role="progressbar" style="width: <?= $securityScore ?>%"></div>
</div>
</div>
<hr class="border-secondary mb-5">
<!-- Trade Password Section -->
<div>
<h5 class="text-white fw-bold mb-4 d-flex align-items-center gap-2">
<i class="bi bi-shield-lock text-warning"></i> <?= __('trade_password') ?>
</h5>
<form method="POST">
<input type="hidden" name="action" value="set_trade_password">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label text-white-50 small fw-bold mb-2"><?= $hasTradePwd ? __('new_password') : __('set_password') ?></label>
<input type="password" name="trade_password" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= $hasTradePwd ? __('new_password') : __('set_password') ?>" required>
<!-- Security List -->
<div class="security-list">
<!-- Phone Binding -->
<div class="d-flex align-items-center justify-content-between py-4 border-bottom border-secondary border-opacity-50">
<div class="d-flex align-items-center gap-3">
<div class="icon-box rounded-circle bg-primary bg-opacity-10 d-flex align-items-center justify-content-center" style="width: 48px; height: 48px;">
<i class="bi bi-phone text-primary fs-4"></i>
</div>
<div class="col-md-6">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('confirm_new_password') ?></label>
<input type="password" name="confirm_trade_password" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('confirm_new_password') ?>" required>
</div>
<div class="col-12">
<button type="submit" class="btn btn-warning rounded-pill px-5 py-2 mt-2 text-dark fw-bold shadow-lg"><?= $hasTradePwd ? __('change_password') : __('set_password') ?></button>
<div>
<div class="text-white fw-bold"><?= __('binding_phone') ?></div>
<div class="text-white-50 small"><?= $hasPhone ? htmlspecialchars($user['phone']) : __('not_bound') ?></div>
</div>
</div>
</form>
<a href="#" class="btn btn-outline-light btn-sm rounded-pill px-4"><?= __('update') ?></a>
</div>
<!-- Login Password -->
<div class="d-flex align-items-center justify-content-between py-4 border-bottom border-secondary border-opacity-50">
<div class="d-flex align-items-center gap-3">
<div class="icon-box rounded-circle bg-success bg-opacity-10 d-flex align-items-center justify-content-center" style="width: 48px; height: 48px;">
<i class="bi bi-key text-success fs-4"></i>
</div>
<div>
<div class="text-white fw-bold"><?= __('login_password') ?></div>
<div class="text-white-50 small">********</div>
</div>
</div>
<button type="button" class="btn btn-outline-light btn-sm rounded-pill px-4" data-bs-toggle="collapse" data-bs-target="#loginPwdForm"><?= __('update') ?></button>
</div>
<div class="collapse mt-3" id="loginPwdForm">
<div class="p-4 bg-black bg-opacity-20 rounded-4 border border-secondary mb-4">
<form method="POST">
<input type="hidden" name="action" value="change_login_password">
<div class="row g-3">
<div class="col-md-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('old_password') ?></label>
<input type="password" name="old_password" class="form-control bg-dark border-secondary text-white" required>
</div>
<div class="col-md-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('new_password') ?></label>
<input type="password" name="new_password" class="form-control bg-dark border-secondary text-white" required>
</div>
<div class="col-md-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('confirm_new_password') ?></label>
<input type="password" name="confirm_new_password" class="form-control bg-dark border-secondary text-white" required>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary rounded-pill px-4 mt-2"><?= __('confirm') ?></button>
</div>
</div>
</form>
</div>
</div>
<!-- Google 2FA -->
<div class="d-flex align-items-center justify-content-between py-4 border-bottom border-secondary border-opacity-50">
<div class="d-flex align-items-center gap-3">
<div class="icon-box rounded-circle bg-warning bg-opacity-10 d-flex align-items-center justify-content-center" style="width: 48px; height: 48px;">
<i class="bi bi-shield-lock text-warning fs-4"></i>
</div>
<div>
<div class="text-white fw-bold"><?= __('google_verification') ?></div>
<div class="text-white-50 small"><?= $hasGoogle ? __('bound') : __('not_bound') ?></div>
</div>
</div>
<a href="#" class="btn btn-outline-light btn-sm rounded-pill px-4"><?= __('update') ?></a>
</div>
<!-- Email Binding -->
<div class="d-flex align-items-center justify-content-between py-4">
<div class="d-flex align-items-center gap-3">
<div class="icon-box rounded-circle bg-info bg-opacity-10 d-flex align-items-center justify-content-center" style="width: 48px; height: 48px;">
<i class="bi bi-envelope text-info fs-4"></i>
</div>
<div>
<div class="text-white fw-bold"><?= __('binding_mailbox') ?></div>
<div class="text-white-50 small"><?= htmlspecialchars($user['email']) ?></div>
</div>
</div>
<a href="#" class="btn btn-outline-light btn-sm rounded-pill px-4"><?= __('update') ?></a>
</div>
</div>
<!-- Trade Password (Existing) -->
<div class="mt-5 pt-4 border-top border-secondary border-opacity-50">
<div class="d-flex align-items-center justify-content-between mb-4">
<h5 class="text-white fw-bold mb-0">
<i class="bi bi-safe2 text-warning me-2"></i> <?= __('trade_password') ?>
</h5>
<button type="button" class="btn btn-warning btn-sm rounded-pill px-4 text-dark fw-bold" data-bs-toggle="collapse" data-bs-target="#tradePwdForm">
<?= $hasTradePwd ? __('update') : __('set_password') ?>
</button>
</div>
<div class="collapse" id="tradePwdForm">
<div class="p-4 bg-black bg-opacity-20 rounded-4 border border-secondary">
<form method="POST">
<input type="hidden" name="action" value="set_trade_password">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label text-white-50 small fw-bold mb-2"><?= $hasTradePwd ? __('new_password') : __('set_password') ?></label>
<input type="password" name="trade_password" class="form-control bg-dark border-secondary text-white" required>
</div>
<div class="col-md-6">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('confirm_new_password') ?></label>
<input type="password" name="confirm_trade_password" class="form-control bg-dark border-secondary text-white" required>
</div>
<div class="col-12 text-end">
<button type="submit" class="btn btn-warning rounded-pill px-5 text-dark fw-bold"><?= __('confirm') ?></button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="bg-black bg-opacity-20 rounded-4 p-4 mt-5 border border-secondary border-opacity-50">
<h6 class="text-white fw-bold mb-3 d-flex align-items-center gap-2">
<i class="bi bi-info-circle text-info"></i> <?= __('security_steps') ?>
<i class="bi bi-info-circle text-info"></i> <?= __('security_tips') ?>
</h6>
<ul class="text-white-50 small mb-0 ps-3">
<li class="mb-2"><?= __('security_step1') ?></li>
<li><?= __('security_step2') ?></li>
</ul>
</div>
<div class="card bg-black bg-opacity-20 border-secondary rounded-4 mt-4">
<div class="card-body p-4">
<h6 class="text-white fw-bold mb-3"><i class="bi bi-shield-shaded text-primary me-2"></i> <?= __('security_instructions') ?></h6>
<p class="text-white-50 small mb-0">
<?= __('security_instructions') ?>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
.icon-box { transition: all 0.3s ease; }
.security-list > div:hover .icon-box { transform: scale(1.1); }
.btn-outline-light:hover { background: var(--primary); border-color: var(--primary); }
</style>
<?php include __DIR__ . '/includes/footer.php'; ?>

View File

@ -56,20 +56,135 @@ $available = $bal['available'] ?? 0;
</div>
</div>
</div>
...
<style>
@media (max-width: 768px) {
.container { padding-left: 10px !important; padding-right: 10px !important; }
.card-body { padding: 1.25rem !important; }
.nav-pills .nav-link { padding: 10px 15px !important; font-size: 13px; }
.h4 { font-size: 1.25rem !important; }
}
</style>
<div class="mb-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('select_network') ?></label>
<div class="d-flex gap-2" id="withdrawNetworkSelectors">
<button type="button" class="btn btn-outline-warning active flex-fill py-2 rounded-3" onclick="selectWithdrawNetwork('TRC20')">TRC20</button>
<button type="button" class="btn btn-outline-secondary flex-fill py-2 rounded-3" onclick="selectWithdrawNetwork('ERC20')">ERC20</button>
<button type="button" class="btn btn-outline-secondary flex-fill py-2 rounded-3" onclick="selectWithdrawNetwork('BEP20')">BEP20</button>
</div>
</div>
<div class="mb-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('withdraw_address') ?></label>
<input type="text" id="withdrawAddress" class="form-control bg-dark border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('enter_address') ?>">
</div>
<div class="mb-4">
<div class="d-flex justify-content-between mb-2">
<label class="form-label text-white-50 small fw-bold mb-0"><?= __('withdraw_amount') ?></label>
<span class="small text-white-50"><?= __('available_balance') ?>: <span class="text-warning"><?= number_format($available, 2) ?> USDT</span></span>
</div>
<div class="input-group">
<input type="number" id="withdrawAmount" class="form-control bg-dark border-secondary text-white py-3 rounded-start-4" placeholder="<?= __('min_withdraw_hint') ?>" oninput="calculateCryptoWithdraw()">
<button class="btn btn-outline-warning px-3 rounded-end-4" type="button" onclick="setMax('withdrawAmount')"><?= __('all') ?></button>
</div>
</div>
<div class="mb-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('withdraw_password') ?></label>
<input type="password" id="withdrawPassword" class="form-control bg-dark border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('withdraw_pwd_placeholder') ?>">
</div>
<div class="mb-5 p-4 bg-warning bg-opacity-10 border border-warning border-opacity-20 rounded-4">
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="text-white-50 small"><?= __('withdraw_fee') ?></span>
<span class="text-white fw-bold small">1.00 USDT</span>
</div>
<div class="d-flex justify-content-between align-items-center">
<span class="text-white-50"><?= __('to_receive') ?></span>
<span class="h4 mb-0 fw-bold text-warning" id="cryptoReceiveAmount">0.00 USDT</span>
</div>
</div>
<button type="button" class="btn btn-warning w-100 py-3 rounded-pill fw-bold shadow-lg text-dark" onclick="confirmCryptoWithdraw()">
<?= __('confirm') ?>
</button>
</form>
</div>
<!-- Fiat Withdrawal -->
<div class="tab-pane fade" id="fiat-withdraw" role="tabpanel">
<form id="fiatWithdrawForm">
<div class="mb-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('select_currency') ?></label>
<select class="form-select bg-dark border-secondary text-white py-3" id="fiatWithdrawCurrency" onchange="updateFiatWithdrawRate()">
<option value="USD" data-rate="1">🇺🇸 USD - <?= __('usd_name') ?></option>
<option value="EUR" data-rate="0.92">🇪🇺 EUR - <?= __('eur_name') ?></option>
<option value="GBP" data-rate="0.79">🇬🇧 GBP - <?= __('gbp_name') ?></option>
<option value="CNY" data-rate="7.19">🇨🇳 CNY - <?= __('cny_name') ?></option>
<option value="JPY" data-rate="150.2">🇯🇵 JPY - <?= __('jpy_name') ?></option>
<option value="HKD" data-rate="7.82">🇭🇰 HKD - <?= __('hkd_name') ?></option>
<option value="TWD" data-rate="31.5">🇹🇼 TWD - <?= __('twd_name') ?></option>
<option value="VND" data-rate="24500">🇻🇳 VND - <?= __('vnd_name') ?></option>
</select>
</div>
<div class="mb-4">
<div class="d-flex justify-content-between mb-2">
<label class="form-label text-white-50 small fw-bold mb-0"><?= __('withdraw_amount') ?> (USDT)</label>
<span class="small text-white-50"><?= __('available_balance') ?>: <span class="text-warning"><?= number_format($available, 2) ?> USDT</span></span>
</div>
<div class="input-group">
<input type="number" id="fiatWithdrawAmount" class="form-control bg-dark border-secondary text-white py-3 rounded-start-4" placeholder="<?= __('min_withdraw_hint') ?>" oninput="calculateFiatWithdraw()">
<button class="btn btn-outline-warning px-3 rounded-end-4" type="button" onclick="setMax('fiatWithdrawAmount')"><?= __('all') ?></button>
</div>
</div>
<div class="mb-4">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('withdraw_password') ?></label>
<input type="password" id="fiatWithdrawPassword" class="form-control bg-dark border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('withdraw_pwd_placeholder') ?>">
</div>
<div class="mb-5 p-4 bg-warning bg-opacity-10 border border-warning border-opacity-20 rounded-4">
<div class="d-flex justify-content-between align-items-center mb-2">
<span class="text-white-50 small"><?= __('rate') ?></span>
<span class="text-white fw-bold small">1 USDT <span id="fiatWithdrawRateText">1.00 USD</span></span>
</div>
<div class="d-flex justify-content-between align-items-center">
<span class="text-white-50"><?= __('to_receive') ?></span>
<span class="h4 mb-0 fw-bold text-warning" id="fiatReceiveAmount">0.00 USD</span>
</div>
</div>
<button type="button" class="btn btn-warning w-100 py-3 rounded-pill fw-bold shadow-lg text-dark" onclick="confirmFiatWithdraw()">
<?= __('confirm') ?>
</button>
</form>
</div>
</div>
<div class="mt-5 p-4 bg-black bg-opacity-20 rounded-4 border border-secondary border-opacity-50">
<h6 class="text-white fw-bold mb-3 d-flex align-items-center gap-2">
<i class="bi bi-info-circle text-info"></i> <?= __('withdraw_steps') ?>
</h6>
<ul class="text-white-50 small mb-0 ps-3">
<li class="mb-2"><?= __('withdraw_step1') ?></li>
<li class="mb-2"><?= __('withdraw_step2') ?></li>
<li class="mb-2"><?= __('withdraw_step3') ?></li>
<li><?= __('withdraw_step4') ?></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
@media (max-width: 768px) {
.container { padding-left: 10px !important; padding-right: 10px !important; }
.card-body { padding: 1.25rem !important; }
.nav-pills .nav-link { padding: 10px 15px !important; font-size: 13px; }
.h4 { font-size: 1.25rem !important; }
}
</style>
<script>
let currentWithdrawNetwork = 'TRC20';
function setMax(inputId, displayId) {
function setMax(inputId) {
document.getElementById(inputId).value = <?= $available ?>;
if (inputId === 'withdrawAmount') calculateCryptoWithdraw();
else calculateFiatWithdraw();
@ -144,7 +259,7 @@ function confirmCryptoWithdraw() {
.replace('%amount%', amount.toFixed(2));
sendWithdrawToCS(message);
} else {
alert(data.error || 'Request failed');
alert(data.error || '<?= __('request_failed') ?>');
}
});
}
@ -165,11 +280,11 @@ function confirmFiatWithdraw() {
const formData = new FormData();
formData.append('action', 'withdraw');
formData.append('amount', amount); // USDT amount
formData.append('amount', amount);
formData.append('symbol', 'USDT');
formData.append('fiat_amount', estFiat);
formData.append('fiat_currency', currency);
formData.append('address', 'Fiat (' + currency + ')');
formData.append('address', '<?= __('fiat_withdraw') ?> (' + currency + ')');
formData.append('password', password);
fetch('/api/finance.php', {
@ -188,20 +303,18 @@ function confirmFiatWithdraw() {
.replace('%res%', preciseRes);
sendWithdrawToCS(message);
} else {
alert(data.error || 'Request failed');
alert(data.error || '<?= __('request_failed') ?>');
}
});
}
function sendWithdrawToCS(message) {
// Open chat box
const csBox = document.getElementById('cs-box');
if (csBox.classList.contains('d-none')) {
if (csBox && csBox.classList.contains('d-none')) {
const toggle = document.getElementById('cs-toggle');
if (toggle) toggle.click();
}
// Auto-fill and send message
const csInput = document.getElementById('cs-input');
if (csInput) {
csInput.value = message;