Revert to version 5c3e67c

This commit is contained in:
Flatlogic Bot 2026-02-24 13:03:10 +00:00
parent f26295ac17
commit f69b4b5429
14 changed files with 673 additions and 1298 deletions

View File

@ -3,9 +3,9 @@ require_once __DIR__ . '/../db/config.php';
require_once __DIR__ . '/../includes/lang.php';
if (session_status() === PHP_SESSION_NONE) session_start();
// Force simplified Chinese for admin
$lang = 'zh';
// $_SESSION['lang'] = 'zh'; // Do not persist to session to avoid affecting front-end default language
// Remove forced simplified Chinese for admin
// $lang = 'zh';
// $_SESSION['lang'] = 'zh';
// Admin check
$admin = null;
@ -254,20 +254,38 @@ function renderAdminPage($content, $title = '后台管理') {
<div class="admin-header">
<div class="d-flex align-items-center gap-2">
<button onclick="location.reload()" class="btn btn-sm btn-light border">
<i class="bi bi-arrow-clockwise"></i> 刷新
<i class="bi bi-arrow-clockwise"></i> <?= __('refresh') ?>
</button>
<h5 class="mb-0"><?= $title ?></h5>
</div>
<div class="d-flex align-items-center gap-3">
<div class="text-muted small">欢迎您, <?= htmlspecialchars($admin['username']) ?></div>
<!-- Admin Language Switcher -->
<div class="dropdown me-2">
<button class="btn btn-sm btn-light border dropdown-toggle d-flex align-items-center gap-2" type="button" data-bs-toggle="dropdown">
<img src="https://flagcdn.com/w20/<?= $supported_langs[$lang]['flag'] ?>.png" width="16" alt="<?= $lang ?>">
<span><?= $supported_langs[$lang]['name'] ?></span>
</button>
<ul class="dropdown-menu dropdown-menu-end shadow-sm border-0">
<?php foreach ($supported_langs as $code => $info): ?>
<li>
<a class="dropdown-item d-flex align-items-center gap-2" href="?lang=<?= $code ?>">
<img src="https://flagcdn.com/w20/<?= $info['flag'] ?>.png" width="16" alt="<?= $code ?>">
<?= $info['name'] ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="text-muted small"><?= __('welcome_admin') ?>, <?= htmlspecialchars($admin['username']) ?></div>
<div class="position-relative me-2">
<i class="bi bi-bell fs-5"></i>
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger d-none" id="total-badge">
0
</span>
</div>
<a href="/" class="btn btn-sm btn-outline-primary">返回首页</a>
<a href="/auth/logout.php" class="btn btn-sm btn-outline-danger">登出</a>
<a href="/" class="btn btn-sm btn-outline-primary"><?= __('return_home') ?></a>
<a href="/auth/logout.php" class="btn btn-sm btn-outline-danger"><?= __('logout') ?></a>
</div>
</div>
@ -337,12 +355,12 @@ function renderAdminPage($content, $title = '后台管理') {
function speak(text) {
if ('speechSynthesis' in window) {
const utterance = new SpeechSynthesisUtterance(text);
utterance.lang = 'zh-CN';
utterance.lang = '<?= $lang === 'zh' ? 'zh-CN' : 'en-US' ?>';
window.speechSynthesis.speak(utterance);
}
// Also try native notification
if (Notification.permission === "granted") {
new Notification("新消息提醒", { body: text, icon: '/assets/images/logo.png' });
new Notification("<?= __('notification') ?>", { body: text, icon: '/assets/images/logo.png' });
}
}

View File

@ -119,8 +119,8 @@ require_once __DIR__ . '/includes/header.php';
</div>
<!-- Floating elements for depth -->
<div class="floating-element element-1"><div class="glass-card"><i class="bi bi-currency-bitcoin text-warning"></i><span>BTC/USDT</span></div></div>
<div class="floating-element element-2"><div class="glass-card"><i class="bi bi-shield-check text-success"></i><span>Secure</span></div></div>
<div class="floating-element element-3"><div class="glass-card"><i class="bi bi-lightning-charge-fill text-info"></i><span>Fast</span></div></div>
<div class="floating-element element-2"><div class="glass-card"><i class="bi bi-shield-check text-success"></i><span><?= __('secure') ?></span></div></div>
<div class="floating-element element-3"><div class="glass-card"><i class="bi bi-lightning-charge-fill text-info"></i><span><?= __('fast') ?></span></div></div>
<!-- Background Glow -->
<div class="mockup-glow"></div>

View File

@ -77,7 +77,7 @@
<i class="bi bi-arrow-left-right"></i>
<span><?= __('trading') ?></span>
</a>
<a href="/profile.php" class="<?= $_SERVER['PHP_SELF'] == '/profile.php' ? 'active' : '' ?>">
<a href="<?= isset($_SESSION['user_id']) ? '/profile.php' : '/auth/login.php' ?>" class="<?= $_SERVER['PHP_SELF'] == '/profile.php' ? 'active' : '' ?>">
<i class="bi bi-wallet2"></i>
<span><?= __('assets') ?></span>
</a>
@ -262,7 +262,7 @@ if (csToggle) csToggle.addEventListener('click', () => {
csBox.classList.toggle('d-none');
if (!csBox.classList.contains('d-none')) {
const now = new Date();
const timeStr = now.toLocaleTimeString('zh-CN', {hour: '2-digit', minute:'2-digit', second: '2-digit'});
const timeStr = now.toLocaleTimeString('<?= $lang === 'zh' ? 'zh-CN' : ($lang === 'jp' ? 'ja-JP' : ($lang === 'kr' ? 'ko-KR' : 'en-US')) ?>', {hour: '2-digit', minute:'2-digit', second: '2-digit'});
fetch(apiPath + '?action=ping&user_time=' + encodeURIComponent(timeStr));
scrollToBottom();
pollMessages();

View File

@ -453,22 +453,20 @@ if (isset($_SESSION['user_id'])) {
</nav>
<div class="header-right">
<div class="lang-switcher">
<?php if ($lang === 'zh'): ?>
<img src="https://flagcdn.com/w40/cn.png" class="flag-icon" alt="CN">
<span><?= __('chinese') ?></span>
<?php else: ?>
<img src="https://flagcdn.com/w40/us.png" class="flag-icon" alt="US">
<span><?= __('english') ?></span>
<?php endif; ?>
<img src="https://flagcdn.com/w40/<?= $supported_langs[$lang]['flag'] ?>.png" class="flag-icon" alt="<?= $lang ?>">
<span><?= $supported_langs[$lang]['name'] ?></span>
<div class="lang-dropdown">
<a href="?lang=zh">
<img src="https://flagcdn.com/w40/cn.png" class="flag-icon" alt="CN">
<?= __('chinese') ?>
</a>
<a href="?lang=en">
<img src="https://flagcdn.com/w40/us.png" class="flag-icon" alt="US">
<?= __('english') ?>
<?php
foreach ($supported_langs as $code => $info):
$queryParams = $_GET;
$queryParams['lang'] = $code;
$newUrl = $_SERVER['PHP_SELF'] . '?' . http_build_query($queryParams);
?>
<a href="<?= $newUrl ?>">
<img src="https://flagcdn.com/w40/<?= $info['flag'] ?>.png" class="flag-icon" alt="<?= $code ?>">
<?= $info['name'] ?>
</a>
<?php endforeach; ?>
</div>
</div>
<?php if ($user): ?>

File diff suppressed because it is too large Load Diff

View File

@ -81,7 +81,7 @@ function renderTerminal($activeTab = 'spot') {
<img src="<?php echo getCoinIcon($coin['symbol']); ?>" alt="<?= $coin['symbol'] ?>" onerror="handleIconError(this, '<?= $coin['symbol'] ?>')" style="width: 18px; height: 18px; margin: 0;">
</div>
<div>
<div class="symbol fw-bold text-white" style="font-size: 13px;"><?= $lang === 'zh' ? __($coin['symbol']) : $coin['symbol'] ?></div>
<div class="symbol fw-bold text-white" style="font-size: 13px;"><?= __($coin['symbol']) ?></div>
<div class="change <?= strpos($coin['change'], '+') !== false ? 'text-success' : 'text-danger' ?>" style="font-size: 10px;"><?= $coin['change'] ?></div>
</div>
</div>
@ -98,7 +98,7 @@ function renderTerminal($activeTab = 'spot') {
<div class="d-flex align-items-center gap-3">
<div class="d-flex align-items-center" onclick="toggleMobileSidebar()" style="cursor: pointer;">
<i class="bi bi-list d-md-none fs-3 text-white me-2"></i>
<div class="fs-4 fw-bold text-white"><?= $lang === 'zh' ? __($currentSymbol) : $currentSymbol ?>/<?= __('USDT') ?></div>
<div class="fs-4 fw-bold text-white"><?= __($currentSymbol) ?>/<?= __('USDT') ?></div>
</div>
<div class="price-jump fs-4 fw-bold text-success">--</div>
</div>
@ -106,19 +106,19 @@ function renderTerminal($activeTab = 'spot') {
<div class="header-stat">
<label class="d-block small text-white"><?= __('change_24h') ?></label>
<span class="text-success fw-bold">--</span>
<span class="text-success fw-bold animate-price">--</span>
</div>
<div class="header-stat">
<label class="d-block small text-white"><?= __('high') ?></label>
<span class="text-white fw-bold">--</span>
<span class="text-white fw-bold animate-price">--</span>
</div>
<div class="header-stat">
<label class="d-block small text-white"><?= __('low') ?></label>
<span class="text-white fw-bold">--</span>
<span class="text-white fw-bold animate-price">--</span>
</div>
<div class="header-stat">
<label class="d-block small text-white"><?= __('vol_24h') ?></label>
<span class="text-white fw-bold">--</span>
<span class="text-white fw-bold animate-price">--</span>
</div>
</div>
</div>
@ -160,7 +160,7 @@ function renderTerminal($activeTab = 'spot') {
"timezone": "Etc/UTC",
"theme": "dark",
"style": "1",
"locale": "<?= $lang === 'zh' ? 'zh_CN' : 'en' ?>",
"locale": "<?= $lang === 'zh' ? 'zh_CN' : ($lang === 'jp' ? 'ja' : ($lang === 'kr' ? 'ko' : $lang)) ?>",
"toolbar_bg": "#0b0e11",
"enable_publishing": false,
"hide_top_toolbar": window.innerWidth <= 768,
@ -604,14 +604,14 @@ function renderTerminal($activeTab = 'spot') {
<label class="small text-muted mb-1 d-block fw-bold"><?= ($activeTab === 'contract' ? (__('buy_long')) : (__('buy_price'))) ?></label>
<div class="input-wrapper bg-black p-2 rounded border border-secondary d-flex justify-content-between align-items-center" style="background: #0b0e11 !important; height: 45px;">
<input type="number" id="spot-buy-price" value="64234.50" class="bg-transparent border-0 text-white w-75 fw-bold" style="outline: none; font-size: 14px;">
<span class="suffix text-muted small fw-bold"><?= $lang === 'zh' ? __('USDT') : 'USDT' ?></span>
<span class="suffix text-muted small fw-bold"><?= __('USDT') ?></span>
</div>
</div>
<div class="input-group-custom mb-3">
<label class="small text-muted mb-1 d-block fw-bold"><?= __('amount') ?></label>
<div class="input-wrapper bg-black p-2 rounded border border-secondary d-flex justify-content-between align-items-center" style="background: #0b0e11 !important; height: 45px;">
<input type="number" id="spot-buy-amount" placeholder="0.00" class="bg-transparent border-0 text-white w-75 fw-bold" style="outline: none; font-size: 14px;">
<span class="suffix text-muted small fw-bold"><?= $lang === 'zh' ? __($currentSymbol) : $currentSymbol ?></span>
<span class="suffix text-muted small fw-bold"><?= __($currentSymbol) ?></span>
</div>
</div>
<div class="d-flex gap-1 mb-3">
@ -626,14 +626,14 @@ function renderTerminal($activeTab = 'spot') {
<label class="small text-muted mb-1 d-block fw-bold"><?= ($activeTab === 'contract' ? (__('sell_short')) : (__('sell_price'))) ?></label>
<div class="input-wrapper bg-black p-2 rounded border border-secondary d-flex justify-content-between align-items-center" style="background: #0b0e11 !important; height: 45px;">
<input type="number" id="spot-sell-price" value="64234.50" class="bg-transparent border-0 text-white w-75 fw-bold" style="outline: none; font-size: 14px;">
<span class="suffix text-muted small fw-bold"><?= $lang === 'zh' ? __('USDT') : 'USDT' ?></span>
<span class="suffix text-muted small fw-bold"><?= __('USDT') ?></span>
</div>
</div>
<div class="input-group-custom mb-3">
<label class="small text-muted mb-1 d-block fw-bold"><?= __('amount') ?></label>
<div class="input-wrapper bg-black p-2 rounded border border-secondary d-flex justify-content-between align-items-center" style="background: #0b0e11 !important; height: 45px;">
<input type="number" id="spot-sell-amount" placeholder="0.00" class="bg-transparent border-0 text-white w-75 fw-bold" style="outline: none; font-size: 14px;">
<span class="suffix text-muted small fw-bold"><?= $lang === 'zh' ? __($currentSymbol) : $currentSymbol ?></span>
<span class="suffix text-muted small fw-bold"><?= __($currentSymbol) ?></span>
</div>
</div>
<div class="d-flex gap-1 mb-3">

View File

@ -188,7 +188,7 @@ require_once __DIR__ . '/includes/header.php';
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="d-flex align-items-center">
<img src="<?php echo getCoinIcon($coin['symbol']); ?>" width="32" height="32" class="me-2 rounded-circle bg-light p-1" alt="<?php echo $coin['symbol']; ?>" onerror="handleIconError(this, '<?php echo $coin['symbol']; ?>')">
<span class="fw-bold fs-5"><?php echo $lang === 'zh' ? __($coin['symbol']) : $coin['symbol']; ?></span>
<span class="fw-bold fs-5"><?php echo $coin['name']; ?></span>
<small class="text-muted ms-2 d-none d-md-inline">/USDT</small>
</div>
<span class="change-badge badge bg-success">+0.00%</span>
@ -360,7 +360,7 @@ require_once __DIR__ . '/includes/header.php';
<span><?php echo __('api_connected'); ?></span>
</div>
<div class="ms-auto">
BYRO TRADING ENGINE v4.2.0
<?= $site_name ?> <?= __('trading') ?> v4.2.0
</div>
</div>
@ -499,11 +499,11 @@ const coinData = {};
let demoMode = 'spot';
let currentDemoPrice = 68234.12;
const demoCoins = [
{ symbol: 'BTC', name: 'Bitcoin', price: 68234.12, change: '+2.45%' },
{ symbol: 'ETH', name: 'Ethereum', price: 3456.20, change: '+1.12%' },
{ symbol: 'BNB', name: 'Binance', price: 598.40, change: '-0.56%' },
{ symbol: 'SOL', name: 'Solana', price: 145.20, change: '+5.67%' },
{ symbol: 'XRP', name: 'Ripple', price: 0.62, change: '-1.23%' }
{ symbol: 'BTC', name: '<?= __('bitcoin') ?>', price: 68234.12, change: '+2.45%' },
{ symbol: 'ETH', name: '<?= __('ethereum') ?>', price: 3456.20, change: '+1.12%' },
{ symbol: 'BNB', name: '<?= __('binance_coin') ?>', price: 598.40, change: '-0.56%' },
{ symbol: 'SOL', name: '<?= __('solana') ?>', price: 145.20, change: '+5.67%' },
{ symbol: 'XRP', name: '<?= __('ripple') ?>', price: 0.62, change: '-1.23%' }
];
async function fetchPrices() {

116
legal.php
View File

@ -5,31 +5,101 @@ require_once __DIR__ . '/includes/header.php';
<main class="container py-5">
<div class="row justify-content-center">
<div class="col-lg-10">
<h1 class="mb-5 fw-bold"><?php echo __('privacy'); ?></h1>
<div class="card bg-surface border-secondary p-5 shadow-sm">
<p class="text-white-50 mb-4"><?= __('last_updated') ?></p>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('privacy_1_title') ?></h3>
<p class="text-white-50"><?= __('privacy_1_content') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('privacy_2_title') ?></h3>
<p class="text-white-50"><?= __('privacy_2_content') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('privacy_3_title') ?></h3>
<p class="text-white-50"><?= __('privacy_3_content') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('privacy_4_title') ?></h3>
<p class="text-white-50"><?= __('privacy_4_content') ?></p>
</section>
<section>
<h3 class="fw-bold mb-3 text-white"><?= __('privacy_5_title') ?></h3>
<p class="text-white-50"><?= __('privacy_5_content') ?></p>
</section>
<div class="d-flex align-items-center gap-3 mb-5">
<div class="bg-success rounded-3 p-2">
<i class="bi bi-shield-lock text-white fs-3"></i>
</div>
<h1 class="mb-0 fw-bold"><?php echo __('privacy'); ?></h1>
</div>
<div class="card bg-surface border-secondary p-4 p-md-5 shadow-lg rounded-4">
<div class="alert bg-success bg-opacity-10 border-0 rounded-3 mb-5 p-4 text-success">
<div class="d-flex gap-3">
<i class="bi bi-check-circle-fill fs-4"></i>
<div>
<h5 class="fw-bold mb-1"><?= __('last_updated') ?></h5>
<p class="small mb-0"><?= __('privacy_intro_alert') ?></p>
</div>
</div>
</div>
<div class="privacy-content text-white-50">
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<i class="bi bi-info-square-fill text-success me-2 fs-5"></i>
<?= __('privacy_1_title') ?>
</h3>
<p><?= __('privacy_1_content') ?></p>
<p><?= __('privacy_1_extra') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<i class="bi bi-collection-fill text-success me-2 fs-5"></i>
<?= __('privacy_2_title') ?>
</h3>
<p><?= __('privacy_2_content') ?></p>
<ul class="ms-4 mb-3">
<li><strong><?= __('privacy_data_identity') ?></strong> <?= __('privacy_data_identity_desc') ?></li>
<li><strong><?= __('privacy_data_contact') ?></strong> <?= __('privacy_data_contact_desc') ?></li>
<li><strong><?= __('privacy_data_financial') ?></strong> <?= __('privacy_data_financial_desc') ?></li>
<li><strong><?= __('privacy_data_tech') ?></strong> <?= __('privacy_data_tech_desc') ?></li>
</ul>
<p><?= __('privacy_2_extra_bottom') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<i class="bi bi-gear-fill text-success me-2 fs-5"></i>
<?= __('privacy_3_title') ?>
</h3>
<p><?= __('privacy_3_content') ?></p>
<p><?= __('privacy_3_extra') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<i class="bi bi-safe-fill text-success me-2 fs-5"></i>
<?= __('privacy_4_title') ?>
</h3>
<p><?= __('privacy_4_content') ?></p>
<p><?= __('privacy_4_extra') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<i class="bi bi-person-check-fill text-success me-2 fs-5"></i>
<?= __('privacy_5_title') ?>
</h3>
<p><?= __('privacy_5_content') ?></p>
<p><?= __('privacy_5_extra') ?></p>
</section>
<section class="mb-0 border-top border-secondary pt-5">
<h3 class="fw-bold mb-3 text-white"><?= __('privacy_6_title') ?></h3>
<p><?= __('privacy_6_content') ?></p>
</section>
</div>
</div>
<div class="mt-5 text-center">
<p class="text-white-50 small"><?= __('privacy_footer') ?></p>
</div>
</div>
</div>
</main>
<style>
.privacy-content section h3 {
letter-spacing: 0.5px;
}
.privacy-content section p {
line-height: 1.8;
margin-bottom: 1.2rem;
}
.privacy-content ul li {
margin-bottom: 0.8rem;
color: rgba(255,255,255,0.7);
}
</style>
<?php require_once __DIR__ . '/includes/footer.php'; ?>

View File

@ -47,7 +47,7 @@ require_once __DIR__ . '/includes/header.php';
<img src="<?php echo getCoinIcon($coin['symbol']); ?>" width="26" height="26" alt="<?= $coin['symbol'] ?>" onerror="handleIconError(this, '<?= $coin['symbol'] ?>')">
</div>
<div>
<div class="fw-bold text-white fs-5"><?php echo $lang === 'zh' ? __($coin['symbol']) : $coin['symbol']; ?></div>
<div class="fw-bold text-white fs-5"><?php echo __($coin['symbol']); ?></div>
<div class="text-muted small fw-medium"><?php echo $coin['name']; ?></div>
</div>
</div>
@ -74,7 +74,7 @@ require_once __DIR__ . '/includes/header.php';
<div class="d-flex align-items-center gap-2">
<img src="<?= getCoinIcon($coin['symbol']) ?>" width="32" height="32" class="rounded-circle bg-white p-1" alt="<?= $coin['symbol'] ?>" onerror="handleIconError(this, '<?= $coin['symbol'] ?>')">
<div>
<div class="fw-bold text-white"><?= $lang === 'zh' ? __($coin['symbol']) : $coin['symbol'] ?></div>
<div class="fw-bold text-white"><?= __($coin['symbol']) ?></div>
<div class="text-white-50 x-small"><?= $coin['vol'] ?></div>
</div>
</div>

View File

@ -92,7 +92,7 @@ $types_map = [
</div>
<div>
<div class="text-white fw-bold"><?= $type['name'] ?></div>
<div class="text-white-50 small"><?= $lang === 'zh' ? __($r['symbol']) : $r['symbol'] ?></div>
<div class="text-white-50 small"><?= __($r['symbol']) ?></div>
</div>
</div>
</td>
@ -165,7 +165,7 @@ $types_map = [
<div class="d-flex align-items-center gap-2">
<span class="badge bg-<?= $type['color'] ?> p-1 rounded-circle" style="width: 8px; height: 8px; padding: 0 !important;"></span>
<span class="text-white fw-bold small"><?= $type['name'] ?></span>
<span class="text-white-50 x-small"><?= $lang === 'zh' ? __($r['symbol']) : $r['symbol'] ?></span>
<span class="text-white-50 x-small"><?= __($r['symbol']) ?></span>
</div>
<span class="text-white-50 x-small"><?= date('m-d H:i', strtotime($r['created_at'])) ?></span>
</div>

View File

@ -1,11 +1,12 @@
<?php
include __DIR__ . '/includes/header.php';
if (!$user) {
if (session_status() === PHP_SESSION_NONE) session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: /auth/login.php');
exit;
}
include __DIR__ . '/includes/header.php';
// Get user data again to ensure we have latest fields
$stmt = db()->prepare("SELECT * FROM users WHERE id = ?");
$stmt->execute([$user['id']]);
@ -213,7 +214,7 @@ $kycStatusColor = [
<td class="ps-4 py-3" style="width: 25%;">
<div class="d-flex align-items-center gap-3">
<img src="<?= getCoinIcon($b['symbol']) ?>" width="24" height="24" class="rounded-circle" alt="<?= $b['symbol'] ?>" onerror="handleIconError(this, '<?= $b['symbol'] ?>')">
<span class="fw-bold text-white small"><?= $lang === 'zh' ? __($b['symbol']) : $b['symbol'] ?></span>
<span class="fw-bold text-white small"><?= __($b['symbol']) ?></span>
</div>
</td>
<td class="py-3" style="width: 20%;">
@ -241,7 +242,7 @@ $kycStatusColor = [
<div class="d-flex align-items-center gap-3">
<img src="<?= getCoinIcon($b['symbol']) ?>" width="32" height="32" class="rounded-circle" alt="<?= $b['symbol'] ?>" onerror="handleIconError(this, '<?= $b['symbol'] ?>')">
<div>
<div class="fw-bold text-white"><?= $lang === 'zh' ? __($b['symbol']) : $b['symbol'] ?></div>
<div class="fw-bold text-white"><?= __($b['symbol']) ?></div>
<div class="text-white-50 x-small"><?= __('available_balance') ?>: <?= number_format($b['available'], 4) ?></div>
</div>
</div>
@ -294,7 +295,7 @@ $kycStatusColor = [
?>
<tr class="border-secondary">
<td class="ps-4 py-3" style="width: 25%;"><span class="<?= $typeColor ?> fw-bold"><?= $typeName ?></span></td>
<td class="py-3" style="width: 30%;"><span class="text-white fw-bold"><?= $prefix . number_format($t['amount'], 4) ?></span> <span class="text-white-50 small"><?= $lang === 'zh' ? __($t['symbol']) : $t['symbol'] ?></span></td>
<td class="py-3" style="width: 30%;"><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" style="width: 20%;"><span class="<?= $statusClass ?> small"><?= $statusText ?></span></td>
<td class="text-end pe-4 py-3" style="width: 25%;"><span class="text-white-50 x-small"><?= date('Y-m-d H:i', strtotime($t['created_at'])) ?></span></td>
</tr>
@ -324,7 +325,7 @@ $kycStatusColor = [
<span class="text-white-50 x-small"><?= date('m-d H:i', strtotime($t['created_at'])) ?></span>
</div>
<div class="d-flex justify-content-between align-items-center">
<div class="text-white fw-bold"><?= number_format($t['amount'], 4) ?> <span class="text-white-50 small"><?= $lang === 'zh' ? __($t['symbol']) : $t['symbol'] ?></span></div>
<div class="text-white fw-bold"><?= number_format($t['amount'], 4) ?> <span class="text-white-50 small"><?= __($t['symbol']) ?></span></div>
<span class="<?= $statusClass ?> x-small fw-bold"><?= $statusText ?></span>
</div>
</div>

View File

@ -132,7 +132,7 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
<div class="d-flex align-items-center gap-3 p-3 bg-dark border border-secondary rounded-4">
<img src="<?= getCoinIcon('USDT') ?>" width="32" height="32" alt="USDT" onerror="handleIconError(this, 'USDT')">
<div>
<div class="fw-bold text-white"><?= $lang === 'zh' ? __('USDT') : 'USDT' ?></div>
<div class="fw-bold text-white"><?= __('USDT') ?></div>
<div class="text-white-50 small"><?= __('tether') ?></div>
</div>
</div>
@ -206,22 +206,22 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
<div class="mb-4 text-center">
<button type="button" class="btn-close position-absolute top-0 end-0 m-3 shadow-none" data-bs-dismiss="modal"></button>
<div class="d-inline-flex align-items-center gap-2 px-3 py-2 rounded-pill bg-primary bg-opacity-10 text-primary small fw-bold mb-3 border border-primary border-opacity-10" style="color: #ff4d94 !important; border-color: #ff4d94 !important;">
<span class="pulse-dot-pink"></span> <span style="letter-spacing: 1px;"><?= $lang === 'zh' ? '账户匹配中…' : 'Account Matching...' ?></span>
<span class="pulse-dot-pink"></span> <span style="letter-spacing: 1px;"><?= __('matching_account') ?></span>
</div>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;"><?= $lang === 'zh' ? '充值订单已生成' : 'Recharge Order Generated' ?></h2>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;"><?= __('order_generated') ?></h2>
<p class="text-muted fw-medium mb-0" style="font-size: 15px; line-height: 1.6;">
<?= $lang === 'zh' ? '您的充值申请已成功提交,系统正在为您智能匹配本次订单的专属收款账户。<br>为保障资金安全及订单唯一性,每笔充值均采用独立账户匹配机制。<br>请您耐心等待匹配完成,请勿刷新或关闭当前页面,以免影响订单状态同步。' : 'Your recharge request has been submitted. The system is matching an exclusive receiving account for you.<br>To ensure fund security and order uniqueness, each recharge uses an independent matching mechanism.<br>Please wait patiently and do not refresh or close this page.' ?>
<?= __('recharge_submitted_desc') ?>
</p>
</div>
<div class="mb-4 py-4 px-4 rounded-4 border border-light shadow-sm" style="background: #fff0f5;">
<div class="row align-items-center text-center">
<div class="col-12 mb-3">
<div class="text-muted small mb-1 fw-bold"><?= $lang === 'zh' ? '预计匹配剩余时间' : 'Estimated Matching Time' ?></div>
<div class="text-muted small mb-1 fw-bold"><?= __('est_matching_time') ?></div>
<div class="display-5 fw-bold text-primary mb-0" id="modal-countdown" style="font-family: 'Monaco', 'Consolas', monospace; color: #ff4d94 !important;">30:00</div>
</div>
<div class="col-12 border-top border-white pt-3">
<div class="text-muted small mb-2 fw-bold"><?= $lang === 'zh' ? '当前状态:账户匹配中…' : 'Current Status: Account Matching...' ?></div>
<div class="text-muted small mb-2 fw-bold"><?= __('current_status') ?><?= __('matching_account') ?></div>
<div class="d-flex justify-content-center gap-1">
<div class="rounded-pill" style="width: 25px; height: 6px; background: #ff4d94;"></div>
<div class="rounded-pill" style="width: 25px; height: 6px; background: #ff4d94;"></div>
@ -233,25 +233,25 @@ $bep20_addr = $settings['usdt_bep20_address'] ?? '0x742d35Cc6634C0532925a3b844Bc
<div class="p-4 rounded-4 bg-light border border-light">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2">
<i class="bi bi-shield-lock-fill text-primary fs-5" style="color: #ff4d94 !important;"></i> <?= $lang === 'zh' ? '温馨提示' : 'Safety Tips' ?>
<i class="bi bi-shield-lock-fill text-primary fs-5" style="color: #ff4d94 !important;"></i> <?= __('security_tips') ?>
</h6>
<div class="text-muted small lh-lg">
<div class="mb-2 d-flex gap-2">
<i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i>
<span><?= $lang === 'zh' ? '请使用您本人实名账户进行转账。' : 'Please use your own real-name account.' ?></span>
<span><?= __('use_real_name') ?></span>
</div>
<div class="mb-2 d-flex gap-2">
<i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i>
<span><?= $lang === 'zh' ? '转账金额必须与订单金额一致。' : 'Transfer amount must match order.' ?></span>
<span><?= __('amount_match') ?></span>
</div>
<div class="d-flex gap-2">
<i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i>
<span><?= $lang === 'zh' ? '请勿关闭当前页面,系统正在为您匹配。' : 'Do not close this page, system is matching.' ?></span>
<span><?= __('do_not_close') ?></span>
</div>
</div>
<div class="mt-4">
<button type="button" class="btn btn-primary w-100 rounded-pill py-2 fw-bold opacity-50" disabled style="background: #ff4d94 !important; border: none;">
<?= $lang === 'zh' ? '等待系统分配账户' : 'Waiting for allocation' ?>...
<?= __('waiting_allocation') ?>...
</button>
</div>
</div>
@ -601,7 +601,50 @@ function renderRechargeUI(data) {
if (!side) return;
const status = String(data.status || '0');
const isZh = '<?= $lang ?>' === 'zh';
// Inject translations from PHP to JS
const translations = {
audit_failed: '<?= __("audit_failed") ?>',
recharge_rejected: '<?= __("recharge_rejected") ?>',
rejected_desc: '<?= __("rejected_desc") ?>',
safety_tips: '<?= __("security_tips") ?>',
check_voucher: '<?= __("check_voucher") ?>',
reinitiate: '<?= __("reinitiate") ?>',
i_understand: '<?= __("confirm") ?>',
matching_account: '<?= __("matching_account") ?>',
order_generated: '<?= __("order_generated") ?>',
recharge_desc: '<?= __("recharge_submitted_desc") ?>',
est_time: '<?= __("est_matching_time") ?>',
current_status: '<?= __("current_status") ?>',
use_real_name: '<?= __("use_real_name") ?>',
amount_match: '<?= __("amount_match") ?>',
getting_details: '<?= __("getting_details") ?>',
matched_success: '<?= __("matching_success") ?>',
exclusive_matched: '<?= __("exclusive_matched") ?>',
matched_desc: '<?= __("matched_desc") ?>',
payment_time: '<?= __("payment_time_remaining") ?>',
waiting_details: '<?= __("waiting_details") ?>',
account_received: '<?= __("account_received") ?>',
transfer_instr: '<?= __("transfer_instructions") ?>',
bank: '<?= __("bank") ?>',
account: '<?= __("account") ?>',
name: '<?= __("full_name") ?>',
copy: '<?= __("copy") ?>',
op_notes: '<?= __("operating_instructions") ?>',
note_intro: '<?= __("note_intro") ?>',
note_1: '<?= __("use_real_name") ?>',
note_2: '<?= __("amount_match") ?>',
note_3: '<?= __("do_not_modify_note") ?>',
note_4: '<?= __("save_voucher") ?>',
note_footer: '<?= __("note_footer") ?>',
finish_transfer: '<?= __("finish_transfer") ?>',
awaiting_review: '<?= __("awaiting_review") ?>',
submitted_awaiting: '<?= __("submitted_awaiting") ?>',
awaiting_desc: '<?= __("awaiting_desc") ?>',
save_screenshot: '<?= __("save_screenshot") ?>',
contact_cs: '<?= __("contact_cs") ?>',
confirm_back: '<?= __("confirm_back") ?>'
};
if (status === 'completed' || status === '3') {
setTimeout(() => finishTransferUI(), 500);
@ -613,18 +656,18 @@ function renderRechargeUI(data) {
<div class="text-center text-lg-start position-relative" style="z-index: 2;">
<div class="mb-4 text-center">
<div class="d-inline-flex align-items-center gap-2 px-3 py-2 rounded-pill bg-danger bg-opacity-10 text-danger small fw-bold mb-3 border border-danger border-opacity-10">
<i class="bi bi-x-circle-fill"></i> <span style="letter-spacing: 1px;">${isZh ? '审核未通过' : 'Audit Failed'}</span>
<i class="bi bi-x-circle-fill"></i> <span style="letter-spacing: 1px;">${translations.audit_failed}</span>
</div>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${isZh ? '充值申请被拒绝' : 'Recharge Request Rejected'}</h2>
<p class="text-muted fw-medium mb-0" style="font-size: 15px;">${isZh ? '您的充值申请未能通过审核。<br>可能由于转账信息不匹配或未收到款项。<br>如有疑问,请咨询在线客服。' : 'Your recharge request failed audit.<br>Possible mismatch in transfer info or payment not received.<br>Please contact support if you have questions.'}</p>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${translations.recharge_rejected}</h2>
<p class="text-muted fw-medium mb-0" style="font-size: 15px;">${translations.rejected_desc}</p>
</div>
<div class="p-4 rounded-4 bg-light border border-light">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-exclamation text-danger"></i> ${isZh ? '温馨提示' : 'Safety Tips'}</h6>
<div class="p-4 rounded-4 bg-light border border-light text-start">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-exclamation text-danger"></i> ${translations.safety_tips}</h6>
<div class="text-muted small lh-lg">
<div class="mb-2 d-flex gap-2"><i class="bi bi-info-circle text-danger"></i> <span>${isZh ? '请检查您的转账金额和凭证。' : 'Please check your transfer amount and receipt.'}</span></div>
<div class="d-flex gap-2"><i class="bi bi-info-circle text-danger"></i> <span>${isZh ? '您可以重新发起充值申请。' : 'You can initiate a new recharge request.'}</span></div>
<div class="mb-2 d-flex gap-2"><i class="bi bi-info-circle text-danger"></i> <span>${translations.check_voucher}</span></div>
<div class="d-flex gap-2"><i class="bi bi-info-circle text-danger"></i> <span>${translations.reinitiate}</span></div>
</div>
<div class="mt-4"><button type="button" class="btn btn-secondary w-100 rounded-pill py-2 fw-bold" onclick="clearRechargeState(); location.reload();">${isZh ? '我知道了' : 'I Understand'}</button></div>
<div class="mt-4"><button type="button" class="btn btn-secondary w-100 rounded-pill py-2 fw-bold" onclick="clearRechargeState(); location.reload();">${translations.i_understand}</button></div>
</div>
</div>`;
return;
@ -635,31 +678,31 @@ function renderRechargeUI(data) {
<div class="text-center text-lg-start position-relative" style="z-index: 2;">
<div class="mb-4 text-center">
<div class="d-inline-flex align-items-center gap-2 px-3 py-2 rounded-pill bg-primary bg-opacity-10 text-primary small fw-bold mb-3 border border-primary border-opacity-10" style="color: #ff4d94 !important; border-color: #ff4d94 !important;">
<span class="pulse-dot-pink"></span> <span style="letter-spacing: 1px;">${isZh ? '账户匹配中…' : 'Account Matching...'}</span>
<span class="pulse-dot-pink"></span> <span style="letter-spacing: 1px;">${translations.matching_account}</span>
</div>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${isZh ? '充值订单已生成' : 'Recharge Order Generated'}</h2>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${translations.order_generated}</h2>
<p class="text-muted fw-medium mb-0" style="font-size: 15px; line-height: 1.6;">
${isZh ? '您的充值申请已成功提交,系统正在为您智能匹配本次订单的专属收款账户。<br>为保障资金安全及订单唯一性,每笔充值均采用独立账户匹配机制。<br>请您耐心等待匹配完成,请勿刷新或关闭当前页面,以免影响订单状态同步。' : 'Your recharge request has been submitted. The system is matching an exclusive receiving account for you.<br>To ensure fund security and order uniqueness, each recharge uses an independent matching mechanism.<br>Please wait patiently and do not refresh or close this page.'}
${translations.recharge_desc}
</p>
</div>
<div class="mb-4 py-4 px-4 rounded-4 border border-light shadow-sm" style="background: #fff0f5;">
<div class="row align-items-center text-center">
<div class="col-12 mb-3">
<div class="text-muted small mb-1 fw-bold">${isZh ? '预计匹配剩余时间' : 'Estimated Matching Time'}</div>
<div class="text-muted small mb-1 fw-bold">${translations.est_time}</div>
<div class="display-5 fw-bold text-primary mb-0" id="modal-countdown" style="font-family: monospace; color: #ff4d94 !important;">30:00</div>
</div>
<div class="col-12 border-top border-white pt-3">
<div class="text-muted small mb-2 fw-bold">${isZh ? '当前状态:账户匹配中…' : 'Current Status: Account Matching...'}</div>
<div class="text-muted small mb-2 fw-bold">${translations.current_status}${translations.matching_account}</div>
</div>
</div>
</div>
<div class="p-4 rounded-4 bg-light border border-light text-start">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-lock-fill text-primary" style="color: #ff4d94 !important;"></i> ${isZh ? '温馨提示' : 'Safety Tips'}</h6>
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-lock-fill text-primary" style="color: #ff4d94 !important;"></i> ${translations.safety_tips}</h6>
<div class="text-muted small lh-lg">
<div class="mb-2 d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${isZh ? '请使用您本人实名账户进行转账。' : 'Please use your own real-name account for transfer.'}</span></div>
<div class="mb-2 d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${isZh ? '转账金额必须与订单金额一致。' : 'Transfer amount must match order amount.'}</span></div>
<div class="mb-2 d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${translations.use_real_name}</span></div>
<div class="mb-2 d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${translations.amount_match}</span></div>
</div>
<div class="mt-4"><button type="button" class="btn btn-primary w-100 rounded-pill py-2 fw-bold opacity-50" disabled style="background: #ff4d94 !important; border: none;">${isZh ? '正在获取账户详情...' : 'Getting Account Details...'}</button></div>
<div class="mt-4"><button type="button" class="btn btn-primary w-100 rounded-pill py-2 fw-bold opacity-50" disabled style="background: #ff4d94 !important; border: none;">${translations.getting_details}</button></div>
</div>
</div>`;
} else if (status === 'matched' || status === '1') {
@ -667,27 +710,27 @@ function renderRechargeUI(data) {
<div class="text-center text-lg-start position-relative" style="z-index: 2;">
<div class="mb-4 text-center">
<div class="d-inline-flex align-items-center gap-2 px-3 py-2 rounded-pill bg-success bg-opacity-10 text-success small fw-bold mb-3 border border-success border-opacity-10">
<i class="bi bi-check-circle-fill text-success"></i> ${isZh ? '匹配成功' : 'Matched Successfully'}
<i class="bi bi-check-circle-fill text-success"></i> ${translations.matched_success}
</div>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${isZh ? '专属充值账户已匹配成功' : 'Exclusive Account Matched'}</h2>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${translations.exclusive_matched}</h2>
<p class="text-muted fw-medium mb-0" style="font-size: 15px; line-height: 1.6;">
${isZh ? '系统已成功为您分配本次订单的专属收款账户。<br>请严格按照下方显示的账户信息及金额进行转账操作。<br>本账户仅限本次订单使用,请勿重复转账或向其他账户付款。' : 'The system has assigned an exclusive receiving account for this order.<br>Please strictly follow the account info and amount shown below for transfer.<br>This account is for this order only. Do not pay multiple times.'}
${translations.matched_desc}
</p>
</div>
<div class="mb-4 py-4 px-4 rounded-4 border border-light shadow-sm" style="background: #fff0f5;">
<div class="row align-items-center text-center">
<div class="col-12 mb-3">
<div class="text-muted small mb-1 fw-bold">${isZh ? '等待支付剩余时间' : 'Payment Time Remaining'}</div>
<div class="text-muted small mb-1 fw-bold">${translations.payment_time}</div>
<div class="display-5 fw-bold text-primary mb-0" id="modal-countdown" style="font-family: monospace; color: #ff4d94 !important;">30:00</div>
</div>
<div class="col-12 border-top border-white pt-3">
<div class="text-muted small mb-2 fw-bold">${isZh ? '当前状态:匹配成功,等待分配转账账户' : 'Status: Matched, waiting for account details'}</div>
<div class="text-muted small mb-2 fw-bold">${translations.current_status}${translations.matched_success}</div>
</div>
</div>
</div>
<div class="p-4 rounded-4 bg-light border border-light">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-lock-fill text-primary" style="color: #ff4d94 !important;"></i> ${isZh ? '温馨提示' : 'Safety Tips'}</h6>
<div class="mt-4"><button type="button" class="btn btn-primary w-100 rounded-pill py-2 fw-bold opacity-50" disabled style="background: #ff4d94 !important; border: none;">${isZh ? '等待客服发送账户...' : 'Waiting for Account Details...'}</button></div>
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-lock-fill text-primary" style="color: #ff4d94 !important;"></i> ${translations.safety_tips}</h6>
<div class="mt-4"><button type="button" class="btn btn-primary w-100 rounded-pill py-2 fw-bold opacity-50" disabled style="background: #ff4d94 !important; border: none;">${translations.waiting_details}</button></div>
</div>
</div>`;
} else if (status === 'account_sent' || status === '2') {
@ -697,64 +740,64 @@ function renderRechargeUI(data) {
side.innerHTML = `
<div class="text-center text-lg-start">
<div class="mb-4 text-center">
<div class="d-inline-flex align-items-center gap-2 px-3 py-1 rounded-pill bg-success bg-opacity-10 text-success small fw-bold mb-3 border border-success border-opacity-10"><i class="bi bi-check-circle-fill text-success"></i> ${isZh ? '账户已送达' : 'Account Received'}</div>
<h2 class="fw-bold text-dark mb-2" style="font-size: 1.8rem;">${isZh ? '转账操作说明' : 'Transfer Instructions'}</h2>
<div class="d-inline-flex align-items-center gap-2 px-3 py-1 rounded-pill bg-success bg-opacity-10 text-success small fw-bold mb-3 border border-success border-opacity-10"><i class="bi bi-check-circle-fill text-success"></i> ${translations.account_received}</div>
<h2 class="fw-bold text-dark mb-2" style="font-size: 1.8rem;">${translations.transfer_instr}</h2>
</div>
<div class="mb-3 p-4 rounded-4 shadow-sm border border-light" style="background: #fff0f5;">
<div class="d-flex flex-column gap-3">
<div class="payment-item">
<div class="text-muted small mb-1 fw-bold text-start">${isZh ? '收款银行' : 'Receiving Bank'}</div>
<div class="text-muted small mb-1 fw-bold text-start">${translations.bank}</div>
<div class="d-flex justify-content-between align-items-center gap-2">
<div class="h6 mb-0 fw-bold text-dark text-start" style="word-break: break-all; font-size: 1.1rem;">${bank}</div>
<button class="btn btn-sm rounded-pill px-3 fw-bold flex-shrink-0" style="font-size: 10px; background: #ff4d94; color: white;" onclick="copyText('${bank}')">${isZh ? '复制' : 'Copy'}</button>
<button class="btn btn-sm rounded-pill px-3 fw-bold flex-shrink-0" style="font-size: 10px; background: #ff4d94; color: white;" onclick="copyText('${bank}')">${translations.copy}</button>
</div>
</div>
<div class="payment-item border-top border-white border-opacity-50 pt-2">
<div class="text-muted small mb-1 fw-bold text-start">${isZh ? '收款账号' : 'Account Number'}</div>
<div class="text-muted small mb-1 fw-bold text-start">${translations.account}</div>
<div class="d-flex justify-content-between align-items-center gap-2">
<div class="h5 mb-0 fw-bold text-start" style="word-break: break-all; font-family: monospace; font-size: 1.3rem; color: #ff4d94;">${account}</div>
<button class="btn btn-sm rounded-pill px-3 fw-bold flex-shrink-0" style="font-size: 10px; background: #ff4d94; color: white;" onclick="copyText('${account}')">${isZh ? '复制' : 'Copy'}</button>
<button class="btn btn-sm rounded-pill px-3 fw-bold flex-shrink-0" style="font-size: 10px; background: #ff4d94; color: white;" onclick="copyText('${account}')">${translations.copy}</button>
</div>
</div>
<div class="payment-item border-top border-white border-opacity-50 pt-2">
<div class="text-muted small mb-1 fw-bold text-start">${isZh ? '收款姓名' : 'Receiver Name'}</div>
<div class="text-muted small mb-1 fw-bold text-start">${translations.name}</div>
<div class="d-flex justify-content-between align-items-center gap-2">
<div class="h6 mb-0 fw-bold text-dark text-start" style="word-break: break-all; font-size: 1.1rem;">${name}</div>
<button class="btn btn-sm rounded-pill px-3 fw-bold flex-shrink-0" style="font-size: 10px; background: #ff4d94; color: white;" onclick="copyText('${name}')">${isZh ? '复制' : 'Copy'}</button>
<button class="btn btn-sm rounded-pill px-3 fw-bold flex-shrink-0" style="font-size: 10px; background: #ff4d94; color: white;" onclick="copyText('${name}')">${translations.copy}</button>
</div>
</div>
</div>
</div>
<div class="p-4 rounded-4 bg-light border border-light text-start mb-3">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-info-circle-fill text-primary" style="color: #ff4d94 !important;"></i> ${isZh ? '操作须知' : 'Operating Instructions'}</h6>
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-info-circle-fill text-primary" style="color: #ff4d94 !important;"></i> ${translations.op_notes}</h6>
<div class="text-muted small lh-lg">
<p class="mb-2 fw-bold text-dark">${isZh ? '为确保资金顺利到账,请注意以下事项:' : 'To ensure successful deposit, please note:'}</p>
<div class="mb-1">1️⃣ ${isZh ? '请使用您本人实名账户进行转账。' : 'Use your own real-name account.'}</div>
<div class="mb-1">2️⃣ ${isZh ? '转账金额必须与订单金额完全一致,不可多转或少转。' : 'Amount must exactly match order amount.'}</div>
<div class="mb-1">3️⃣ ${isZh ? '请勿修改订单备注信息(如系统有指定备注,请严格填写)。' : 'Do not modify order remarks (if any).'}</div>
<div class="mb-2">4️⃣ ${isZh ? '转账完成后,请保留转账凭证需要提交凭证平台核查。' : 'Keep transfer receipt for verification.'}</div>
<p class="mb-0 mt-2 text-primary fw-bold">${isZh ? '系统将在收到银行到账后自动进行匹配确认。' : 'System will auto-confirm after bank arrival.'}</p>
<p class="mb-2 fw-bold text-dark">${translations.note_intro}</p>
<div class="mb-1">1️⃣ ${translations.note_1}</div>
<div class="mb-1">2️⃣ ${translations.note_2}</div>
<div class="mb-1">3️⃣ ${translations.note_3}</div>
<div class="mb-2">4️⃣ ${translations.note_4}</div>
<p class="mb-0 mt-2 text-primary fw-bold">${translations.note_footer}</p>
</div>
</div>
<button type="button" class="btn btn-primary w-100 rounded-pill py-3 fw-bold shadow-sm" onclick="finishTransfer()" style="background: #ff4d94 !important; border: none; color: white;">${isZh ? '【完成转账】' : '[Finish Transfer]'}</button>
<button type="button" class="btn btn-primary w-100 rounded-pill py-3 fw-bold shadow-sm" onclick="finishTransfer()" style="background: #ff4d94 !important; border: none; color: white;">${translations.finish_transfer}</button>
</div>`;
} else if (status === 'finished') {
side.innerHTML = `
<div class="text-center text-lg-start position-relative" style="z-index: 2;">
<div class="mb-4 text-center">
<div class="d-inline-flex align-items-center gap-2 px-3 py-2 rounded-pill bg-warning bg-opacity-10 text-warning small fw-bold mb-3 border border-warning border-opacity-10">
<span class="pulse-dot-pink"></span> <span style="letter-spacing: 1px;">${isZh ? '等待审核中' : 'Awaiting Review'}</span>
<span class="pulse-dot-pink"></span> <span style="letter-spacing: 1px;">${translations.awaiting_review}</span>
</div>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${isZh ? '已提交,等待审核' : 'Submitted, Awaiting Review'}</h2>
<p class="text-muted fw-medium mb-0" style="font-size: 15px;">${isZh ? '您的充值申请已成功提交,正在等待管理员核对资金。<br>审核通过后,资金将自动存入您的账户。<br>请耐心等待,通常需要 1-5 分钟。' : 'Your application is submitted. Waiting for admin to verify funds.<br>Funds will be deposited automatically after approval.<br>Please wait, usually takes 1-5 mins.'}</p>
<h2 class="fw-bold text-dark mb-3" style="font-size: 2rem;">${translations.submitted_awaiting}</h2>
<p class="text-muted fw-medium mb-0" style="font-size: 15px;">${translations.awaiting_desc}</p>
</div>
<div class="p-4 rounded-4 bg-light border border-light">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-lock-fill text-primary" style="color: #ff4d94 !important;"></i> ${isZh ? '温馨提示' : 'Safety Tips'}</h6>
<div class="p-4 rounded-4 bg-light border border-light text-start">
<h6 class="text-dark fw-bold mb-3 d-flex align-items-center gap-2"><i class="bi bi-shield-lock-fill text-primary" style="color: #ff4d94 !important;"></i> ${translations.safety_tips}</h6>
<div class="text-muted small lh-lg">
<div class="mb-2 d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${isZh ? '转账完成后,请务必保留转账截图凭证。' : 'Keep your transfer screenshot/receipt.'}</span></div>
<div class="d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${isZh ? '如有任何疑问,请联系在线客服咨询。' : 'Contact support for any questions.'}</span></div>
<div class="mb-2 d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${translations.save_screenshot}</span></div>
<div class="d-flex gap-2"><i class="bi bi-check2-circle text-primary" style="color: #ff4d94 !important;"></i> <span>${translations.contact_cs}</span></div>
</div>
<div class="mt-4"><button type="button" class="btn btn-secondary w-100 rounded-pill py-2 fw-bold" onclick="location.reload()">${isZh ? '确定并返回' : 'Confirm & Back'}</button></div>
<div class="mt-4"><button type="button" class="btn btn-secondary w-100 rounded-pill py-2 fw-bold" onclick="location.reload()">${translations.confirm_back}</button></div>
</div>
</div>`;
}

114
tos.php
View File

@ -5,31 +5,99 @@ require_once __DIR__ . '/includes/header.php';
<main class="container py-5">
<div class="row justify-content-center">
<div class="col-lg-10">
<h1 class="mb-5 fw-bold"><?php echo __('terms'); ?></h1>
<div class="card bg-surface border-secondary p-5">
<p class="text-white-50 mb-4"><?= __('effective_date') ?></p>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('tos_1_title') ?></h3>
<p class="text-white-50"><?= __('tos_1_content') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('tos_2_title') ?></h3>
<p class="text-white-50"><?= __('tos_2_content') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('tos_3_title') ?></h3>
<p class="text-white-50"><?= __('tos_3_content') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white"><?= __('tos_4_title') ?></h3>
<p class="text-white-50"><?= __('tos_4_content') ?></p>
</section>
<section>
<h3 class="fw-bold mb-3 text-white"><?= __('tos_5_title') ?></h3>
<p class="text-white-50"><?= __('tos_5_content') ?></p>
</section>
<div class="d-flex align-items-center gap-3 mb-5">
<div class="bg-primary rounded-3 p-2">
<i class="bi bi-file-earmark-text text-white fs-3"></i>
</div>
<h1 class="mb-0 fw-bold"><?php echo __('terms'); ?></h1>
</div>
<div class="card bg-surface border-secondary p-4 p-md-5 shadow-lg rounded-4">
<div class="alert bg-primary bg-opacity-10 border-0 rounded-3 mb-5 p-4">
<div class="d-flex gap-3">
<i class="bi bi-info-circle-fill text-primary fs-4"></i>
<div>
<h5 class="text-primary fw-bold mb-1"><?= __('effective_date') ?></h5>
<p class="text-white-50 small mb-0"><?= __('tos_intro') ?></p>
</div>
</div>
</div>
<div class="tos-content text-white-50">
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<span class="badge bg-primary me-2" style="font-size: 0.5em;">01</span>
<?= __('tos_1_title') ?>
</h3>
<p><?= __('tos_1_content') ?></p>
<p><?= __('tos_1_extra') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<span class="badge bg-primary me-2" style="font-size: 0.5em;">02</span>
<?= __('tos_2_title') ?>
</h3>
<p><?= __('tos_2_content') ?></p>
<p><?= __('tos_2_extra') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<span class="badge bg-primary me-2" style="font-size: 0.5em;">03</span>
<?= __('tos_3_title') ?>
</h3>
<p><?= __('tos_3_content') ?></p>
<p><?= __('tos_3_extra') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<span class="badge bg-primary me-2" style="font-size: 0.5em;">04</span>
<?= __('tos_4_title') ?>
</h3>
<div class="p-4 bg-danger bg-opacity-10 border-start border-4 border-danger rounded-3 mb-3">
<p class="text-danger fw-bold mb-2"><?= __('risk_warning') ?></p>
<p class="mb-0"><?= __('tos_4_content') ?></p>
</div>
<p><?= __('tos_4_extra') ?></p>
</section>
<section class="mb-5">
<h3 class="fw-bold mb-3 text-white d-flex align-items-center">
<span class="badge bg-primary me-2" style="font-size: 0.5em;">05</span>
<?= __('tos_5_title') ?>
</h3>
<p><?= __('tos_5_content') ?></p>
<p><?= __('tos_5_extra') ?></p>
</section>
<section class="mb-5 border-top border-secondary pt-5">
<h3 class="fw-bold mb-3 text-white"><?= __('tos_6_title') ?></h3>
<p><?= __('tos_6_content') ?></p>
</section>
<section class="mb-0">
<h3 class="fw-bold mb-3 text-white"><?= __('tos_7_title') ?></h3>
<p><?= __('tos_7_content') ?></p>
</section>
</div>
</div>
<div class="mt-5 text-center">
<p class="text-white-50 small"><?= __('tos_footer') ?> <a href="/support.php" class="text-primary text-decoration-none"><?= __('online_support') ?></a></p>
</div>
</div>
</div>
</main>
<style>
.tos-content section h3 {
letter-spacing: 0.5px;
}
.tos-content section p {
line-height: 1.8;
margin-bottom: 1.2rem;
}
</style>
<?php require_once __DIR__ . '/includes/footer.php'; ?>

View File

@ -65,7 +65,7 @@ $available = $bal['available'] ?? 0;
<div class="d-flex align-items-center gap-3 p-3 bg-dark border border-secondary rounded-4">
<img src="<?= getCoinIcon('USDT') ?>" width="32" height="32" alt="USDT" onerror="handleIconError(this, 'USDT')">
<div>
<div class="fw-bold text-white"><?= $lang === 'zh' ? __('USDT') : 'USDT' ?></div>
<div class="fw-bold text-white"><?= __('USDT') ?></div>
<div class="text-white-50 small"><?= __('tether') ?></div>
</div>
</div>