38993-vm/index.php
2026-03-05 07:57:07 +00:00

122 lines
5.0 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/app.php';
// Mock translation data for the landing page structure
// In a real app, these would be loaded from a config or database
$translations = [
'en' => [
'site_name' => 'GoldExchange Global',
'nav_home' => 'Home',
'nav_market' => 'Market',
'nav_kyc' => 'Trading Account',
'nav_dashboard' => 'Dashboard',
'nav_admin' => 'Admin',
'hero_title' => 'Professional Gold Trading Platform',
'hero_subtitle' => 'Secure, liquid, and accessible gold trading solutions for institutional and retail investors.',
'cta_start' => 'Start Trading',
'market_title' => 'Live Gold Price',
'features_title' => 'Why Choose Us',
'feature1' => 'Institutional Grade Security',
'feature2' => 'Deep Liquidity Pool',
'feature3' => '24/7 Global Trading'
],
'zh' => [
'site_name' => '全球黄金交易所',
'nav_home' => '首页',
'nav_market' => '市场行情',
'nav_kyc' => '交易账户',
'nav_dashboard' => '仪表盘',
'nav_admin' => '管理后台',
'hero_title' => '专业黄金交易平台',
'hero_subtitle' => '为机构及零售投资者提供安全、高流动性且便捷的黄金交易服务。',
'cta_start' => '立即交易',
'market_title' => '黄金实时行情',
'features_title' => '为什么选择我们',
'feature1' => '机构级安全保障',
'feature2' => '深厚流动性池',
'feature3' => '7x24 全球交易'
]
];
function t_custom($key) {
global $lang, $translations;
return $translations[$lang][$key] ?? $key;
}
?>
<!doctype html>
<html lang="<?= h($lang) ?>">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?= h(t_custom('site_name')) ?></title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?= h((string) time()) ?>">
</head>
<body>
<!-- Header -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand fw-bold text-warning" href="index.php"><?= h(t_custom('site_name')) ?></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navMain">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navMain">
<ul class="navbar-nav ms-auto gap-3">
<li class="nav-item"><a class="nav-link" href="index.php"><?= h(t_custom('nav_home')) ?></a></li>
<li class="nav-item"><a class="nav-link" href="#"><?= h(t_custom('nav_market')) ?></a></li>
<li class="nav-item"><a class="nav-link" href="kyc.php"><?= h(t_custom('nav_kyc')) ?></a></li>
<li class="nav-item"><a class="nav-link" href="admin_kyc_list.php"><?= h(t_custom('nav_admin')) ?></a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown"><?= $lang === 'zh' ? '中文' : 'EN' ?></a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="?lang=zh">中文</a></li>
<li><a class="dropdown-item" href="?lang=en">English</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!-- Hero Section -->
<section class="py-5 bg-dark text-white">
<div class="container text-center py-5">
<h1 class="display-4 fw-bold"><?= h(t_custom('hero_title')) ?></h1>
<p class="lead mb-4 text-secondary"><?= h(t_custom('hero_subtitle')) ?></p>
<a href="kyc.php" class="btn btn-warning btn-lg px-4"><?= h(t_custom('cta_start')) ?></a>
</div>
</section>
<!-- Main Content -->
<main class="container my-5">
<div class="row g-4">
<div class="col-md-8">
<div class="section-card">
<h3><?= h(t_custom('market_title')) ?></h3>
<div class="p-4 bg-light rounded text-center">
<h2 class="display-5 fw-bold text-primary">$2,650.00 <span class="text-success fs-5">+1.2%</span></h2>
</div>
</div>
</div>
<div class="col-md-4">
<div class="section-card">
<h3><?= h(t_custom('features_title')) ?></h3>
<ul class="list-unstyled mt-3">
<li class="mb-2">✅ <?= h(t_custom('feature1')) ?></li>
<li class="mb-2">✅ <?= h(t_custom('feature2')) ?></li>
<li class="mb-2">✅ <?= h(t_custom('feature3')) ?></li>
</ul>
</div>
</div>
</div>
</main>
<footer class="text-center py-4 text-muted border-top">
<div class="container">© <?= date('Y') ?> <?= h(t_custom('site_name')) ?>. All Rights Reserved.</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>