38283-vm/index.php
Flatlogic Bot f8cf4df9ce 商场
2026-02-08 08:38:12 +00:00

199 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
include 'includes/header.php';
// Fetch site settings (already in header, but ensuring db connection)
$db = db();
// Fetch hot products (Popular Recommendations) - 8 items
$hot_products = $db->query("SELECT p.*, c.name as category_name FROM products p JOIN categories c ON p.category_id = c.id WHERE p.is_hot = 1 LIMIT 8")->fetchAll();
// Function to fetch products by category ID with limit
function getProductsByCategory($db, $cat_id, $limit) {
$stmt = $db->prepare("SELECT p.*, c.name as category_name FROM products p JOIN categories c ON p.category_id = c.id WHERE p.category_id = :cat_id LIMIT :limit");
$stmt->bindValue(':cat_id', $cat_id, PDO::PARAM_INT);
$stmt->bindValue(':limit', $limit, PDO::PARAM_INT);
$stmt->execute();
return $stmt->fetchAll();
}
$social_accounts = getProductsByCategory($db, 1, 8);
$overseas_social = getProductsByCategory($db, 2, 8);
$ai_office = getProductsByCategory($db, 3, 4);
$email_tools = getProductsByCategory($db, 4, 4);
$categories = $db->query("SELECT * FROM categories")->fetchAll();
?>
<!-- Carousel Section within Container -->
<div id="heroCarousel" class="carousel slide carousel-fade mb-5 shadow-lg overflow-hidden border-0" data-bs-ride="carousel" style="border-radius: 1.5rem;">
<div class="carousel-indicators">
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="0" class="active" aria-current="true"></button>
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="1"></button>
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="2"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active" data-bs-interval="4000">
<div class="carousel-bg" style="background: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; padding: 100px 20px;">
<div class="position-absolute w-100 h-100" style="background: url('https://images.pexels.com/photos/1181244/pexels-photo-1181244.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') center/cover; opacity: 0.2;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-3 fw-bold text-dark mb-4">专业软件账号中心</h2>
<p class="fs-4 text-secondary mb-5 max-w-700 mx-auto">全球主流平台,即买即发,稳定质保。我们提供最优质的服务与最可靠的售后支撑。</p>
<div class="d-flex justify-content-center gap-3">
<a href="#market" class="btn btn-primary btn-lg px-5 py-3 rounded-pill shadow">立即探索</a>
<a href="faq.php" class="btn btn-outline-dark btn-lg px-5 py-3 rounded-pill">常见问题</a>
</div>
</div>
</div>
</div>
<div class="carousel-item" data-bs-interval="4000">
<div class="carousel-bg" style="background: linear-gradient(135deg, #e0f7fa 0%, #fff0f5 100%); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; padding: 100px 20px;">
<div class="position-absolute w-100 h-100" style="background: url('https://images.pexels.com/photos/546819/pexels-photo-546819.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') center/cover; opacity: 0.2;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-3 fw-bold text-dark mb-4">AI 办公提效神器</h2>
<p class="fs-4 text-secondary mb-5">ChatGPT, Midjourney 独享权限,开启智能时代。提升您的工作效率,抢占未来先机。</p>
<a href="category.php?id=3" class="btn btn-primary btn-lg px-5 py-3 rounded-pill shadow">立即升级</a>
</div>
</div>
</div>
<div class="carousel-item" data-bs-interval="4000">
<div class="carousel-bg" style="background: linear-gradient(135deg, #fffaf0 0%, #fff0f5 100%); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; padding: 100px 20px;">
<div class="position-absolute w-100 h-100" style="background: url('https://images.pexels.com/photos/3183150/pexels-photo-3183150.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') center/cover; opacity: 0.2;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-3 fw-bold text-dark mb-4">全自动 24H 交付</h2>
<p class="fs-4 text-secondary mb-5">下单后系统自动发货,卡密信息实时到达订单中心,无需人工干预,极速体验。</p>
<a href="orders.php" class="btn btn-primary btn-lg px-5 py-3 rounded-pill shadow">查询订单</a>
</div>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#heroCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon btn-dark rounded-circle" aria-hidden="true"></span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#heroCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon btn-dark rounded-circle" aria-hidden="true"></span>
</button>
</div>
<!-- Categories Quick Links -->
<div class="row g-3 mb-5">
<?php foreach ($categories as $cat): ?>
<div class="col-6 col-md">
<a href="category.php?id=<?php echo $cat['id']; ?>" class="text-decoration-none">
<div class="glass-card p-4 text-center h-100 category-hover-card bg-white shadow-sm border-0">
<i class="bi <?php echo $cat['icon'] ?: 'bi-grid-fill'; ?> display-5 mb-3 d-block" style="color: var(--primary-color);"></i>
<h5 class="text-dark mb-0 fw-bold"><?php echo $cat['name']; ?></h5>
</div>
</a>
</div>
<?php endforeach; ?>
</div>
<div id="market">
<!-- Hot Products Section (8 items) -->
<div class="mb-5">
<div class="d-flex justify-content-between align-items-end mb-4">
<div>
<h2 class="h1 mb-0 fw-bold text-dark"><i class="bi bi-fire text-danger me-2"></i>热门推荐</h2>
<p class="text-muted">当前最畅销的高质量软件账号</p>
</div>
<a href="search.php" class="btn btn-outline-primary rounded-pill px-4">查看全部</a>
</div>
<div class="row g-4">
<?php foreach ($hot_products as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<!-- Social Accounts (8 items) -->
<div class="mb-5">
<h3 class='text-dark mb-4 mt-5 d-flex align-items-center fw-bold'><span class='category-accent me-3'></span> 社交账号展示区</h3>
<div class="row g-4">
<?php foreach ($social_accounts as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<!-- Overseas Social (8 items) -->
<div class="mb-5">
<h3 class='text-dark mb-4 mt-5 d-flex align-items-center fw-bold'><span class='category-accent me-3'></span> 海外社交商品区</h3>
<div class="row g-4">
<?php foreach ($overseas_social as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<!-- AI Office (4 items) -->
<div class="mb-5">
<h3 class='text-dark mb-4 mt-5 d-flex align-items-center fw-bold'><span class='category-accent me-3'></span> AI 办公展示区</h3>
<div class="row g-4">
<?php foreach ($ai_office as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<!-- Email Tools (4 items) -->
<div class="mb-5">
<h3 class='text-dark mb-4 mt-5 d-flex align-items-center fw-bold'><span class='category-accent me-3'></span> 邮箱工具展示区</h3>
<div class="row g-4">
<?php foreach ($email_tools as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<!-- Trust Badges Section -->
<div class="row g-4 mt-5 pt-5 mb-5">
<div class="col-md-3">
<div class="text-center p-4">
<div class="bg-primary bg-opacity-10 rounded-circle d-inline-flex p-4 mb-3">
<i class="bi bi-lightning-charge fs-1 text-primary"></i>
</div>
<h4 class="text-dark fw-bold">秒速发货</h4>
<p class="text-muted small">系统自动处理订单,即买即用无需等待。</p>
</div>
</div>
<div class="col-md-3">
<div class="text-center p-4">
<div class="bg-success bg-opacity-10 rounded-circle d-inline-flex p-4 mb-3">
<i class="bi bi-shield-check fs-1 text-success"></i>
</div>
<h4 class="text-dark fw-bold">质量保障</h4>
<p class="text-muted small">所有账号均通过质保测试,安全稳定可靠。</p>
</div>
</div>
<div class="col-md-3">
<div class="text-center p-4">
<div class="bg-info bg-opacity-10 rounded-circle d-inline-flex p-4 mb-3">
<i class="bi bi-headset fs-1 text-info"></i>
</div>
<h4 class="text-dark fw-bold">优质售后</h4>
<p class="text-muted small">7x24小时专业客服团队为您排忧解难。</p>
</div>
</div>
<div class="col-md-3">
<div class="text-center p-4">
<div class="bg-warning bg-opacity-10 rounded-circle d-inline-flex p-4 mb-3">
<i class="bi bi-currency-bitcoin fs-1 text-warning"></i>
</div>
<h4 class="text-dark fw-bold">USDT 支付</h4>
<p class="text-muted small">支持主流加密货币支付,隐私安全有保障。</p>
</div>
</div>
</div>
<?php include 'includes/footer.php'; ?>