Autosave: 20260216-085958

This commit is contained in:
Flatlogic Bot 2026-02-16 08:59:58 +00:00
parent e5387b40a5
commit f9df2bc6db
20 changed files with 1132 additions and 422 deletions

View File

@ -130,3 +130,43 @@ body {
70% { transform: scale(1.2); opacity: 1; }
100% { transform: scale(0.95); opacity: 0.7; }
}
@media (max-width: 768px) {
.carousel-content {
height: 400px !important;
padding: 20px !important;
}
.display-3 {
font-size: 1.8rem !important;
}
.lead {
font-size: 1rem !important;
}
.btn-lg {
padding: 10px 20px !important;
font-size: 14px !important;
}
.market-section h2 {
font-size: 1.5rem;
}
.col-md-3 {
width: 50% !important;
flex: 0 0 auto;
}
.coin-card .card-body {
padding: 15px !important;
}
.price-display {
font-size: 1.2rem !important;
}
.icon-box {
width: 50px;
height: 50px;
}
.icon-box i {
font-size: 1.5rem !important;
}
.why-us h2 {
font-size: 1.8rem !important;
}
}

View File

@ -3,22 +3,78 @@
--bg: #0b0e11;
--surface: #1e2329;
--text: #eaecef;
--text-muted: #9ba3af; /* Improved contrast from #888888 */
--text-muted: #9ba3af;
--border: #2b3139;
--success: #26a69a;
--danger: #ef5350;
--warning: #f0b90b;
}
body {
background-color: var(--bg);
color: var(--text);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
font-family: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif;
margin: 0;
padding: 0;
line-height: 1.5;
}
/* Background Utilities */
.bg-surface { background-color: var(--surface) !important; }
.bg-black { background-color: #000000 !important; }
.bg-dark { background-color: var(--bg) !important; }
/* Border Utilities */
.border-secondary { border-color: var(--border) !important; }
/* Text Utilities */
.text-white-50 { color: rgba(255, 255, 255, 0.5) !important; }
.text-primary { color: var(--primary) !important; }
.text-warning { color: var(--warning) !important; }
/* Card Overrides */
.card {
background-color: var(--surface);
border-color: var(--border);
}
.card-header {
background-color: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid var(--border);
}
/* List Group Overrides */
.list-group-item {
background-color: transparent;
border-color: var(--border);
color: var(--text);
}
.list-group-item-action:hover {
background-color: rgba(255, 255, 255, 0.05);
color: var(--primary);
}
/* Form Overrides */
.form-control, .form-select {
background-color: #000000;
border-color: var(--border);
color: #ffffff;
}
.form-control:focus, .form-select:focus {
background-color: #121212;
border-color: var(--primary);
color: #ffffff;
box-shadow: 0 0 0 0.25rem rgba(0, 98, 255, 0.25);
}
/* Table Overrides */
.table-dark {
--bs-table-bg: var(--surface);
--bs-table-border-color: var(--border);
}
* {
box-sizing: border-box;
}
@ -65,12 +121,54 @@ a:hover {
padding: 80px 0;
}
/* Auth related */
.auth-container {
max-width: 440px;
margin: 80px auto;
padding: 40px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
/* Mobile Enhancements */
@media (max-width: 768px) {
.container {
padding-left: 15px;
padding-right: 15px;
}
.display-3 {
font-size: 2.5rem;
}
.display-4 {
font-size: 2rem;
}
.card {
border-radius: 12px !important;
}
.btn {
padding: 12px 20px;
border-radius: 10px;
}
header {
height: 60px;
padding: 0 15px;
}
.logo-text {
font-size: 20px;
}
}
/* Custom Scrollbar */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: var(--bg);
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}
.shadow-primary {
box-shadow: 0 8px 20px rgba(0, 98, 255, 0.3) !important;
}
.transition-all {
transition: all 0.3s ease;
}

View File

@ -12,13 +12,44 @@
--orderbook-width: 300px;
}
/* Global Terminal Layout */
.terminal-container {
display: flex;
flex-direction: column;
height: 100vh;
min-height: calc(100vh - 70px);
height: auto;
background: var(--term-bg);
color: var(--term-text);
overflow: hidden;
}
.terminal-main {
display: flex;
flex: 1;
min-height: calc(100vh - 70px);
}
.terminal-sidebar {
width: var(--sidebar-width);
border-right: 1px solid var(--term-border);
display: flex;
flex-direction: column;
background: var(--term-surface);
height: 100%;
}
.terminal-content {
flex: 1;
display: flex;
flex-direction: column;
border-right: 1px solid var(--term-border);
background: var(--term-bg);
}
.terminal-right-sidebar {
width: var(--orderbook-width);
border-left: 1px solid var(--term-border);
background: var(--term-surface);
height: 100%;
}
.sidebar-tabs {
@ -80,29 +111,45 @@
}
.content-header {
height: 50px;
height: 65px;
border-bottom: 1px solid var(--term-border);
display: flex;
align-items: center;
padding: 0 15px;
gap: 20px;
padding: 0 20px;
gap: 30px;
background: var(--term-surface);
}
.terminal-sidebar {
width: var(--sidebar-width);
border-right: 1px solid var(--term-border);
display: flex;
flex-direction: column;
background: var(--term-surface);
.kline-container {
flex: 1;
min-height: 500px; /* Increased height for better preview */
background: #000;
position: relative;
border-bottom: 1px solid var(--term-border);
padding: 5px 0; /* Added a bit of padding to avoid edges */
}
.terminal-right-sidebar {
width: var(--orderbook-width);
border-left: 1px solid var(--term-border);
.trading-panels {
padding: 15px 20px;
background: var(--term-surface);
border-bottom: 1px solid var(--term-border);
}
.binary-order-panel .cycle-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 10px;
margin-bottom: 15px;
}
.cycle-btn {
min-height: 55px;
padding: 8px 4px;
/* ... existing styles ... */
}
.sidebar-search input {
background: #0b0e11;
@ -255,20 +302,169 @@
border-bottom: 2px solid var(--term-primary);
}
.terminal-main {
display: flex;
flex: 1;
overflow: hidden;
/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
.terminal-main {
flex-direction: column;
height: auto;
overflow-y: auto;
padding-bottom: 120px; /* Ensure records are not covered by bottom nav */
}
.terminal-sidebar {
position: fixed;
left: -100%;
top: 0;
width: 80%;
height: 100%;
z-index: 1050;
transition: left 0.3s ease;
box-shadow: 10px 0 20px rgba(0,0,0,0.5);
}
.terminal-sidebar.active {
left: 0;
}
.terminal-sidebar-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.7);
z-index: 1040;
display: none;
}
.terminal-sidebar-overlay.active {
display: block;
}
.terminal-right-sidebar {
display: none; /* Hide order book on mobile by default to save space */
}
.terminal-content {
width: 100%;
border-right: none;
}
.content-header {
padding: 10px;
gap: 10px;
height: auto;
flex-wrap: wrap;
}
.header-pair {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
}
.header-stat {
font-size: 11px;
}
.kline-container {
min-height: 350px;
height: 350px;
}
.trading-panels {
padding: 10px;
}
.cycle-grid {
grid-template-columns: repeat(3, 1fr);
}
.order-history {
height: auto;
min-height: 400px;
}
.sidebar-tabs {
display: none; /* We will use a different top switcher on mobile */
}
/* Mobile Top Switcher */
.mobile-type-switcher {
display: flex;
background: var(--term-surface);
padding: 5px;
gap: 5px;
border-bottom: 1px solid var(--term-border);
}
.mobile-type-switcher a {
flex: 1;
text-align: center;
padding: 8px 0;
font-size: 12px;
color: var(--term-muted);
text-decoration: none;
border-radius: 4px;
background: rgba(255,255,255,0.03);
}
.mobile-type-switcher a.active {
background: var(--term-primary);
color: #fff;
}
.mobile-pair-toggle {
display: flex;
align-items: center;
gap: 10px;
cursor: pointer;
}
/* Make trading panels more mobile-friendly */
.order-form-container .col-6 {
width: 100%; /* Stack Buy/Sell on very small screens or keep as is? */
}
@media (max-width: 576px) {
.order-form-container .col-6 {
width: 100%;
}
.binary-order-panel .col-6 {
width: 100%;
}
.binary-order-panel .btn-buy-sell {
margin-bottom: 10px;
}
}
.btn-buy-sell {
font-size: 18px !important;
padding: 15px !important;
text-transform: uppercase;
letter-spacing: 1px;
}
.cycle-grid {
gap: 5px;
}
.cycle-btn {
padding: 8px 2px;
}
}
.terminal-sidebar {
width: var(--sidebar-width);
border-right: 1px solid var(--term-border);
display: flex;
flex-direction: column;
background: var(--term-surface);
@media (min-width: 769px) {
.mobile-type-switcher {
display: none;
}
}
.sidebar-search {
padding: 12px;
border-bottom: 1px solid var(--term-border);
@ -328,12 +524,7 @@
font-weight: 500;
}
.terminal-content {
flex: 1;
display: flex;
flex-direction: column;
border-right: 1px solid var(--term-border);
}
.content-header {
height: 60px;
@ -346,22 +537,29 @@
.kline-container {
flex: 1;
min-height: 400px;
min-height: 450px;
background: #000;
position: relative;
border-bottom: 1px solid var(--term-border);
}
.trading-panels {
padding: 20px;
padding: 15px 20px;
background: var(--term-surface);
}
.order-history {
flex: 1;
overflow-y: auto;
scrollbar-width: none;
.terminal-content {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.order-history::-webkit-scrollbar {
display: none;
.order-history {
height: 350px;
border-top: 1px solid var(--term-border);
background: var(--term-surface);
overflow-y: auto;
}
/* Binary Order Panel Improvements */
@ -389,6 +587,8 @@
align-items: center;
justify-content: center;
gap: 2px;
min-height: 55px;
cursor: pointer;
}
.cycle-btn:hover {
@ -460,7 +660,7 @@
}
.order-history {
height: 300px; /* Fixed height for scrollable area */
height: 450px; /* Increased height as requested */
border-top: 1px solid var(--term-border);
background: var(--term-surface);
}
@ -573,7 +773,5 @@
color: #5e6673;
}
.terminal-main {
height: calc(100vh - var(--header-height));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -48,7 +48,7 @@ include __DIR__ . '/../includes/header.php';
<span class="logo-text fs-1 ms-2" style="letter-spacing: 2px;">BYRO</span>
</div>
<h2 class="fw-bold text-white mb-2"><?= __('login') ?></h2>
<p class="text-muted">Welcome back to Byro Exchange</p>
<p class="text-muted"><?= __('welcome_back') ?></p>
</div>
<?php if ($error): ?>
@ -59,14 +59,14 @@ include __DIR__ . '/../includes/header.php';
<form method="POST">
<div class="mb-4">
<label class="form-label text-muted small fw-bold"><?= __('account') ?? 'Account / Email' ?></label>
<label class="form-label text-muted small fw-bold"><?= __('account') ?></label>
<input type="text" name="account" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" style="background: #0b0e11 !important; border-color: #2b3139 !important;" required>
</div>
<div class="mb-4">
<div class="d-flex justify-content-between">
<label class="form-label text-muted small fw-bold"><?= __('password') ?></label>
<a href="#" class="small text-primary text-decoration-none">忘记密码?</a>
<a href="#" class="small text-primary text-decoration-none"><?= __('forgot_password') ?></a>
</div>
<input type="password" name="password" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" style="background: #0b0e11 !important; border-color: #2b3139 !important;" required>
</div>
@ -74,7 +74,7 @@ include __DIR__ . '/../includes/header.php';
<button type="submit" class="btn btn-primary w-100 py-3 fw-bold rounded-pill mb-4 shadow-primary"><?= __('login') ?></button>
<div class="text-center small text-muted">
还没有账号? <a href="/auth/register.php" class="text-primary fw-bold text-decoration-none"><?= __('register') ?></a>
<?= __('no_account') ?> <a href="/auth/register.php" class="text-primary fw-bold text-decoration-none"><?= __('register') ?></a>
</div>
</form>
</div>

View File

@ -81,7 +81,7 @@ include __DIR__ . '/../includes/header.php';
<span class="logo-text fs-1 ms-2" style="letter-spacing: 2px;">BYRO</span>
</div>
<h2 class="fw-bold text-white mb-2"><?= __('register') ?></h2>
<p class="text-muted">Join the most secure digital asset exchange</p>
<p class="text-muted"><?= __('join_secure') ?></p>
</div>
<?php if ($error): ?>
@ -126,7 +126,7 @@ include __DIR__ . '/../includes/header.php';
<button type="submit" class="btn btn-primary w-100 py-3 fw-bold rounded-pill mb-4 shadow-primary"><?= __('register') ?></button>
<div class="text-center small text-muted">
已经有账号? <a href="/auth/login.php" class="text-primary fw-bold text-decoration-none"><?= __('login') ?></a>
<?= __('have_account') ?> <a href="/auth/login.php" class="text-primary fw-bold text-decoration-none"><?= __('login') ?></a>
</div>
</form>
</div>

View File

@ -69,6 +69,65 @@
</div>
</footer>
<!-- Mobile Bottom Navigation -->
<div class="mobile-nav d-md-none border-top border-secondary bg-surface">
<a href="/" class="<?= $_SERVER['PHP_SELF'] == '/index.php' ? 'active' : '' ?>">
<i class="bi bi-house-door"></i>
<span><?= __('home') ?></span>
</a>
<a href="/market.php" class="<?= $_SERVER['PHP_SELF'] == '/market.php' ? 'active' : '' ?>">
<i class="bi bi-graph-up"></i>
<span><?= __('market_name') ?></span>
</a>
<a href="/trade.php" class="<?= in_array($_SERVER['PHP_SELF'], ['/trade.php', '/contract.php', '/binary.php']) ? 'active' : '' ?>">
<i class="bi bi-arrow-left-right"></i>
<span><?= __('trading') ?></span>
</a>
<a href="/profile.php" class="<?= $_SERVER['PHP_SELF'] == '/profile.php' ? 'active' : '' ?>">
<i class="bi bi-wallet2"></i>
<span><?= __('assets') ?></span>
</a>
</div>
<style>
.mobile-nav {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 65px;
display: flex;
justify-content: space-around;
align-items: center;
z-index: 10000;
padding-bottom: env(safe-area-inset-bottom);
background: rgba(18, 18, 18, 0.95) !important;
backdrop-filter: blur(10px);
}
.mobile-nav a {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
color: var(--text-muted);
font-size: 11px;
font-weight: 500;
transition: all 0.3s;
}
.mobile-nav a i {
font-size: 20px;
margin-bottom: 2px;
}
.mobile-nav a.active {
color: var(--primary);
}
/* Hide desktop elements on mobile if needed */
@media (max-width: 768px) {
body { padding-bottom: 80px; }
#cs-widget { bottom: 80px !important; }
}
</style>
<!-- Customer Service Widget -->
<div id="cs-widget" style="position: fixed; bottom: 30px; right: 30px; z-index: 9999;">
<button class="btn btn-primary rounded-circle shadow-lg p-0 d-flex align-items-center justify-content-center transition-all" id="cs-toggle" style="width: 70px; height: 70px; border: none; background: linear-gradient(135deg, #00c6ff, #0072ff); box-shadow: 0 10px 20px rgba(0, 114, 255, 0.4);">
@ -107,16 +166,16 @@
<div class="bg-primary p-3 d-flex justify-content-between align-items-center text-white">
<div class="d-flex align-items-center gap-2">
<div class="bg-white rounded-circle" style="width: 10px; height: 10px;"></div>
<span class="fw-bold">Online Support</span>
<span class="fw-bold"><?= __('online_support') ?></span>
</div>
<button class="btn btn-sm text-white border-0" id="cs-close"><i class="bi bi-x-lg"></i></button>
</div>
<div id="cs-messages" class="flex-grow-1 p-3 overflow-y-auto" style="scrollbar-width: none;">
<div class="text-center text-muted small mb-3">Welcome to Byro Support! How can we help?</div>
<div class="text-center text-muted small mb-3"><?= __('welcome_support') ?></div>
</div>
<div class="p-3 border-top border-secondary bg-black bg-opacity-20">
<form id="cs-form" class="d-flex gap-2">
<input type="text" id="cs-input" class="form-control form-control-sm bg-dark border-secondary text-white" placeholder="Type a message...">
<input type="text" id="cs-input" class="form-control form-control-sm bg-dark border-secondary text-white" placeholder="<?= __('type_message') ?>">
<button type="submit" class="btn btn-primary btn-sm px-3"><i class="bi bi-send-fill"></i></button>
</form>
</div>

View File

@ -84,6 +84,20 @@ function getSetting($key, $default = null) {
gap: 24px;
flex: 1;
}
@media (max-width: 992px) {
nav {
display: none;
}
.logo-container {
margin-right: auto;
}
.profile-trigger span {
display: none;
}
.profile-trigger {
padding: 8px;
}
}
nav a {
color: var(--text);
text-decoration: none;
@ -196,7 +210,7 @@ function getSetting($key, $default = null) {
position: absolute;
top: calc(100% + 10px);
right: 0;
background: #1e2329;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
width: 260px;

View File

@ -56,14 +56,6 @@ $translations = [
'change_24h' => '24h 涨跌',
'trade' => '交易',
'why_choose_us' => '为什么选择我们',
'security_title' => '顶尖风控',
'security_desc' => '多重签名冷钱包存储,确保资产绝对安全。',
'liquidity_title' => '极速成交',
'liquidity_desc' => '毫秒级撮合系统,高达 10w TPS 处理能力。',
'support_title' => '24/7 全球支持',
'support_desc' => '专业团队即时响应,为您解决任何交易问题。',
'diversity_title' => '丰富产品线',
'diversity_desc' => '涵盖现货、合约、杠杆等多元化金融产品。',
'copyright' => '© 2023-2026 Byro. 版权所有。',
'status_normal' => '系统状态:正常',
'advantage_1_title' => '安全合规',
@ -74,10 +66,7 @@ $translations = [
'advantage_3_desc' => '全天候多语言在线客服,随时解答您的任何疑问。',
'advantage_4_title' => '多样化产品',
'advantage_4_desc' => '涵盖现货、合约、秒合约、挖矿等多种投资工具。',
'about_content' => 'Byro 是一家全球领先的数字货币交易平台,成立于 2023 年,致力于为全球用户提供安全、专业、透明的数字资产金融服务。我们拥有顶尖的技术团队和风控体系,为超过 100 个国家和地区的数百万用户提供服务。',
'news_content' => 'Byro 每日更新全球加密市场动态,包括最新的上币信息、行业动态、深度分析报告,助您掌握财富密码。',
'fees_content' => 'Byro 致力于提供行业极具竞争力的费率标准。现货交易手续费低至 0.1%,根据您的交易量等级,还可以享受更大幅度的费率折扣。',
'app_desc' => '随时随地,尽在掌握。下载 Byro 移动端,体验专业级交易。',
'about_content' => 'Byro 是一家全球领先的数字货币交易平台,成立于 2023 年,致力于为全球用户提供安全、专业、透明 of 数字资产金融服务。',
'real_name' => '实名认证',
'verified' => '已认证',
'unverified' => '未认证',
@ -117,88 +106,134 @@ $translations = [
'vol_24h' => '24h 成交额',
'cycle_settlement' => '周期/结算',
'purchase_amount' => '买入量',
'available_balance' => '可以金额',
'available_balance' => '可用',
'frozen' => '冻结',
'converted_to' => '折合',
'asset_records' => '资产记录',
'operation' => '操作',
'status' => '状态',
'time' => '时间',
'type' => '类型',
'flash_exchange' => '闪兑',
'trade_profit' => '交易盈亏',
'completed' => '已完成',
'pending' => '处理中',
'details' => '详情',
'search' => '搜索',
'limit' => '限价',
'expected_profit' => '预期收益',
'buy_up' => '买涨',
'buy_down' => '买跌',
'profit' => '收益',
'enter_amount' => '请输入有效金额',
'insufficient_balance' => '余额不足',
'order_in_progress' => '订单进行中',
'current_price' => '现价',
'order_in_progress' => '订单执行中',
'current_price' => '当前价格',
'cycle' => '周期',
'direction' => '方向',
'quantity' => '数量',
'opening_price' => '开仓价',
'final_price_settlement' => '最终价格以系统结算为准',
'opening_price' => '开仓价',
'final_price_settlement' => '待结算完成后显示最终盈亏',
'open_orders' => '当前委托',
'settlement_history' => '历史结算',
'settlement_history' => '结算历史',
'no_records_found' => '暂无记录',
'executing' => '正在执行',
'executing' => '执行',
'loss' => '亏损',
'amount_too_low' => '买入金额低于最小限制',
'amount_too_high' => '买入金额超过最大限制',
'fiat_recharge' => '法币充值',
'crypto_recharge' => '数字货币充值',
'select_currency' => '选择币种',
'fiat_amount' => '法币金额',
'est_usdt' => '预计到账 (USDT)',
'confirm_order' => '确认订单',
'recharge_request_sent' => '充值请求已提交给客服',
'enter_amount' => '请输入有效金额',
'amount_too_low' => '金额太低',
'amount_too_high' => '金额太高',
'insufficient_balance' => '余额不足',
'trade_spot' => '现货交易',
'trade_contract' => '合约交易',
'trade_binary' => '秒合约',
'asset_title' => '总资产',
'online_support' => '在线客服',
'type_message' => '输入消息...',
'welcome_support' => '欢迎来到 Byro 客服!请问有什么可以帮您?',
'market_name' => '市场',
'trading' => '交易',
'principal_protected' => '本金保障',
'daily_payouts' => '每日派息',
'amount_to_invest' => '投入金额',
'hot' => '热门',
'back' => '返回',
'network' => '网络',
'address' => '充值地址',
'copy' => '复制',
'withdraw_amount' => '提现金额',
'withdraw_address' => '提现地址',
'receive' => '预计到账',
'withdraw_request_sent' => '提现申请已提交,请等待审核',
'all' => '全部',
'crypto_withdraw' => 'USDT提现',
'crypto_withdraw' => '加密货币提现',
'fiat_withdraw' => '法币提现',
'network' => '网络',
'withdraw_address' => '提现地址',
'withdraw_amount' => '提现金额',
'withdraw_password' => '提现密码',
'to_receive' => '预计到账',
'confirm_order' => '确认订单',
'select_currency' => '选择币种',
'est_receive_fiat' => '预计收到法币',
'recharge_steps' => '充值步骤',
'withdraw_steps' => '提现步骤',
'security_tips' => '安全提示',
'secure' => '安全',
'fast' => '极速',
'support_247' => '24/7支持',
'i_have_paid' => '我已完成支付',
'crypto_recharge_warning' => '请务必仅向此地址发送 USDT。发送其他资产可能会导致永久丢失。',
'kyc' => '实名认证',
'secure' => '安全可靠',
'fast' => '极速到账',
'support_247' => '24/7 客服支持',
'fiat_recharge' => '法币充值',
'crypto_recharge' => '加密货币充值',
'fiat_amount' => '充值金额',
'est_usdt' => '预计到账 USDT',
'address' => '充值地址',
'crypto_recharge_warning' => '请务必仅向此地址充值 USDT。发送其他资产可能导致永久丢失。',
'recharge_steps' => '充值步骤',
'i_have_paid' => '我已支付',
'min_withdraw_hint' => '最小提现金额为 10 USDT',
'enter_address' => '请输入提现地址',
'enter_password' => '请输入提现密码',
'request_sent' => '请求已发送,请在客服对话框中继续交流。',
'cs_connect_fail' => '无法连接客服系统,请刷新页面重试。',
'copy_success' => '已复制到剪贴板',
'vip_level' => '会员等级',
'kyc' => '身份认证',
'security' => '安全设置',
'vip_level' => 'VIP等级',
'unverified' => '未认证',
'pending' => '审核中',
'verified' => '已认证',
'rejected' => '已驳回',
'full_name' => '真实姓名',
'id_number' => '身份证号',
'id_front' => '身份证正面',
'id_back' => '身份证反面',
'id_handheld' => '手持身份证',
'upload' => '点击上传',
'submit' => '提交',
'amount' => '金额',
'login_password' => '登录密码',
'trade_password' => '交易密码',
'change_password' => '修改密码',
'set_password' => '设置密码',
'kyc_instructions' => '请确保上传的照片清晰可见,且与填写的身份证号一致。',
'security_instructions' => '请定期修改您的密码,并确保交易密码与登录密码不同。',
'old_password' => '原密码',
'old_password' => '旧密码',
'new_password' => '新密码',
'confirm_new_password' => '确认新密码',
'kyc_steps' => '实名认证步骤',
'kyc_step1' => '填写您的真实姓名和身份证号码。',
'kyc_step2' => '上传您的身份证正反面照片。',
'kyc_step3' => '上传您手持身份证的照片,并确保面部清晰。',
'security_steps' => '安全设置步骤',
'security_step1' => '设置强密码,包含字母、数字和符号。',
'security_step2' => '交易密码用于提现和重要操作,请务必妥善保存。',
'frozen' => '冻结',
'converted_to' => '折合',
'change_password' => '修改密码',
'set_password' => '设置密码',
'security_steps' => '安全步骤',
'security_step1' => '为了您的账户安全,建议定期更换登录密码。',
'security_step2' => '交易密码是用于提现、交易等重要操作的二次验证。',
'security_instructions' => '请妥善保管您的密码,不要泄露给任何人。平台客服不会以任何理由向您索要密码。',
'full_name' => '真实姓名',
'id_number' => '证件号码',
'id_front' => '证件正面',
'id_back' => '证件反面',
'id_handheld' => '手持证件',
'upload' => '点击上传',
'submit' => '提交',
'kyc_steps' => '认证步骤',
'kyc_step1' => '请填写与证件一致的真实姓名和证件号码。',
'kyc_step2' => '请上传清晰、完整的证件照片(正面、反面)。',
'kyc_step3' => '手持证件照片需清晰展示您的面部和证件内容。',
'kyc_instructions' => '实名认证通常在 24 小时内完成审核。认证通过后,您将获得更高的提现额度和更多的交易权限。',
'welcome_back' => '欢迎回到 Byro 交易所',
'forgot_password' => '忘记密码?',
'no_account' => '还没有账号?',
'join_secure' => '加入全球最安全的数字资产交易所',
'have_account' => '已经有账号?',
'old_pwd_incorrect' => '旧密码错误',
'pwd_mismatch' => '两次输入的密码不一致',
'pwd_too_short' => '密码长度至少为 6 位',
'pwd_changed_success' => '密码修改成功',
'trade_pwd_updated' => '交易密码已更新',
'fill_all_fields' => '请填写所有字段',
'kyc_submitted' => '认证申请已提交,请耐心等待审核',
'kyc_pending_desc' => '您的申请正在审核中,请耐心等待。',
'enter_full_name' => '请输入真实姓名',
'enter_id_number' => '请输入证件号码',
'prof_terminal' => '专业交易终端',
'prof_terminal_desc' => '高性能撮合引擎,深度流动性,为您提供极致的交易体验。',
'inst_security' => '机构级安全防护',
'inst_security_desc' => '多重签名和冷存储,确保您的资产安全无忧。',
'trading_pair' => '交易对',
'total' => '成交额',
'high' => '最高',
'low' => '最低',
],
'en' => [
'home' => 'Home',
@ -239,8 +274,8 @@ $translations = [
'agree_terms' => 'I have read and agree to the Terms of Service and Privacy Policy',
'send_code' => 'Send Code',
'view_more' => 'View More',
'hero_title' => 'The World\'s Leading Digital Asset Exchange',
'hero_subtitle' => 'Start your cryptocurrency journey on Byro, secure, stable, and reliable.',
'hero_title' => 'World Leading Digital Asset Platform',
'hero_subtitle' => 'Start your crypto journey on Byro, secure, stable, reliable.',
'get_started' => 'Get Started',
'popular_markets' => 'Popular Markets',
'coin' => 'Coin',
@ -248,28 +283,17 @@ $translations = [
'change_24h' => '24h Change',
'trade' => 'Trade',
'why_choose_us' => 'Why Choose Us',
'security_title' => 'Advanced Security',
'security_desc' => 'Multi-sig cold storage for ultimate asset safety.',
'liquidity_title' => 'High Performance',
'liquidity_desc' => 'Millisecond matching with up to 100k TPS.',
'support_title' => '24/7 Global Support',
'support_desc' => 'Professional response for any trading issues.',
'diversity_title' => 'Diverse Products',
'diversity_desc' => 'Spot, Futures, and more financial instruments.',
'copyright' => '© 2023-2026 Byro. All rights reserved.',
'status_normal' => 'System Status: Normal',
'advantage_1_title' => 'Security & Compliance',
'advantage_1_desc' => 'Global compliant operations with cold/hot wallet isolation to ensure asset security.',
'advantage_2_title' => 'Strong Liquidity',
'advantage_2_desc' => 'Millisecond matching engine with deep liquidity for an ultimate trading experience.',
'advantage_1_desc' => 'Global compliant operations with cold/hot wallet isolation.',
'advantage_2_title' => 'High Liquidity',
'advantage_2_desc' => 'Millisecond matching engine with deep liquidity.',
'advantage_3_title' => '7/24 Support',
'advantage_3_desc' => 'All-day multi-language online customer service to answer your questions anytime.',
'advantage_3_desc' => 'Multi-language customer service always online.',
'advantage_4_title' => 'Diverse Products',
'advantage_4_desc' => 'Covering spot, contract, binary, mining and various investment tools.',
'about_content' => 'Byro is a world-leading digital currency exchange established in 2023, committed to providing secure, professional, and transparent digital asset financial services to users globally. We have a top-tier technical team and risk control system, serving millions of users across more than 100 countries and regions.',
'news_content' => 'Byro updates daily global crypto market dynamics, including the latest listing info, industry trends, and in-depth analysis reports to help you master wealth opportunities.',
'fees_content' => 'Byro is committed to providing industry-competitive fee standards. Spot trading fees as low as 0.1%, with deeper discounts based on your trading volume tier.',
'app_desc' => 'Anytime, anywhere, at your fingertips. Download Byro mobile app for professional trading experience.',
'advantage_4_desc' => 'Covering Spot, Contract, Binary, and Mining.',
'about_content' => 'Byro is a world-leading digital currency exchange established in 2023.',
'real_name' => 'Real-name',
'verified' => 'Verified',
'unverified' => 'Unverified',
@ -278,7 +302,7 @@ $translations = [
'orders' => 'Orders',
'account' => 'Account / Email',
'market_view' => 'Market View',
'sec_contract' => 'Second Contract',
'sec_contract' => 'Binary',
'secure_acc' => 'Secure My Account',
'from' => 'From',
'to' => 'To',
@ -286,111 +310,157 @@ $translations = [
'swap_now' => 'Swap Now',
'rate' => 'Rate',
'price_impact' => 'Price Impact',
'slippage' => 'Slippage Tolerance',
'slippage' => 'Slippage',
'mining_title' => 'Mining Pool',
'mining_desc' => 'Professional cloud mining and staking platform. Join thousands of users earning passive income with Byro\'s high-efficiency mining pools.',
'mining_desc' => 'Professional cloud mining and staking platform. Join thousands of users.',
'est_apy' => 'Est. APY',
'min_deposit' => 'Min. Deposit',
'lock_period' => 'Lock Period',
'start_mining' => 'Start Mining',
'why_mining' => 'Why choose Byro Mining?',
'adv_hardware' => 'Advanced Hardware',
'adv_hardware_desc' => 'We use the latest ASIC and GPU miners to ensure maximum profitability and stability.',
'adv_hardware_desc' => 'We use latest ASIC and GPU miners for max profit.',
'auto_compound' => 'Auto Compounding',
'auto_compound_desc' => 'Reinvest your daily rewards automatically to maximize your total yield over time.',
'auto_compound_desc' => 'Reinvest daily rewards automatically.',
'real_time_monitor' => 'Real-time Monitoring',
'real_time_monitor_desc' => 'Track your hash rate and earnings in real-time through our intuitive dashboard.',
'real_time_monitor_desc' => 'Track your hash rate and earnings in real-time.',
'calc_profit' => 'Calculate Your Profit',
'calc_desc' => 'Enter your investment amount to estimate your daily earnings.',
'calc_desc' => 'Enter investment amount to estimate daily earnings.',
'daily_profit' => 'Daily Profit',
'monthly_profit' => 'Monthly Profit',
'try_calc' => 'Try Mining Calculator',
'try_calc' => 'Try Calculator',
'asset' => 'Asset',
'vol_24h' => '24h Volume',
'cycle_settlement' => 'Cycle / Settlement',
'purchase_amount' => 'Purchase Amount',
'available_balance' => 'Available Balance',
'expected_profit' => 'Expected Profit',
'available_balance' => 'Available',
'frozen' => 'Frozen',
'converted_to' => 'Equivalent',
'asset_records' => 'Asset Records',
'operation' => 'Action',
'status' => 'Status',
'time' => 'Time',
'type' => 'Type',
'flash_exchange' => 'Swap',
'trade_profit' => 'Trade P/L',
'completed' => 'Completed',
'pending' => 'Pending',
'details' => 'Details',
'search' => 'Search',
'limit' => 'Limit',
'expected_profit' => 'Exp. Profit',
'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',
'order_in_progress' => 'Order Executing',
'current_price' => 'Current Price',
'cycle' => 'Cycle',
'direction' => 'Direction',
'quantity' => 'Quantity',
'opening_price' => 'Opening Price',
'final_price_settlement' => 'Final price is subject to system settlement',
'opening_price' => 'Open Price',
'final_price_settlement' => 'Final P/L shown after settlement',
'open_orders' => 'Open Orders',
'settlement_history' => 'Settlement History',
'no_records_found' => 'No records found',
'settlement_history' => 'History',
'no_records_found' => 'No records',
'executing' => 'Executing',
'loss' => 'Loss',
'enter_amount' => 'Please enter valid amount',
'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',
'insufficient_balance' => 'Insufficient balance',
'trade_spot' => 'Spot',
'trade_contract' => 'Contract',
'trade_binary' => 'Binary',
'asset_title' => 'Total Assets',
'online_support' => 'Support',
'type_message' => 'Type message...',
'welcome_support' => 'Welcome to Byro Support! How can we help?',
'market_name' => 'Market',
'trading' => 'Trading',
'principal_protected' => 'Principal Protected',
'daily_payouts' => 'Daily Payouts',
'amount_to_invest' => 'Amount to Invest',
'hot' => 'HOT',
'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',
'crypto_withdraw' => 'Crypto Withdrawal',
'fiat_withdraw' => 'Fiat Withdrawal',
'network' => 'Network',
'withdraw_address' => 'Withdrawal Address',
'withdraw_amount' => 'Withdrawal Amount',
'withdraw_password' => 'Withdrawal Password',
'to_receive' => 'To Receive',
'est_receive_fiat' => 'Est. Fiat Receive',
'recharge_steps' => 'Recharge Steps',
'confirm_order' => 'Confirm Order',
'select_currency' => 'Select Currency',
'est_receive_fiat' => 'Est. Receive',
'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',
'fiat_recharge' => 'Fiat Recharge',
'crypto_recharge' => 'Crypto Recharge',
'fiat_amount' => 'Recharge Amount',
'est_usdt' => 'Est. USDT',
'address' => 'Deposit Address',
'crypto_recharge_warning' => 'Please only send USDT to this address.',
'recharge_steps' => 'Recharge Steps',
'i_have_paid' => 'I Have Paid',
'min_withdraw_hint' => 'Min. withdrawal 10 USDT',
'enter_address' => 'Please enter address',
'enter_password' => 'Please enter password',
'request_sent' => 'Request sent, please check chat.',
'cs_connect_fail' => 'Connection failed, please refresh.',
'copy_success' => 'Copied to clipboard',
'vip_level' => 'VIP Level',
'unverified' => 'Unverified',
'pending' => 'Pending',
'verified' => 'Verified',
'rejected' => 'Rejected',
'kyc' => 'Identity',
'security' => 'Security',
'amount' => 'Amount',
'login_password' => 'Login Password',
'trade_password' => 'Trade Password',
'old_password' => 'Old Password',
'new_password' => 'New Password',
'confirm_new_password' => 'Confirm Password',
'change_password' => 'Change Password',
'set_password' => 'Set Password',
'security_steps' => 'Security Steps',
'security_step1' => 'Change password regularly for security.',
'security_step2' => 'Trade password is for important actions.',
'security_instructions' => 'Keep your password safe and private.',
'full_name' => 'Full Name',
'id_number' => 'ID Number',
'id_front' => 'ID Front',
'id_back' => 'ID Back',
'id_handheld' => 'Hand-held ID',
'id_handheld' => 'Handheld 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',
'kyc_steps' => 'Verification Steps',
'kyc_step1' => 'Fill in your real name and ID.',
'kyc_step2' => 'Upload clear photos of ID.',
'kyc_step3' => 'Handheld ID photo must show face.',
'kyc_instructions' => 'Verification usually takes 24 hours.',
'welcome_back' => 'Welcome back',
'forgot_password' => 'Forgot password?',
'no_account' => 'No account?',
'join_secure' => 'Join the most secure exchange',
'have_account' => 'Have account?',
'old_pwd_incorrect' => 'Old password incorrect',
'pwd_mismatch' => 'Passwords do not match',
'pwd_too_short' => 'Min. 6 characters',
'pwd_changed_success' => 'Password changed',
'trade_pwd_updated' => 'Trade password updated',
'fill_all_fields' => 'Fill all fields',
'kyc_submitted' => 'Verification submitted!',
'kyc_pending_desc' => 'Being reviewed by our team.',
'enter_full_name' => 'Enter full name',
'enter_id_number' => 'Enter ID number',
'prof_terminal' => 'Pro Terminal',
'prof_terminal_desc' => 'High performance execution.',
'inst_security' => 'Inst. Security',
'inst_security_desc' => 'Multi-tier encryption.',
'trading_pair' => 'Pair',
'total' => 'Total',
'high' => 'High',
'low' => 'Low',
]
];
@ -423,6 +493,11 @@ function getCoinIcon($symbol) {
'APT' => '27355/small/aptos.png',
'USDC' => '6319/small/usdc.png',
'PEPE' => '31386/small/pepe.png',
'FIL' => '12817/small/filecoin.png',
'NEAR' => '10365/small/near.png',
'ATOM' => '1481/small/cosmos.png',
'IMX' => '17233/small/immutable-x.png',
'KAS' => '26851/small/kaspa.png',
];
$id = $icon_ids[strtoupper($symbol)] ?? '1/small/bitcoin.png';
return "https://assets.coingecko.com/coins/images/" . $id;

View File

@ -33,10 +33,17 @@ function renderTerminal($activeTab = 'spot') {
];
?>
<link rel="stylesheet" href="/assets/css/terminal.css?v=<?= time() ?>">
<div class="terminal-sidebar-overlay" id="sidebar-overlay" onclick="toggleMobileSidebar()"></div>
<div class="terminal-container">
<!-- Mobile Top Switcher -->
<div class="mobile-type-switcher">
<a href="/binary.php?symbol=<?= $currentSymbol ?>" class="<?= $activeTab === 'binary' ? 'active' : '' ?>"><?= __('sec_contract') ?></a>
<a href="/trade.php?symbol=<?= $currentSymbol ?>" class="<?= $activeTab === 'spot' ? 'active' : '' ?>"><?= __('spot') ?></a>
<a href="/contract.php?symbol=<?= $currentSymbol ?>" class="<?= $activeTab === 'contract' ? 'active' : '' ?>"><?= __('contract') ?></a>
</div>
<div class="terminal-main">
<!-- Left Sidebar -->
<div class="terminal-sidebar">
<div class="terminal-sidebar" id="terminal-sidebar">
<!-- Top Nav Tabs moved here for alignment -->
<div class="terminal-top-nav sidebar-tabs">
<a href="/binary.php?symbol=<?= $currentSymbol ?>" class="terminal-tab <?= $activeTab === 'binary' ? 'active' : '' ?>"><?= __('sec_contract') ?></a>
@ -44,12 +51,12 @@ function renderTerminal($activeTab = 'spot') {
<a href="/contract.php?symbol=<?= $currentSymbol ?>" class="terminal-tab <?= $activeTab === 'contract' ? 'active' : '' ?>"><?= __('contract') ?></a>
</div>
<div class="sidebar-search">
<input type="text" placeholder="<?= __('search') ?? 'Search' ?> / USDT" class="shadow-sm">
<input type="text" id="coin-search" placeholder="<?= __('search') ?? 'Search' ?> / USDT" class="shadow-sm">
</div>
<div class="coin-list-container">
<div class="coin-list-container" id="coin-list">
<?php
foreach ($full_coins as $c): ?>
<div class="coin-row <?= $c['symbol'] === $currentSymbol ? 'active' : '' ?>" onclick="location.href='?symbol=<?= $c['symbol'] ?>'">
<div class="coin-row <?= $c['symbol'] === $currentSymbol ? 'active' : '' ?>" data-symbol="<?= $c['symbol'] ?>" onclick="location.href='?symbol=<?= $c['symbol'] ?>'; if(window.innerWidth <= 768) toggleMobileSidebar();">
<div class="d-flex align-items-center">
<div class="bg-light p-1 rounded-circle me-2" style="width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;">
<img src="<?= getCoinIcon($c['symbol']) ?>" alt="<?= $c['symbol'] ?>" style="width: 18px; height: 18px; margin: 0;">
@ -68,7 +75,12 @@ function renderTerminal($activeTab = 'spot') {
<!-- Center Content -->
<div class="terminal-content">
<div class="content-header">
<div class="header-pair fw-bold fs-5 text-white"><?= $currentSymbol ?>/USDT</div>
<div class="header-pair fw-bold fs-5 text-white">
<div class="mobile-pair-toggle d-md-none" onclick="toggleMobileSidebar()">
<i class="bi bi-list fs-3 me-2"></i>
</div>
<?= $currentSymbol ?>/USDT
</div>
<div class="header-stat">
<label><?= __('last_price') ?></label>
<span class="text-success price-jump fw-bold">64,234.50</span>
@ -78,11 +90,11 @@ function renderTerminal($activeTab = 'spot') {
<span class="text-success fw-bold">+2.45%</span>
</div>
<div class="header-stat d-none d-md-flex">
<label>24h High</label>
<label>24h <?= __('high') ?? 'High' ?></label>
<span class="text-white">65,120.00</span>
</div>
<div class="header-stat d-none d-md-flex">
<label>24h Low</label>
<label>24h <?= __('low') ?? 'Low' ?></label>
<span class="text-white">63,450.00</span>
</div>
<div class="header-stat d-none d-lg-flex">
@ -405,61 +417,175 @@ function renderTerminal($activeTab = 'spot') {
</div>
<script>
// Real-time market price fetcher
async function updateMarketPrices() {
try {
const response = await fetch('https://api.binance.com/api/v3/ticker/24hr');
const data = await response.json();
const prices = {};
data.forEach(item => {
if (item.symbol.endsWith('USDT')) {
const base = item.symbol.replace('USDT', '');
prices[base] = {
price: parseFloat(item.lastPrice),
change: item.priceChangePercent
};
// Search functionality
document.getElementById('coin-search').addEventListener('input', function(e) {
const term = e.target.value.toUpperCase();
document.querySelectorAll('.coin-row').forEach(row => {
const symbol = row.getAttribute('data-symbol') || '';
row.style.display = symbol.includes(term) ? 'flex' : 'none';
});
});
let tickerWs, depthWs;
const currentBase = '<?= $currentSymbol ?>';
const currentPair = currentBase.toLowerCase() + 'usdt';
function formatPrice(p) {
if (p < 0.0001) return p.toFixed(8);
if (p < 1) return p.toFixed(6);
if (p < 100) return p.toFixed(4);
return p.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
}
function updateOrderBookUI(data) {
const asks = data.a; // Asks (sells)
const bids = data.b; // Bids (buys)
const askContainer = document.getElementById('ob-asks');
const bidContainer = document.getElementById('ob-bids');
if (asks && askContainer) {
const askRows = askContainer.querySelectorAll('.ob-row');
asks.slice(0, 15).reverse().forEach((ask, i) => {
if (askRows[i]) {
const price = parseFloat(ask[0]);
const amount = parseFloat(ask[1]);
askRows[i].querySelector('.price').innerText = formatPrice(price);
askRows[i].querySelector('.amount').innerText = amount.toFixed(4);
askRows[i].querySelector('.ob-row-bg').style.width = Math.min(100, (amount * 10)) + '%';
}
});
// Update Sidebar
document.querySelectorAll('.coin-row').forEach(row => {
const symbol = row.querySelector('.symbol').innerText;
if (prices[symbol]) {
const p = prices[symbol].price;
const c = prices[symbol].change;
row.querySelector('.price').innerText = p < 1 ? p.toFixed(6) : p.toLocaleString('en-US', {minimumFractionDigits: 2});
const changeEl = row.querySelector('.change');
changeEl.innerText = (c > 0 ? '+' : '') + c + '%';
changeEl.className = 'change ' + (c >= 0 ? 'text-success' : 'text-danger');
}
if (bids && bidContainer) {
const bidRows = bidContainer.querySelectorAll('.ob-row');
bids.slice(0, 15).forEach((bid, i) => {
if (bidRows[i]) {
const price = parseFloat(bid[0]);
const amount = parseFloat(bid[1]);
bidRows[i].querySelector('.price').innerText = formatPrice(price);
bidRows[i].querySelector('.amount').innerText = amount.toFixed(4);
bidRows[i].querySelector('.ob-row-bg').style.width = Math.min(100, (amount * 10)) + '%';
}
});
// Update Header for current symbol
const currentSymbol = '<?= $currentSymbol ?>';
if (prices[currentSymbol]) {
const p = prices[currentSymbol].price;
const c = prices[currentSymbol].change;
const priceEl = document.querySelector('.price-jump');
if (priceEl) {
const oldPrice = parseFloat(priceEl.innerText.replace(',', ''));
priceEl.innerText = p < 1 ? p.toFixed(6) : p.toLocaleString('en-US', {minimumFractionDigits: 2});
priceEl.style.color = p >= oldPrice ? '#26a69a' : '#ef5350';
setTimeout(() => priceEl.style.color = '#26a69a', 800);
}
const headerStats = document.querySelectorAll('.header-stat span');
if (headerStats[1]) {
headerStats[1].innerText = (c > 0 ? '+' : '') + c + '%';
headerStats[1].className = (c >= 0 ? 'text-success' : 'text-danger') + ' fw-bold';
}
}
} catch (e) {
console.error("Failed to fetch prices", e);
}
}
setInterval(updateMarketPrices, 3000);
updateMarketPrices();
async function populateAllCoins() {
try {
const response = await fetch('https://api.binance.com/api/v3/ticker/24hr');
const data = await response.json();
const list = document.getElementById('coin-list');
const existingSymbols = Array.from(document.querySelectorAll('.coin-row')).map(r => r.getAttribute('data-symbol'));
data.forEach(item => {
if (item.symbol.endsWith('USDT')) {
const symbol = item.symbol.replace('USDT', '');
if (!existingSymbols.includes(symbol)) {
const price = parseFloat(item.lastPrice);
const change = parseFloat(item.priceChangePercent);
const row = document.createElement('div');
row.className = 'coin-row';
row.setAttribute('data-symbol', symbol);
row.onclick = () => {
location.href = '?symbol=' + symbol;
if(window.innerWidth <= 768) toggleMobileSidebar();
};
row.innerHTML = `
<div class="d-flex align-items-center">
<div class="bg-light p-1 rounded-circle me-2" style="width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;">
<img src="https://assets.coingecko.com/coins/images/1/small/bitcoin.png" onerror="this.src='/assets/images/coin-placeholder.png'" alt="${symbol}" style="width: 18px; height: 18px; margin: 0;">
</div>
<div>
<div class="symbol fw-bold text-white">${symbol}</div>
<div class="change ${change >= 0 ? 'text-success' : 'text-danger'}" style="font-size: 10px;">${(change >= 0 ? '+' : '') + change.toFixed(2)}%</div>
</div>
</div>
<div class="price fw-bold text-white">${formatPrice(price)}</div>
`;
list.appendChild(row);
}
}
});
} catch (e) {
console.error("Failed to populate coins", e);
}
}
function initTradingWS() {
// Symbol specific ticker for header and last price
tickerWs = new WebSocket(`wss://stream.binance.com:9443/ws/${currentPair}@ticker`);
tickerWs.onmessage = (e) => {
const data = JSON.parse(e.data);
const price = parseFloat(data.c);
const change = parseFloat(data.P);
const high = parseFloat(data.h);
const low = parseFloat(data.l);
const vol = parseFloat(data.v);
const priceEl = document.querySelector('.price-jump');
if (priceEl) {
const oldPrice = parseFloat(priceEl.innerText.replace(/,/g, ''));
priceEl.innerText = formatPrice(price);
priceEl.style.color = price >= oldPrice ? '#0ecb81' : '#f6465d';
// Update mid price in OB
const obPrice = document.getElementById('last-price-ob');
if (obPrice) {
obPrice.innerText = formatPrice(price);
obPrice.className = 'val ' + (price >= oldPrice ? 'text-success' : 'text-danger');
}
const obUsd = document.getElementById('last-price-usd');
if (obUsd) obUsd.innerText = '≈ $' + formatPrice(price);
}
const stats = document.querySelectorAll('.header-stat span');
if (stats[1]) {
stats[1].innerText = (change >= 0 ? '+' : '') + change.toFixed(2) + '%';
stats[1].className = (change >= 0 ? 'text-success' : 'text-danger') + ' fw-bold';
}
if (stats[2]) stats[2].innerText = formatPrice(high);
if (stats[3]) stats[3].innerText = formatPrice(low);
if (stats[4]) stats[4].innerText = parseFloat(vol).toLocaleString('en-US', {maximumFractionDigits: 2});
};
// Depth for Order Book
depthWs = new WebSocket(`wss://stream.binance.com:9443/ws/${currentPair}@depth20@1000ms`);
depthWs.onmessage = (e) => {
const data = JSON.parse(e.data);
updateOrderBookUI(data);
};
// Global ticker for sidebar
const allTickerWs = new WebSocket('wss://stream.binance.com:9443/ws/!ticker@arr');
allTickerWs.onmessage = (e) => {
const data = JSON.parse(e.data);
const sidebarRows = document.querySelectorAll('.coin-row');
const tickerMap = {};
data.forEach(item => {
if (item.s.endsWith('USDT')) {
tickerMap[item.s.replace('USDT', '')] = item;
}
});
sidebarRows.forEach(row => {
const sym = row.getAttribute('data-symbol');
if (tickerMap[sym]) {
const t = tickerMap[sym];
const price = parseFloat(t.c);
const change = parseFloat(t.P);
row.querySelector('.price').innerText = formatPrice(price);
const changeEl = row.querySelector('.change');
changeEl.innerText = (change >= 0 ? '+' : '') + change.toFixed(2) + '%';
changeEl.className = 'change ' + (change >= 0 ? 'text-success' : 'text-danger');
}
});
};
}
populateAllCoins().then(initTradingWS);
</script>
@ -472,15 +598,15 @@ function renderTerminal($activeTab = 'spot') {
<table class="table table-dark table-sm mb-0" id="history-table" style="font-size: 12px;">
<thead>
<tr class="text-muted" style="background: rgba(255,255,255,0.02);">
<th class="ps-3 py-2">时间</th>
<th class="py-2">交易对</th>
<th class="py-2">类型</th>
<th class="py-2">方向</th>
<th class="py-2">价格</th>
<th class="py-2">数量</th>
<th class="py-2">成交额</th>
<th class="py-2">状态</th>
<th class="pe-3 py-2 text-end">操作</th>
<th class="ps-3 py-2"><?= __('time') ?></th>
<th class="py-2"><?= __('trading_pair') ?? 'Pair' ?></th>
<th class="py-2"><?= __('type') ?></th>
<th class="py-2"><?= __('direction') ?></th>
<th class="py-2"><?= __('price') ?></th>
<th class="py-2"><?= __('quantity') ?></th>
<th class="py-2"><?= __('total') ?? 'Total' ?></th>
<th class="py-2"><?= __('status') ?></th>
<th class="pe-3 py-2 text-end"><?= __('operation') ?></th>
</tr>
</thead>
<tbody id="history-body">
@ -495,36 +621,28 @@ function renderTerminal($activeTab = 'spot') {
<div class="terminal-right-sidebar">
<div class="order-book">
<div class="ob-header">
<span>Price(USDT)</span>
<span>Amount(<?= $currentSymbol ?>)</span>
<span><?= __('price') ?>(USDT)</span>
<span><?= __('quantity') ?>(<?= $currentSymbol ?>)</span>
</div>
<div class="ob-list asks">
<?php for($i=0;$i<12;$i++):
$p = 64235 + (12-$i) * 1.5;
$a = rand(10, 1000) / 1000;
$w = rand(10, 90);
?>
<div class="ob-list asks" id="ob-asks">
<?php for($i=0;$i<15;$i++): ?>
<div class="ob-row">
<span class="price"><?= number_format($p, 2) ?></span>
<span class="amount"><?= number_format($a, 4) ?></span>
<div class="ob-row-bg" style="width: <?= $w ?>%"></div>
<span class="price">---</span>
<span class="amount">---</span>
<div class="ob-row-bg" style="width: 0%"></div>
</div>
<?php endfor; ?>
</div>
<div class="ob-mid-price">
<span class="val text-success">64,234.50</span>
<span class="small text-muted"> $64,234.50</span>
<span class="val text-success" id="last-price-ob">---</span>
<span class="small text-muted" id="last-price-usd">---</span>
</div>
<div class="ob-list bids">
<?php for($i=0;$i<12;$i++):
$p = 64233 - $i * 1.5;
$a = rand(10, 1000) / 1000;
$w = rand(10, 90);
?>
<div class="ob-list bids" id="ob-bids">
<?php for($i=0;$i<15;$i++): ?>
<div class="ob-row">
<span class="price"><?= number_format($p, 2) ?></span>
<span class="amount"><?= number_format($a, 4) ?></span>
<div class="ob-row-bg" style="width: <?= $w ?>%"></div>
<span class="price">---</span>
<span class="amount">---</span>
<div class="ob-row-bg" style="width: 0%"></div>
</div>
<?php endfor; ?>
</div>
@ -534,6 +652,11 @@ function renderTerminal($activeTab = 'spot') {
</div>
<script>
function toggleMobileSidebar() {
document.getElementById('terminal-sidebar').classList.toggle('active');
document.getElementById('sidebar-overlay').classList.toggle('active');
}
const historyData = {
open: [],
settlement: []
@ -600,7 +723,7 @@ function renderTerminal($activeTab = 'spot') {
<td class="py-3">${row.amount}</td>
<td class="py-3">${totalDisplay}</td>
<td class="py-3"><span class="badge ${statusBg} bg-opacity-10 ${statusClass} rounded-pill px-2" style="font-size: 10px;">${displayStatus}</span></td>
<td class="pe-3 py-3 text-end"><button class="btn btn-sm btn-dark px-2 py-0" style="font-size: 10px;">Details</button></td>
<td class="pe-3 py-3 text-end"><button class="btn btn-sm btn-dark px-2 py-0" style="font-size: 10px;"><?= __('details') ?></button></td>
`;
body.appendChild(tr);
});

View File

@ -30,11 +30,11 @@ require_once __DIR__ . '/includes/header.php';
<div class="carousel-content p-5 text-white d-flex align-items-center" style="height: 520px; background: url('https://images.pexels.com/photos/6771574/pexels-photo-6771574.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover;">
<div class="carousel-overlay" style="background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%); position: absolute; top:0; left:0; right:0; bottom:0;"></div>
<div class="container" style="position: relative; z-index: 2;">
<h1 class="display-3 fw-bold mb-3">Professional Trading Terminal</h1>
<p class="lead fs-3 mb-4 text-light-50">High-performance execution with deep liquidity for every trade.</p>
<h1 class="display-3 fw-bold mb-3"><?= __('prof_terminal') ?></h1>
<p class="lead fs-3 mb-4 text-light-50"><?= __('prof_terminal_desc') ?></p>
<div class="d-flex gap-3">
<a href="trade.php" class="btn btn-primary btn-lg px-5 py-3 fw-bold rounded-pill shadow-primary"><?php echo __('trade'); ?></a>
<a href="binary.php" class="btn btn-outline-light btn-lg px-5 py-3 fw-bold rounded-pill">Second Contract</a>
<a href="binary.php" class="btn btn-outline-light btn-lg px-5 py-3 fw-bold rounded-pill"><?= __('second_contract') ?></a>
</div>
</div>
</div>
@ -43,9 +43,9 @@ require_once __DIR__ . '/includes/header.php';
<div class="carousel-content p-5 text-white d-flex align-items-center" style="height: 520px; background: url('https://images.pexels.com/photos/5980866/pexels-photo-5980866.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover;">
<div class="carousel-overlay" style="background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%); position: absolute; top:0; left:0; right:0; bottom:0;"></div>
<div class="container" style="position: relative; z-index: 2;">
<h1 class="display-3 fw-bold mb-3">Institutional-Grade Security</h1>
<p class="lead fs-3 mb-4 text-light-50">Multi-tier encryption and cold storage to keep your assets safe.</p>
<a href="auth/register.php" class="btn btn-primary btn-lg px-5 py-3 fw-bold rounded-pill shadow-primary">Secure My Account</a>
<h1 class="display-3 fw-bold mb-3"><?= __('inst_security') ?></h1>
<p class="lead fs-3 mb-4 text-light-50"><?= __('inst_security_desc') ?></p>
<a href="auth/register.php" class="btn btn-primary btn-lg px-5 py-3 fw-bold rounded-pill shadow-primary"><?= __('secure_acc') ?></a>
</div>
</div>
</div>

12
kyc.php
View File

@ -44,11 +44,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
if (empty($real_name) || empty($id_number)) {
$error = "Please fill in all fields";
$error = __("fill_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!";
$success = __("kyc_submitted");
// Refresh user data
$userData['kyc_status'] = 1;
}
@ -68,7 +68,7 @@ $kycStatus = $userData['kyc_status'] ?? 0;
</div>
<div class="card bg-surface border-secondary rounded-4 shadow-lg overflow-hidden">
<div class="card-header border-secondary bg-black bg-opacity-20 p-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-person-vcard text-primary"></i>
<?= __('kyc') ?>
@ -98,18 +98,18 @@ $kycStatus = $userData['kyc_status'] ?? 0;
<div class="text-center py-5">
<i class="bi bi-clock-history text-warning" style="font-size: 80px;"></i>
<h3 class="text-white fw-bold mt-4"><?= __('pending') ?></h3>
<p class="text-white-50">Your application is being reviewed by our team.</p>
<p class="text-white-50"><?= __('kyc_pending_desc') ?></p>
</div>
<?php else: ?>
<form method="POST" enctype="multipart/form-data">
<div class="row g-4 mb-4">
<div class="col-md-6">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('full_name') ?></label>
<input type="text" name="real_name" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="Enter your full name" required>
<input type="text" name="real_name" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('enter_full_name') ?>" required>
</div>
<div class="col-md-6">
<label class="form-label text-white-50 small fw-bold mb-2"><?= __('id_number') ?></label>
<input type="text" name="id_number" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="Enter your ID number" required>
<input type="text" name="id_number" class="form-control bg-black border-secondary text-white py-3 px-4 rounded-4" placeholder="<?= __('enter_id_number') ?>" required>
</div>
</div>

View File

@ -9,11 +9,11 @@ require_once __DIR__ . '/includes/header.php';
<table class="table table-dark table-hover mb-0 align-middle">
<thead style="background: #161a1e;">
<tr class="text-light-50 small border-0">
<th class="ps-4 py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;">Asset</th>
<th class="py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;">Last Price</th>
<th class="py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;">24h Change</th>
<th class="py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;">24h Volume</th>
<th class="text-end pe-4 py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;">Market</th>
<th class="ps-4 py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;"><?= __('coin') ?></th>
<th class="py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;"><?= __('last_price') ?></th>
<th class="py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;"><?= __('change_24h') ?></th>
<th class="py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;"><?= __('vol_24h') ?></th>
<th class="text-end pe-4 py-4 border-0 fw-bold text-uppercase" style="letter-spacing: 1px; color: #ffffff !important;"><?= __('market') ?></th>
</tr>
</thead>
<tbody class="border-0">

View File

@ -6,7 +6,7 @@ require_once __DIR__ . '/includes/header.php';
<div class="text-center mb-5">
<h1 class="display-4 fw-bold mb-3"><?= __('mining') ?></h1>
<p class="lead text-muted mx-auto" style="max-width: 700px;">
Professional cloud mining and staking platform. Join thousands of users earning passive income with Byro's high-efficiency mining pools.
<?= __('mining_desc') ?>
</p>
</div>
@ -25,7 +25,7 @@ require_once __DIR__ . '/includes/header.php';
<div class="col-lg-4 col-md-6">
<div class="card h-100 bg-dark border-secondary shadow-hover transition-all position-relative overflow-hidden" style="border-radius: 20px;">
<?php if ($pool['hot']): ?>
<div class="position-absolute top-0 end-0 bg-primary text-white px-3 py-1 small fw-bold" style="border-bottom-left-radius: 20px;">HOT</div>
<div class="position-absolute top-0 end-0 bg-primary text-white px-3 py-1 small fw-bold" style="border-bottom-left-radius: 20px;"><?= __('hot') ?></div>
<?php endif; ?>
<div class="card-body p-4">
<div class="d-flex align-items-center mb-4">
@ -51,8 +51,8 @@ require_once __DIR__ . '/includes/header.php';
</div>
<div class="d-flex gap-2 mb-4 small text-muted">
<i class="bi bi-shield-check text-success"></i> Principal Protected
<i class="bi bi-lightning-fill text-warning ms-2"></i> Daily Payouts
<i class="bi bi-shield-check text-success"></i> <?= __('principal_protected') ?>
<i class="bi bi-lightning-fill text-warning ms-2"></i> <?= __('daily_payouts') ?>
</div>
<button class="btn btn-primary w-100 py-3 fw-bold rounded-pill"><?= __('start_mining') ?></button>
@ -64,14 +64,14 @@ require_once __DIR__ . '/includes/header.php';
<div class="row g-4 align-items-center py-5">
<div class="col-md-6">
<h2 class="fw-bold mb-4">Why choose Byro Mining?</h2>
<h2 class="fw-bold mb-4"><?= __('why_mining') ?></h2>
<div class="d-flex gap-4 mb-4">
<div class="bg-primary bg-opacity-10 p-3 rounded-4">
<i class="bi bi-cpu fs-2 text-primary"></i>
</div>
<div>
<h5 class="fw-bold">Advanced Hardware</h5>
<p class="text-muted">We use the latest ASIC and GPU miners to ensure maximum profitability and stability.</p>
<h5 class="fw-bold"><?= __('adv_hardware') ?></h5>
<p class="text-muted"><?= __('adv_hardware_desc') ?></p>
</div>
</div>
<div class="d-flex gap-4 mb-4">
@ -79,8 +79,8 @@ require_once __DIR__ . '/includes/header.php';
<i class="bi bi-wallet2 fs-2 text-success"></i>
</div>
<div>
<h5 class="fw-bold">Automatic Compounding</h5>
<p class="text-muted">Reinvest your daily rewards automatically to maximize your total yield over time.</p>
<h5 class="fw-bold"><?= __('auto_compound') ?></h5>
<p class="text-muted"><?= __('auto_compound_desc') ?></p>
</div>
</div>
<div class="d-flex gap-4">
@ -88,32 +88,32 @@ require_once __DIR__ . '/includes/header.php';
<i class="bi bi-bar-chart-line fs-2 text-info"></i>
</div>
<div>
<h5 class="fw-bold">Real-time Monitoring</h5>
<p class="text-muted">Track your hash rate and earnings in real-time through our intuitive dashboard.</p>
<h5 class="fw-bold"><?= __('real_time_monitor') ?></h5>
<p class="text-muted"><?= __('real_time_monitor_desc') ?></p>
</div>
</div>
</div>
<div class="col-md-6">
<div class="bg-surface p-5 rounded-5 border border-secondary text-center shadow">
<h3 class="fw-bold mb-3">Calculate Your Profit</h3>
<p class="text-muted mb-4">Enter your investment amount to estimate your daily earnings.</p>
<h3 class="fw-bold mb-3"><?= __('calc_profit') ?></h3>
<p class="text-muted mb-4"><?= __('calc_desc') ?></p>
<div class="input-group mb-4">
<span class="input-group-text bg-black border-secondary text-white">USDT</span>
<input type="number" class="form-control bg-black border-secondary text-white p-3" placeholder="Amount to invest">
<input type="number" class="form-control bg-black border-secondary text-white p-3" placeholder="<?= __('amount_to_invest') ?>">
</div>
<div class="bg-black p-4 rounded-4 mb-4">
<div class="row">
<div class="col-6 border-end border-secondary">
<div class="text-muted small mb-1">Daily Profit</div>
<div class="text-muted small mb-1"><?= __('daily_profit') ?></div>
<div class="text-success fw-bold fs-4">$4.10</div>
</div>
<div class="col-6">
<div class="text-muted small mb-1">Monthly Profit</div>
<div class="text-muted small mb-1"><?= __('monthly_profit') ?></div>
<div class="text-success fw-bold fs-4">$123.00</div>
</div>
</div>
</div>
<button class="btn btn-outline-primary w-100 py-3 rounded-pill fw-bold">Try Mining Calculator</button>
<button class="btn btn-outline-primary w-100 py-3 rounded-pill fw-bold"><?= __('try_calc') ?></button>
</div>
</div>
</div>

View File

@ -14,16 +14,52 @@ $userData = $stmt->fetch();
// Get balances
$stmt = db()->prepare("SELECT * FROM user_balances WHERE user_id = ?");
$stmt->execute([$user['id']]);
$balances = $stmt->fetchAll();
$userBalances = $stmt->fetchAll();
$balancesBySymbol = [];
foreach ($userBalances as $ub) {
$balancesBySymbol[$ub['symbol']] = $ub;
}
// Total USDT Balance calculation
// Calculate total balance in USDT
$totalBalanceUsdt = 0;
foreach ($balances as $b) {
if ($b['symbol'] === 'USDT') {
$totalBalanceUsdt += $b['available'] + $b['frozen'];
foreach ($userBalances as $ub) {
$totalBalanceUsdt += ($ub['available'] + $ub['frozen']) * getCoinPrice($ub['symbol']);
}
$displayCoins = ['BTC', 'ETH', 'USDT', 'LTC', 'BNB', 'SOL', 'TRX', 'XRP'];
$balances = [];
foreach ($displayCoins as $symbol) {
$balances[] = [
'symbol' => $symbol,
'available' => $balancesBySymbol[$symbol]['available'] ?? 0,
'frozen' => $balancesBySymbol[$symbol]['frozen'] ?? 0,
];
}
// Add any other coins user might have that are not in displayCoins
foreach ($userBalances as $ub) {
if (!in_array($ub['symbol'], $displayCoins)) {
$balances[] = $ub;
}
}
function getCoinPrice($symbol) {
$prices = [
'BTC' => 65432.10,
'ETH' => 3542.50,
'USDT' => 1.00,
'BNB' => 612.30,
'SOL' => 145.20,
'LTC' => 85.40,
'TRX' => 0.12,
'XRP' => 0.62,
'ADA' => 0.45,
'DOGE' => 0.16,
'DOT' => 7.20,
'MATIC' => 0.72,
];
return $prices[strtoupper($symbol)] ?? 1.00;
}
function getVipLevel($totalRecharge) {
if ($totalRecharge >= 10000000) return 7;
if ($totalRecharge >= 5000000) return 6;
@ -55,10 +91,10 @@ $kycStatusColor = [
<div class="row g-4">
<!-- Sidebar -->
<div class="col-lg-3">
<div class="card bg-surface border-secondary rounded-4 overflow-hidden h-100">
<div class="card bg-surface border-secondary rounded-4 overflow-hidden h-100 shadow-lg">
<div class="card-body p-0">
<!-- User Header -->
<div class="p-4 text-center border-bottom border-secondary bg-black bg-opacity-20">
<div class="p-4 text-center border-bottom border-secondary bg-black bg-opacity-30">
<div class="avatar-wrapper mb-3 mx-auto">
<div class="rounded-circle bg-primary bg-gradient d-flex align-items-center justify-content-center text-white shadow" style="width: 80px; height: 80px; font-size: 32px;">
<?= strtoupper(substr($userData['username'], 0, 1)) ?>
@ -68,33 +104,33 @@ $kycStatusColor = [
</div>
<!-- Menu List -->
<div class="list-group list-group-flush bg-transparent">
<div class="list-group-item bg-transparent border-secondary py-3 d-flex justify-content-between align-items-center">
<div class="list-group list-group-flush">
<div class="list-group-item py-3 d-flex justify-content-between align-items-center">
<span class="text-white-50 small"><i class="bi bi-person-badge me-2 text-primary"></i>UID</span>
<span class="text-white fw-bold small"><?= $userData['uid'] ?></span>
</div>
<div class="list-group-item bg-transparent border-secondary py-3 d-flex justify-content-between align-items-center">
<div class="list-group-item py-3 d-flex justify-content-between align-items-center">
<span class="text-white-50 small"><i class="bi bi-shield-check me-2 text-info"></i><?= __('credit_score') ?></span>
<span class="text-info fw-bold small"><?= $userData['credit_score'] ?></span>
</div>
<div class="list-group-item bg-transparent border-secondary py-3 d-flex justify-content-between align-items-center">
<div class="list-group-item py-3 d-flex justify-content-between align-items-center">
<span class="text-white-50 small"><i class="bi bi-gem me-2 text-warning"></i><?= __('vip_level') ?></span>
<span class="badge bg-warning text-dark fw-bold">VIP <?= $vipLevel ?></span>
</div>
<a href="/kyc.php" class="list-group-item list-group-item-action bg-transparent border-secondary py-3 d-flex justify-content-between align-items-center text-white">
<a href="/kyc.php" class="list-group-item list-group-item-action py-3 d-flex justify-content-between align-items-center">
<span class="text-white-50 small"><i class="bi bi-person-vcard me-2 text-success"></i><?= __('kyc') ?></span>
<span class="small <?= $kycStatusColor[$userData['kyc_status'] ?? 0] ?>">
<?= $kycStatusText[$userData['kyc_status'] ?? 0] ?> <i class="bi bi-chevron-right ms-1"></i>
</span>
</a>
<a href="/security.php" class="list-group-item list-group-item-action bg-transparent border-secondary py-3 d-flex justify-content-between align-items-center text-white">
<a href="/security.php" class="list-group-item list-group-item-action py-3 d-flex justify-content-between align-items-center">
<span class="text-white-50 small"><i class="bi bi-lock me-2 text-danger"></i><?= __('security') ?></span>
<span class="text-white-50 small"><i class="bi bi-chevron-right"></i></span>
</a>
<a href="/auth/logout.php" class="list-group-item list-group-item-action bg-transparent border-0 py-3 d-flex justify-content-between align-items-center text-danger">
<a href="/auth/logout.php" class="list-group-item list-group-item-action py-3 d-flex justify-content-between align-items-center text-danger border-0">
<span class="small"><i class="bi bi-box-arrow-right me-2"></i><?= __('logout') ?></span>
<span class="small"><i class="bi bi-chevron-right"></i></span>
</a>
@ -106,58 +142,67 @@ $kycStatusColor = [
<!-- Main Content -->
<div class="col-lg-9">
<!-- Asset Summary -->
<div class="card bg-surface border-secondary rounded-4 mb-4">
<div class="card-body p-4">
<div class="row align-items-center">
<div class="col-md-6">
<p class="text-white-50 small mb-1"><?= __('balance') ?> (USDT)</p>
<h2 class="text-white fw-bold mb-0"> <?= number_format($totalBalanceUsdt, 2) ?> <span class="fs-6 fw-normal text-white-50">USDT</span></h2>
</div>
<div class="col-md-6 text-md-end mt-3 mt-md-0">
<a href="/recharge.php" class="btn btn-primary rounded-pill px-4 me-2">
<i class="bi bi-plus-circle me-2"></i><?= __('deposit') ?>
</a>
<a href="/withdraw.php" class="btn btn-outline-light rounded-pill px-4">
<i class="bi bi-arrow-up-circle me-2"></i><?= __('withdraw') ?>
</a>
<div class="card bg-surface border-secondary rounded-4 mb-4 shadow-lg overflow-hidden">
<div class="card-body p-0">
<div class="p-4 border-bottom border-secondary bg-black bg-opacity-20">
<div class="d-flex justify-content-between align-items-center mb-3">
<span class="text-white-50 small"><?= __('balance') ?>:</span>
<span class="text-white-50 small">(USDT)</span>
</div>
<h2 class="text-white fw-bold mb-0"> <?= number_format($totalBalanceUsdt, 2) ?></h2>
</div>
<div class="p-3 d-flex gap-2">
<a href="/recharge.php" class="btn btn-primary flex-fill rounded-3 py-2 shadow-primary">
<i class="bi bi-plus-circle me-2"></i><?= __('deposit') ?>
</a>
<a href="/withdraw.php" class="btn btn-outline-light flex-fill rounded-3 py-2">
<i class="bi bi-arrow-up-circle me-2"></i><?= __('withdraw') ?>
</a>
</div>
</div>
</div>
<!-- Asset Table -->
<div class="card bg-surface border-secondary rounded-4 overflow-hidden">
<div class="card bg-surface border-secondary rounded-4 overflow-hidden shadow-lg">
<div class="table-responsive">
<table class="table table-dark table-hover mb-0 align-middle">
<thead class="bg-black bg-opacity-40 text-white-50 small border-secondary">
<thead class="bg-black bg-opacity-50 text-white small border-secondary">
<tr>
<th class="ps-4 py-3 border-secondary text-white"><?= __('coin') ?></th>
<th class="py-3 border-secondary text-white"><?= __('available_balance') ?></th>
<th class="py-3 border-secondary text-white"><?= __('frozen') ?></th>
<th class="py-3 border-secondary text-white"><?= __('converted_to') ?> (USDT)</th>
<th class="text-end pe-4 py-3 border-secondary text-white"><?= __('trade') ?></th>
<th class="ps-4 py-3 border-secondary" style="width: 25%;"><?= __('coin') ?></th>
<th class="py-3 border-secondary" style="width: 20%;"><?= __('available_balance') ?></th>
<th class="py-3 border-secondary" style="width: 20%;"><?= __('frozen') ?></th>
<th class="py-3 border-secondary" style="width: 20%;"><?= __('converted_to') ?></th>
<th class="text-end pe-4 py-3 border-secondary" style="width: 15%;"><?= __('operation') ?></th>
</tr>
</thead>
</table>
</div>
<!-- Scrollable Body - Limited to 4 rows (approx 210px) -->
<div class="asset-list-container" style="height: 210px; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none;">
<style>
.asset-list-container::-webkit-scrollbar { display: none; }
</style>
<table class="table table-dark table-hover mb-0 align-middle">
<tbody class="border-0">
<?php foreach ($balances as $b): ?>
<tr class="border-secondary">
<td class="ps-4 py-4">
<td class="ps-4 py-3" style="width: 25%;">
<div class="d-flex align-items-center gap-3">
<img src="<?= getCoinIcon($b['symbol']) ?>" width="32" height="32" class="rounded-circle">
<span class="fw-bold text-white"><?= $b['symbol'] ?></span>
<img src="<?= getCoinIcon($b['symbol']) ?>" width="24" height="24" class="rounded-circle">
<span class="fw-bold text-white small"><?= $b['symbol'] ?></span>
</div>
</td>
<td class="py-4">
<span class="text-white fw-bold"><?= number_format($b['available'], 4) ?></span>
<td class="py-3" style="width: 20%;">
<span class="text-white small fw-bold"><?= number_format($b['available'], 4) ?></span>
</td>
<td class="py-4">
<td class="py-3" style="width: 20%;">
<span class="text-white-50 small"><?= number_format($b['frozen'], 4) ?></span>
</td>
<td class="py-4">
<span class="text-white-50 small"> <?= number_format($b['available'] + $b['frozen'], 2) ?></span>
<td class="py-3" style="width: 20%;">
<span class="text-white-50 small"> <?= number_format(($b['available'] + $b['frozen']) * getCoinPrice($b['symbol']), 2) ?></span>
</td>
<td class="text-end pe-4">
<a href="/trade.php?symbol=<?= $b['symbol'] ?>" class="btn btn-sm btn-outline-primary rounded-pill px-3"><?= __('trade') ?></a>
<td class="text-end pe-4 py-3" style="width: 15%;">
<a href="/trade.php?symbol=<?= $b['symbol'] ?>" class="text-primary text-decoration-none small"><?= __('trade') ?></a>
</td>
</tr>
<?php endforeach; ?>
@ -165,6 +210,69 @@ $kycStatusColor = [
</table>
</div>
</div>
<!-- Asset Records -->
<div class="mt-5 text-center mb-3">
<h5 class="text-white fw-bold"><?= __('asset_records') ?></h5>
</div>
<div class="card bg-surface border-secondary rounded-4 overflow-hidden shadow-lg">
<div class="table-responsive">
<table class="table table-dark table-hover mb-0 align-middle small">
<thead class="bg-black bg-opacity-20 text-white-50 border-secondary">
<tr>
<th class="ps-4 py-3 border-secondary"><?= __('type') ?></th>
<th class="py-3 border-secondary"><?= __('amount') ?></th>
<th class="py-3 border-secondary"><?= __('status') ?></th>
<th class="text-end pe-4 py-3 border-secondary"><?= __('time') ?></th>
</tr>
</thead>
<tbody class="border-0">
<?php if (empty($transactions)): ?>
<tr>
<td colspan="4" class="text-center py-5 text-white-50">
<i class="bi bi-inbox fs-2 d-block mb-2"></i>
<?= __('no_records_found') ?>
</td>
</tr>
<?php else: ?>
<?php foreach ($transactions as $t):
$typeColor = 'text-primary';
$typeName = __($t['type']);
if ($t['type'] === 'deposit') $typeColor = 'text-success';
if ($t['type'] === 'withdraw') $typeColor = 'text-danger';
if ($t['type'] === 'trade_profit') $typeColor = 'text-success';
if ($t['type'] === 'trade_loss') $typeColor = 'text-danger';
if ($t['type'] === 'flash_exchange') $typeColor = 'text-info';
$prefix = '';
if ($t['type'] === 'trade_profit' || $t['type'] === 'deposit') $prefix = '+';
if ($t['type'] === 'trade_loss' || $t['type'] === 'withdraw') $prefix = '-';
?>
<tr class="border-secondary">
<td class="ps-4 py-3">
<span class="<?= $typeColor ?> fw-bold"><?= $typeName ?></span>
</td>
<td class="py-3">
<span class="text-white fw-bold"><?= $prefix . number_format($t['amount'], 4) ?></span>
<span class="text-white-50 small"><?= $t['symbol'] ?></span>
</td>
<td class="py-3">
<?php if ($t['status'] === 'completed'): ?>
<span class="badge bg-success bg-opacity-10 text-success border border-success border-opacity-25 px-2 py-1"><?= __('completed') ?></span>
<?php else: ?>
<span class="badge bg-warning bg-opacity-10 text-warning border border-warning border-opacity-25 px-2 py-1"><?= __('pending') ?></span>
<?php endif; ?>
</td>
<td class="text-end pe-4 py-3">
<span class="text-white-50 x-small"><?= date('Y-m-d H:i', strtotime($t['created_at'])) ?></span>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -27,7 +27,7 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
</div>
<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-20 p-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-wallet2 text-primary"></i>
<?= __('recharge') ?>
@ -36,7 +36,7 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
<div class="card-body p-4">
<!-- Tabs -->
<ul class="nav nav-pills nav-fill mb-4 bg-dark p-1 rounded-pill" id="rechargeTabs" role="tablist">
<ul class="nav nav-pills nav-fill mb-4 bg-black p-1 rounded-pill" id="rechargeTabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active rounded-pill px-4" id="fiat-tab" data-bs-toggle="pill" data-bs-target="#fiat" type="button" role="tab"><?= __('fiat_recharge') ?></button>
</li>
@ -195,10 +195,6 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
</div>
<style>
.bg-surface { background-color: #1e2329; }
.bg-dark { background-color: #0b0e11; }
.form-select, .form-control { border-color: #2b3139; }
.form-select:focus, .form-control:focus { background-color: #1e2329; border-color: #0062ff; box-shadow: none; color: #fff; }
.nav-pills .nav-link { color: #9ba3af; font-weight: 500; }
.nav-pills .nav-link.active { background-color: #0062ff; color: #fff; }
.btn-outline-primary:hover { background-color: #0062ff; color: #fff; }
@ -255,13 +251,13 @@ function confirmFiatOrder() {
return;
}
const message = `【充值请求】\n充值方式法币充值\n法币金额${amount} ${currency}\n预计到账${estUsdt}\n请提供支付详情以便核实。`;
const message = `【<?= __("recharge") ?>】\n<?= __("type") ?><?= __("fiat_recharge") ?>\n<?= __("amount") ?>${amount} ${currency}\n<?= __("est_usdt") ?>${estUsdt}`;
sendToCS(message);
}
function confirmCryptoOrder() {
const message = `【充值请求】\n充值方式加密货币 (USDT)\n主网${currentNetwork}\n地址${currentAddress}\n我已完成支付请核实。`;
const message = `【<?= __("recharge") ?>】\n<?= __("type") ?>USDT\n<?= __("network") ?>${currentNetwork}\n<?= __("address") ?>${currentAddress}`;
sendToCS(message);
}
@ -278,9 +274,9 @@ function sendToCS(message) {
if (csInput) {
csInput.value = message;
document.getElementById('cs-form').dispatchEvent(new Event('submit'));
alert('充值请求已发送,请在客服对话框中继续交流。');
alert('<?= __("request_sent") ?>');
} else {
alert('无法连接客服系统,请刷新页面重试。');
alert('<?= __("cs_connect_fail") ?>');
}
}
@ -288,7 +284,7 @@ function copyAddress() {
const addr = document.getElementById('cryptoAddress');
addr.select();
document.execCommand('copy');
alert('地址已复制到剪贴板');
alert('<?= __("copy_success") ?>');
}
</script>

View File

@ -22,32 +22,30 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$current_pwd_hash = $stmt->fetchColumn();
if (!password_verify($old_pwd, $current_pwd_hash)) {
$error = "Old password incorrect";
$error = __("old_pwd_incorrect");
} elseif ($new_pwd !== $confirm_pwd) {
$error = "Passwords do not match";
$error = __("pwd_mismatch");
} elseif (strlen($new_pwd) < 6) {
$error = "Password must be at least 6 characters";
$error = __("pwd_too_short");
} 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";
$success = __("pwd_changed_success");
}
} 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";
$error = __("pwd_mismatch");
} elseif (strlen($trade_pwd) < 6) {
$error = "Transaction password must be at least 6 characters";
$error = __("pwd_too_short");
} 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";
$success = __("trade_pwd_updated");
}
}
}
@ -68,7 +66,7 @@ $hasTradePwd = !empty($stmt->fetchColumn());
</div>
<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-20 p-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>
<?= __('security') ?>
@ -97,16 +95,19 @@ $hasTradePwd = !empty($stmt->fetchColumn());
<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-4 py-2 mt-2"><?= __('change_password') ?></button>
<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>
@ -123,13 +124,15 @@ $hasTradePwd = !empty($stmt->fetchColumn());
<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>
</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-4 py-2 mt-2 text-dark fw-bold"><?= $hasTradePwd ? __('change_password') : __('set_password') ?></button>
<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>
</form>

View File

@ -24,7 +24,7 @@ $available = $bal['available'] ?? 0;
</div>
<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-20 p-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-cash-stack text-warning"></i>
<?= __('withdraw') ?>
@ -33,7 +33,7 @@ $available = $bal['available'] ?? 0;
<div class="card-body p-4">
<!-- Tabs -->
<ul class="nav nav-pills nav-fill mb-4 bg-dark p-1 rounded-pill" id="withdrawTabs" role="tablist">
<ul class="nav nav-pills nav-fill mb-4 bg-black p-1 rounded-pill" id="withdrawTabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active rounded-pill px-4" id="crypto-withdraw-tab" data-bs-toggle="pill" data-bs-target="#crypto-withdraw" type="button" role="tab"><?= __('crypto_withdraw') ?? 'USDT Withdrawal' ?></button>
</li>
@ -217,10 +217,6 @@ $available = $bal['available'] ?? 0;
</div>
<style>
.bg-surface { background-color: #1e2329; }
.bg-dark { background-color: #0b0e11; }
.form-select, .form-control { border-color: #2b3139; }
.form-select:focus, .form-control:focus { background-color: #1e2329; border-color: #ffc107; box-shadow: none; color: #fff; }
.nav-pills .nav-link { color: #9ba3af; font-weight: 500; }
.nav-pills .nav-link.active { background-color: #ffc107; color: #000; }
.btn-outline-warning:hover { background-color: #ffc107; color: #000; }
@ -277,12 +273,12 @@ function confirmCryptoWithdraw() {
const amount = parseFloat(document.getElementById('withdrawAmount').value);
const password = document.getElementById('withdrawPassword').value;
if (!addr) { alert('请输入提现地址'); return; }
if (!amount || amount < 10) { alert('最小提现金额为 10 USDT'); return; }
if (amount > <?= $available ?>) { alert('余额不足'); return; }
if (!password) { alert('请输入提现密码'); return; }
if (!addr) { alert('<?= __("enter_address") ?>'); return; }
if (!amount || amount < 10) { alert('<?= __("min_withdraw_hint") ?>'); return; }
if (amount > <?= $available ?>) { alert('<?= __("insufficient_balance") ?>'); return; }
if (!password) { alert('<?= __("enter_password") ?>'); return; }
const message = `【提现请求】\n提现方式加密货币 (USDT)\n主网${currentWithdrawNetwork}\n地址${addr}\n金额${amount} USDT\n手续费1.00 USDT\n实际到账${document.getElementById('cryptoReceiveAmount').innerText}\n提现密码${password}`;
const message = `【<?= __("withdraw") ?>】\n<?= __("type") ?>USDT\n<?= __("network") ?>${currentWithdrawNetwork}\n<?= __("address") ?>${addr}\n<?= __("amount") ?>${amount} USDT\n<?= __("to_receive") ?>${document.getElementById('cryptoReceiveAmount').innerText}\n<?= __("password") ?>${password}`;
sendWithdrawToCS(message);
}
@ -293,11 +289,11 @@ function confirmFiatWithdraw() {
const estFiat = document.getElementById('fiatReceiveAmount').innerText;
const password = document.getElementById('fiatWithdrawPassword').value;
if (!amount || amount < 10) { alert('最小提现金额为 10 USDT'); return; }
if (amount > <?= $available ?>) { alert('余额不足'); return; }
if (!password) { alert('请输入提现密码'); return; }
if (!amount || amount < 10) { alert('<?= __("min_withdraw_hint") ?>'); return; }
if (amount > <?= $available ?>) { alert('<?= __("insufficient_balance") ?>'); return; }
if (!password) { alert('<?= __("enter_password") ?>'); return; }
const message = `【提现请求】\n提现方式法币提现\n申请金额${amount} USDT\n预计收到${estFiat}\n提现密码${password}\n请客服核实并提供收款方式。`;
const message = `【<?= __("withdraw") ?>】\n<?= __("type") ?><?= __("fiat_withdraw") ?>\n<?= __("amount") ?>${amount} USDT\n<?= __("est_receive_fiat") ?>${estFiat}\n<?= __("password") ?>${password}`;
sendWithdrawToCS(message);
}
@ -315,9 +311,9 @@ function sendWithdrawToCS(message) {
if (csInput) {
csInput.value = message;
document.getElementById('cs-form').dispatchEvent(new Event('submit'));
alert('提现请求已发送,请在客服对话框中继续交流。');
alert('<?= __("request_sent") ?>');
} else {
alert('无法连接客服系统,请刷新页面重试。');
alert('<?= __("cs_connect_fail") ?>');
}
}
</script>