This commit is contained in:
Flatlogic Bot 2026-02-08 11:51:31 +00:00
parent febd704292
commit 27341ce40d
16 changed files with 837 additions and 383 deletions

View File

@ -8,31 +8,50 @@ if (!isset($_SESSION['admin_logged_in'])) {
}
$message = '';
$db = db();
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$db = db();
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_settings'])) {
foreach ($_POST['settings'] as $key => $value) {
$stmt = $db->prepare("UPDATE settings SET key_value = ? WHERE key_name = ?");
$stmt->execute([$value, $key]);
}
$message = '设置已更新';
$message = '设置已成功更新';
}
$settings = db()->query("SELECT * FROM settings")->fetchAll();
$settings_raw = $db->query("SELECT * FROM settings ORDER BY id ASC")->fetchAll();
$settings = [];
foreach ($settings_raw as $s) {
$settings[$s['key_name']] = $s;
}
// Group settings for better UI
$groups = [
'基础信息' => ['site_name', 'site_logo', 'site_description', 'footer_text', 'notice', 'tg_channel'],
'外观样式 (PC端)' => ['primary_color', 'accent_color'],
'外观样式 (手机端)' => ['mobile_primary_color', 'mobile_accent_color'],
'支付与联系' => ['usdt_address', 'qr_code_custom', 'tg_link'],
'API 与 通知' => ['tg_bot_token', 'tg_chat_id']
];
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>系统设置 - 管理后台</title>
<title>系统全域设置 - 管理后台</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
<style>
body { background-color: #f8f9fa; }
.sidebar { min-height: 100vh; background: #212529; color: white; }
.sidebar a { color: rgba(255,255,255,0.8); text-decoration: none; padding: 10px 20px; display: block; }
.sidebar a:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar a.active { background: #0d6efd; color: white; }
body { background-color: #f0f2f5; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.sidebar { min-height: 100vh; background: #1a1d20; color: white; }
.sidebar a { color: rgba(255,255,255,0.7); text-decoration: none; padding: 12px 25px; display: block; transition: all 0.3s; border-left: 4px solid transparent; }
.sidebar a:hover { background: rgba(255,255,255,0.05); color: white; border-left-color: #0d6efd; }
.sidebar a.active { background: rgba(13, 110, 253, 0.1); color: #0d6efd; border-left-color: #0d6efd; font-weight: bold; }
.card { border: none; border-radius: 12px; margin-bottom: 2rem; }
.group-title { border-bottom: 2px solid #0d6efd; padding-bottom: 8px; margin-bottom: 20px; color: #1a1d20; font-weight: 800; display: inline-block; }
.form-label { color: #4b5563; font-size: 0.9rem; margin-bottom: 8px; }
.preview-logo { max-height: 50px; background: #eee; padding: 5px; border-radius: 5px; }
.color-input-wrapper { display: flex; align-items: center; gap: 10px; }
.color-preview { width: 30px; height: 30px; border-radius: 5px; border: 1px solid #ddd; }
</style>
</head>
<body>
@ -41,32 +60,70 @@ $settings = db()->query("SELECT * FROM settings")->fetchAll();
<div class="col-md-2 p-0 sidebar">
<?php include 'sidebar.php'; ?>
</div>
<div class="col-md-10 p-4">
<h2 class="mb-4">系统设置</h2>
<div class="col-md-10 p-4 p-lg-5">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2 class="fw-bold"><i class="bi bi-sliders2-vertical me-2 text-primary"></i> 全域系统配置</h2>
<div class="text-muted">您可以从这里全面掌控前端展示效果</div>
</div>
<?php if ($message): ?>
<div class="alert alert-success"><?php echo $message; ?></div>
<div class="alert alert-success alert-dismissible fade show shadow-sm border-0" role="alert">
<i class="bi bi-check-circle-fill me-2"></i> <?php echo $message; ?>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<?php endif; ?>
<div class="card shadow-sm">
<div class="card-body">
<form method="POST">
<?php foreach ($settings as $s): ?>
<div class="mb-4">
<label class="form-label fw-bold"><?php echo $s['description']; ?> (<?php echo $s['key_name']; ?>)</label>
<?php if ($s['key_name'] === 'notice'): ?>
<textarea name="settings[<?php echo $s['key_name']; ?>]" class="form-control" rows="3"><?php echo htmlspecialchars($s['key_value']); ?></textarea>
<?php else: ?>
<input type="text" name="settings[<?php echo $s['key_name']; ?>]" class="form-control" value="<?php echo htmlspecialchars($s['key_value']); ?>">
<?php endif; ?>
<form method="POST">
<input type="hidden" name="update_settings" value="1">
<?php foreach ($groups as $group_name => $keys): ?>
<div class="card shadow-sm">
<div class="card-body p-4">
<h5 class="group-title"><?php echo $group_name; ?></h5>
<div class="row">
<?php foreach ($keys as $key): ?>
<?php if (!isset($settings[$key])) continue;
$s = $settings[$key];
?>
<div class="col-md-6 mb-4">
<label class="form-label fw-bold d-flex justify-content-between">
<span><?php echo $s['description']; ?></span>
<code class="text-muted small"><?php echo $key; ?></code>
</label>
<?php if ($key === 'notice' || $key === 'site_description'): ?>
<textarea name="settings[<?php echo $key; ?>]" class="form-control border-light-subtle shadow-sm" rows="3"><?php echo htmlspecialchars($s['key_value']); ?></textarea>
<?php elseif (strpos($key, 'color') !== false): ?>
<div class="color-input-wrapper">
<input type="color" class="form-control-color border-0" value="<?php echo htmlspecialchars($s['key_value']); ?>" oninput="this.nextElementSibling.value = this.value">
<input type="text" name="settings[<?php echo $key; ?>]" class="form-control border-light-subtle shadow-sm" value="<?php echo htmlspecialchars($s['key_value']); ?>">
</div>
<?php elseif ($key === 'site_logo'): ?>
<div class="d-flex align-items-center gap-3">
<input type="text" name="settings[<?php echo $key; ?>]" class="form-control border-light-subtle shadow-sm" value="<?php echo htmlspecialchars($s['key_value']); ?>" oninput="this.nextElementSibling.src = this.value">
<img src="<?php echo htmlspecialchars($s['key_value']); ?>" class="preview-logo" onerror="this.src='../assets/pasted-20260208-082111-302e08e2.png'">
</div>
<?php else: ?>
<input type="text" name="settings[<?php echo $key; ?>]" class="form-control border-light-subtle shadow-sm" value="<?php echo htmlspecialchars($s['key_value']); ?>">
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
<button type="submit" class="btn btn-primary px-5">保存设置</button>
</form>
</div>
</div>
</div>
<?php endforeach; ?>
<div class="sticky-bottom bg-white p-3 shadow rounded-4 text-center mb-5 border border-primary border-opacity-10">
<button type="submit" class="btn btn-primary btn-lg px-5 shadow fw-bold">
<i class="bi bi-cloud-arrow-up-fill me-2"></i> 保存并生效所有修改
</button>
<p class="text-muted small mt-2 mb-0">所有更改将实时反映在 PC 端和手机端前端页面上。</p>
</div>
</form>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

View File

@ -1,15 +1,26 @@
<?php
// Fetch site settings for sidebar
try {
$stmt = db()->query("SELECT key_name, key_value FROM settings WHERE key_name IN ('site_name', 'site_logo')");
$sidebar_settings = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
} catch (Exception $e) {
$sidebar_settings = [];
}
$s_name = $sidebar_settings['site_name'] ?? '豪软后台';
$s_logo = $sidebar_settings['site_logo'] ?? '../assets/pasted-20260208-082111-302e08e2.png';
?>
<div class="py-4 text-center">
<div class="d-flex align-items-center justify-content-center mb-2">
<img src="../assets/pasted-20260208-082111-302e08e2.png" alt="Logo" style="height: 30px; width: auto; border-radius: 4px; margin-right: 8px;">
<h5 class="mb-0 text-dark fw-bold">豪软后台</h5>
<div class="d-flex align-items-center justify-content-center mb-2 px-3">
<img src="<?php echo $s_logo; ?>" alt="Logo" style="height: 30px; width: auto; border-radius: 4px; margin-right: 8px;">
<h5 class="mb-0 text-white fw-bold text-truncate"><?php echo $s_name; ?></h5>
</div>
</div>
<nav class="mt-3">
<style>
.sidebar a { color: #334155; }
.sidebar a.active { background: #ff3399 !important; color: white !important; }
.sidebar a:hover { background: rgba(255, 51, 153, 0.1); }
.sidebar hr { border-color: rgba(0,0,0,0.1); }
.sidebar a { color: rgba(255,255,255,0.7); }
.sidebar a.active { background: #0d6efd !important; color: white !important; }
.sidebar a:hover { background: rgba(255, 255, 255, 0.1); color: white; }
.sidebar hr { border-color: rgba(255,255,255,0.1); }
</style>
<a href="index.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'index.php' ? 'active' : ''; ?>">
<i class="bi bi-speedometer2 me-2"></i> 仪表盘

View File

@ -1,12 +1,14 @@
:root {
--primary-color: #ff3399;
--primary-color: #ff3399; /* Default pink */
--secondary-color: #ff66b2;
--accent-color: #0088cc;
--bg-light: #fff5f7;
--card-bg: #ffffff;
--glass-border: rgba(255, 51, 153, 0.1);
--text-dark: #334155;
--text-muted: #64748b;
--text-dark: #1a202c;
--text-muted: #4a5568;
--mobile-primary: #e1251b;
--mobile-accent: #ff9900;
}
body {
@ -17,6 +19,7 @@ body {
radial-gradient(at 0% 0%, rgba(255, 0, 122, 0.05) 0px, transparent 50%),
radial-gradient(at 100% 100%, rgba(255, 51, 153, 0.05) 0px, transparent 50%);
background-attachment: fixed;
margin-bottom: 0;
}
.glass-card {
@ -55,7 +58,7 @@ body {
.btn-primary {
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
border: none;
color: white;
color: white !important;
font-weight: 700;
}
@ -100,7 +103,7 @@ body {
top: 10px;
right: 10px;
background: var(--primary-color);
color: white;
color: white !important;
font-size: 0.7rem;
font-weight: 800;
padding: 4px 8px;
@ -129,40 +132,124 @@ body {
/* Carousel Custom Styles */
.carousel-inner {
height: 600px !important;
border-radius: 1.5rem;
height: 500px !important;
border-radius: 1rem; /* Slightly reduced for better fill */
}
@media (max-width: 768px) {
.carousel-inner {
height: 250px !important; /* Slightly taller for mobile */
}
}
.carousel-section {
margin-top: 60px; /* Increased to move down further as requested */
padding: 0; /* Remove side padding to fill the area fully */
}
.carousel-item {
transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
height: 100% !important;
transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}
.carousel-bg {
padding-top: 50px;
padding-bottom: 50px;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
padding: 40px 20px;
}
.category-hover-card {
cursor: pointer;
/* Personalised Carousel Fonts */
.carousel-title {
font-family: 'Inter', sans-serif;
font-weight: 800;
text-shadow: 0 2px 10px rgba(0,0,0,0.1);
color: #1a1a1a !important;
margin-top: 20px;
}
.category-hover-card:hover {
background: rgba(255, 51, 153, 0.05) !important;
border-color: var(--primary-color);
}
.category-accent {
width: 4px;
height: 24px;
background: var(--primary-color);
border-radius: 2px;
.carousel-subtitle {
font-weight: 500;
color: #4a4a4a !important;
background: rgba(255,255,255,0.85);
display: inline-block;
padding: 6px 20px;
border-radius: 20px;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.hover-primary:hover {
/* Category Improvements */
.category-item {
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.category-item:hover {
transform: translateY(-8px);
}
.category-icon-wrapper {
width: 60px;
height: 60px;
background: linear-gradient(135deg, #ffffff 0%, #fff0f5 100%);
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 10px;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
border: 1px solid rgba(255, 51, 153, 0.1);
}
.category-item:hover .category-icon-wrapper {
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
color: white !important;
box-shadow: 0 10px 25px rgba(255, 51, 153, 0.2);
border-color: transparent;
}
.category-item:hover .category-icon-wrapper i {
color: white !important;
transform: scale(1.1);
}
.category-icon-wrapper i {
font-size: 1.5rem;
color: var(--primary-color);
z-index: 1;
transition: all 0.3s ease;
}
.category-name {
font-size: 0.85rem;
font-weight: 700;
color: #1a202c !important; /* Fixed contrast */
}
/* Contrast Fixes */
.text-dark { color: #1a202c !important; }
.text-secondary { color: #2d3748 !important; }
.text-muted { color: #4a5568 !important; }
/* Ensure text on white/light backgrounds is visible */
.bg-light .text-muted { color: #4a5568 !important; }
/* Accordion Specific Contrast */
.accordion-button:not(.collapsed) {
background-color: rgba(255, 51, 153, 0.05) !important;
color: var(--primary-color) !important;
}
.accordion-button:after {
filter: brightness(0.5);
}
.floating-tg {
position: fixed;
bottom: 30px;
@ -182,6 +269,27 @@ body {
text-decoration: none;
}
@media (max-width: 768px) {
.floating-tg {
bottom: 80px;
right: 20px;
width: 50px;
height: 50px;
font-size: 24px;
}
.carousel-section {
margin-top: 30px;
padding: 0;
}
.category-icon-wrapper {
width: 55px;
height: 55px;
border-radius: 18px;
}
}
.floating-tg:hover {
transform: scale(1.1) rotate(10deg);
color: white;
@ -197,7 +305,7 @@ body {
.announcement-content {
display: inline-block;
padding-left: 100%;
animation: marquee 20s linear infinite;
animation: marquee 25s linear infinite;
}
@keyframes marquee {
@ -205,18 +313,149 @@ body {
100% { transform: translate(-100%, 0); }
}
.announcement-container:hover .announcement-content {
animation-play-state: paused;
}
/* --- MOBILE JD/TAOBAO STYLE --- */
@media (max-width: 768px) {
:root {
--primary-color: var(--mobile-primary);
--accent-color: var(--mobile-accent);
--bg-light: #f4f4f4;
}
.alert.glass-card {
background: white;
color: var(--text-dark) !important;
}
body {
background-image: none;
padding-bottom: 60px;
}
.text-white {
color: var(--text-dark) !important;
}
.text-white-50 {
color: var(--text-muted) !important;
.pc-only { display: none !important; }
.navbar {
background: var(--primary-color);
padding: 10px 15px !important;
}
.navbar-brand {
color: #ffffff !important;
}
.mobile-search-bar {
background: #ffffff;
border-radius: 20px;
padding: 5px 15px;
display: flex;
align-items: center;
margin-top: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.mobile-search-bar input {
border: none;
outline: none;
width: 100%;
margin-left: 10px;
font-size: 0.9rem;
}
/* Bottom Navigation */
.mobile-bottom-nav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #ffffff;
display: flex;
justify-content: space-around;
padding: 8px 0;
box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
z-index: 1050;
}
.mobile-nav-item {
text-align: center;
color: #666;
text-decoration: none;
font-size: 0.7rem;
display: flex;
flex-direction: column;
align-items: center;
}
.mobile-nav-item i {
font-size: 1.4rem;
margin-bottom: 2px;
}
.mobile-nav-item.active {
color: var(--primary-color);
}
/* Product Grid Taobao Style */
.product-grid-mobile {
display: flex;
flex-wrap: wrap;
padding: 5px;
}
.product-item-mobile {
width: 50%;
padding: 5px;
}
.product-card-mobile {
background: #fff;
border-radius: 8px;
overflow: hidden;
height: 100%;
display: flex;
flex-direction: column;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.product-img-mobile {
width: 100%;
aspect-ratio: 1/1;
object-fit: contain;
background: #f8f8f8;
padding: 10px;
}
.product-info-mobile {
padding: 8px;
display: flex;
flex-direction: column;
flex-grow: 1;
}
.product-title-mobile {
font-size: 0.85rem;
color: #333;
margin-bottom: 5px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
height: 2.4rem;
line-height: 1.2rem;
}
.product-price-mobile {
color: var(--primary-color);
font-weight: bold;
font-size: 1.1rem;
margin-top: auto;
}
.product-tag-mobile {
background: var(--primary-color);
color: #fff;
font-size: 0.6rem;
padding: 1px 4px;
border-radius: 3px;
margin-right: 4px;
}
/* Buttons */
.btn-primary {
background: var(--primary-color);
border-radius: 20px;
}
}

View File

@ -17,8 +17,9 @@ function addToCart(id, name, price, img) {
function updateCartBadge() {
let cart = JSON.parse(localStorage.getItem('cart') || '[]');
let count = cart.reduce((acc, item) => acc + item.qty, 0);
let badge = document.getElementById('cart-badge');
// Update PC Badge
let badge = document.getElementById('cart-badge');
if (badge) {
if (count > 0) {
badge.textContent = count;
@ -27,6 +28,17 @@ function updateCartBadge() {
badge.classList.add('d-none');
}
}
// Update Mobile Badge
let mobileBadge = document.getElementById('cart-badge-mobile');
if (mobileBadge) {
if (count > 0) {
mobileBadge.textContent = count;
mobileBadge.classList.remove('d-none');
} else {
mobileBadge.classList.add('d-none');
}
}
}
// Toast Notification

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

View File

@ -1,9 +1,18 @@
<?php
$page_title = '提交订单 - 豪软世界';
ob_start(); // Prevent headers already sent
$page_title = '提交订单';
require_once 'includes/header.php';
// Handle direct purchase from product.php
$direct_id = $_GET['direct_id'] ?? null;
$direct_product = null;
if ($direct_id) {
$stmt = db()->prepare("SELECT * FROM products WHERE id = ?");
$stmt->execute([$direct_id]);
$direct_product = $stmt->fetch();
}
$redirect_url = '';
// Handle POST request to create order
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
@ -11,78 +20,83 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$payment_method = $_POST['payment_method'] ?? 'USDT (TRC20)';
$cart_data = json_decode($_POST['cart_data'], true);
if (empty($cart_data)) {
header("Location: cart.php");
if (!empty($cart_data)) {
// Calculate total
$total = 0;
foreach ($cart_data as $item) {
$total += $item['price'] * $item['qty'];
}
// Generate order number
$order_no = 'HR' . date('YmdHis') . rand(100, 999);
// Create order
$stmt = $db->prepare("INSERT INTO orders (order_no, total_amount, payment_method, contact_info, status) VALUES (?, ?, ?, '', 'pending')");
$stmt->execute([$order_no, $total, $payment_method]);
$order_id = $db->lastInsertId();
// Create order items
foreach ($cart_data as $item) {
$stmt = $db->prepare("INSERT INTO order_items (order_id, product_id, quantity, price_usdt) VALUES (?, ?, ?, ?)");
$stmt->execute([$order_id, $item['id'], $item['qty'], $item['price']]);
}
// Send Telegram notification
if (function_exists('sendTelegramMessage')) {
$msg = "🔔 *New Order Created*\n\n";
$msg .= "Order No: `{$order_no}`\n";
$msg .= "Total Amount: `{$total} USDT`\n";
$msg .= "Status: Pending Payment";
sendTelegramMessage($msg);
}
$redirect_url = "payment.php?order_no=" . $order_no;
header("Location: " . $redirect_url);
exit;
}
// Calculate total
$total = 0;
foreach ($cart_data as $item) {
$total += $item['price'] * $item['qty'];
}
// Generate order number
$order_no = 'HR' . date('YmdHis') . rand(100, 999);
// Create order - contact_info is now optional or empty
$stmt = $db->prepare("INSERT INTO orders (order_no, total_amount, payment_method, contact_info, status) VALUES (?, ?, ?, '', 'pending')");
$stmt->execute([$order_no, $total, $payment_method]);
$order_id = $db->lastInsertId();
// Create order items
foreach ($cart_data as $item) {
$stmt = $db->prepare("INSERT INTO order_items (order_id, product_id, quantity, price_usdt) VALUES (?, ?, ?, ?)");
$stmt->execute([$order_id, $item['id'], $item['qty'], $item['price']]);
}
// Redirect to payment
header("Location: payment.php?order_no=" . $order_no);
exit;
}
?>
<main class="py-5">
<main class="py-3 py-lg-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="glass-card p-5 bg-white shadow-sm">
<h2 class="fw-bold text-dark mb-4"><i class="bi bi-file-earmark-text text-primary me-2"></i> 确认订单信息</h2>
<p class="text-muted mb-5">请核对您的订单商品,确认无误后点击下方按钮进入支付页面。</p>
<div class="col-lg-6 p-2 p-lg-0">
<div class="glass-card p-4 p-lg-5 bg-white shadow-sm">
<h4 class="fw-bold text-dark mb-4"><i class="bi bi-file-earmark-text text-primary me-2"></i> 确认订单信息</h4>
<form id="checkout-form" method="POST">
<input type="hidden" name="cart_data" id="cart-data-input">
<div class="mb-5">
<label class="form-label text-dark fw-bold">支付方式</label>
<div class="row g-3">
<div class="mb-4">
<label class="form-label text-dark fw-bold small">支付方式</label>
<div class="row g-2">
<div class="col-12">
<div class="payment-option p-4 rounded-4 border border-primary bg-primary bg-opacity-10 d-flex align-items-center gap-3">
<i class="bi bi-currency-bitcoin fs-2 text-primary"></i>
<div class="payment-option p-3 rounded-4 border border-primary bg-primary bg-opacity-10 d-flex align-items-center gap-3">
<i class="bi bi-currency-bitcoin fs-3 text-primary"></i>
<div>
<div class="text-dark fw-bold fs-5">USDT (TRC20)</div>
<div class="text-muted small">推荐使用,区块链自动确认</div>
<div class="text-dark fw-bold">USDT (TRC20)</div>
<div class="text-muted small" style="font-size: 0.7rem;">推荐使用,区块链自动确认</div>
</div>
<i class="bi bi-check-circle-fill ms-auto text-primary fs-4"></i>
<i class="bi bi-check-circle-fill ms-auto text-primary fs-5"></i>
</div>
<input type="hidden" name="payment_method" value="USDT (TRC20)">
</div>
</div>
</div>
<div class="order-summary-box mb-5 p-4 bg-light rounded-4">
<h6 class="text-dark fw-bold mb-4">订单详情</h6>
<div class="order-summary-box mb-4 p-3 bg-light rounded-4">
<h6 class="text-dark fw-bold mb-3 small">订单详情</h6>
<div id="checkout-items-list">
<!-- JS Populated -->
</div>
<hr class="my-4">
<hr class="my-3">
<div class="d-flex justify-content-between align-items-center">
<span class="text-dark fw-bold">应付总额</span>
<span class="fs-2 fw-bold text-primary" id="checkout-total">0.00 USDT</span>
<span class="text-dark fw-bold small">应付总额</span>
<span class="fs-4 fw-bold text-primary" id="checkout-total">0.00 USDT</span>
</div>
</div>
<button type="submit" class="btn btn-primary btn-lg w-100 py-3 rounded-pill shadow-lg fw-bold">
<button type="submit" id="submit-btn" class="btn btn-primary btn-lg w-100 py-3 rounded-pill shadow-lg fw-bold">
确认下单并去支付 <i class="bi bi-arrow-right ms-2"></i>
</button>
</form>
@ -94,14 +108,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<script>
document.addEventListener('DOMContentLoaded', function() {
<?php if ($redirect_url): ?>
window.location.href = '<?php echo $redirect_url; ?>';
return;
<?php endif; ?>
let cart = JSON.parse(localStorage.getItem('cart') || '[]');
// If direct purchase from product.php
<?php if ($direct_id): ?>
// If coming from direct_id, we might want to override cart for this session or just add it
// For simplicity, let's assume the user already clicked "Add to Cart" or we fetch product details
// In this app, we'll fetch from the DOM or just rely on the cart if addToCart was called.
// If cart is empty, we should probably handle it.
<?php if ($direct_product): ?>
if (cart.length === 0) {
cart = [{
id: <?php echo $direct_product['id']; ?>,
name: "<?php echo addslashes($direct_product['name']); ?>",
price: <?php echo $direct_product['price_usdt']; ?>,
image: "<?php echo $direct_product['image_url']; ?>",
qty: 1
}];
}
<?php endif; ?>
if (cart.length === 0) {
@ -117,20 +140,26 @@ document.addEventListener('DOMContentLoaded', function() {
const subtotal = item.price * item.qty;
total += subtotal;
html += `
<div class="d-flex justify-content-between text-muted mb-3 fs-6">
<span>${item.name} <span class="badge bg-secondary bg-opacity-10 text-secondary ms-2">x${item.qty}</span></span>
<span class="text-dark fw-bold">${subtotal.toFixed(2)} USDT</span>
<div class="d-flex justify-content-between text-muted mb-2 small">
<span class="text-truncate me-2" style="max-width: 70%; text-align: left;">${item.name} x${item.qty}</span>
<span class="text-dark fw-bold">${subtotal.toFixed(2)}</span>
</div>
`;
});
document.getElementById('checkout-items-list').innerHTML = html;
document.getElementById('checkout-total').textContent = total.toFixed(2) + ' USDT';
// Handle button state on click
document.getElementById('checkout-form').addEventListener('submit', function() {
const btn = document.getElementById('submit-btn');
btn.disabled = true;
btn.innerHTML = '<span class="spinner-border spinner-border-sm me-2"></span> 正在创建订单...';
});
});
</script>
<style>
.payment-option { border-width: 2px !important; }
</style>
<?php require_once 'includes/footer.php'; ?>
<?php
require_once 'includes/footer.php';
ob_end_flush();
?>

View File

@ -15,3 +15,41 @@ function db() {
}
return $pdo;
}
/**
* Send message to Telegram Bot
*/
function sendTelegramMessage($message) {
$db = db();
try {
$stmt = $db->query("SELECT key_name, key_value FROM settings WHERE key_name IN ('tg_bot_token', 'tg_chat_id')");
$settings = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
$token = $settings['tg_bot_token'] ?? '';
$chat_id = $settings['tg_chat_id'] ?? '';
if (empty($token) || empty($chat_id)) {
return false;
}
$url = "https://api.telegram.org/bot{$token}/sendMessage";
$data = [
'chat_id' => $chat_id,
'text' => $message,
'parse_mode' => 'Markdown'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$response = curl_exec($ch);
curl_close($ch);
return $response;
} catch (Exception $e) {
return false;
}
}

View File

@ -0,0 +1,9 @@
-- Add missing settings keys
INSERT IGNORE INTO settings (key_name, key_value, description) VALUES
('tg_bot_token', '', 'Telegram机器人Token'),
('tg_chat_id', '', 'Telegram接收通知ID'),
('usdt_address', 'Txxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'USDT收款地址(TRC20)'),
('qr_code_custom', '', '自定义收款二维码URL (留空则自动生成)'),
('tg_channel', '', '官方频道链接'),
('site_logo', 'assets/pasted-20260208-082111-302e08e2.png', '网站Logo路径'),
('site_name', '豪软世界', '网站名称');

14
faq.php
View File

@ -5,7 +5,7 @@ include 'includes/header.php';
<div class="row justify-content-center">
<div class="col-lg-10">
<div class="text-center mb-5">
<h1 class="display-3 fw-bold">常见问题</h1>
<h1 class="display-3 fw-bold text-dark">常见问题</h1>
<p class="text-muted fs-5">您可能遇到的一些疑问,我们在这里为您解答</p>
</div>
@ -14,7 +14,7 @@ include 'includes/header.php';
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
<h2 class="accordion-header">
<button class="accordion-button collapsed bg-transparent text-white fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq1">
<button class="accordion-button collapsed bg-transparent text-dark fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq1">
付款后在哪里查看卡密?
</button>
</h2>
@ -27,7 +27,7 @@ include 'includes/header.php';
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
<h2 class="accordion-header">
<button class="accordion-button collapsed bg-transparent text-white fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq2">
<button class="accordion-button collapsed bg-transparent text-dark fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq2">
为什么我支付了却没有发货?
</button>
</h2>
@ -40,7 +40,7 @@ include 'includes/header.php';
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
<h2 class="accordion-header">
<button class="accordion-button collapsed bg-transparent text-white fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq3">
<button class="accordion-button collapsed bg-transparent text-dark fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq3">
账号登录不上怎么办?
</button>
</h2>
@ -53,7 +53,7 @@ include 'includes/header.php';
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
<h2 class="accordion-header">
<button class="accordion-button collapsed bg-transparent text-white fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq4">
<button class="accordion-button collapsed bg-transparent text-dark fs-4 fw-semibold" type="button" data-bs-toggle="collapse" data-bs-target="#faq4">
可以定制大批量的账号吗?
</button>
</h2>
@ -66,8 +66,8 @@ include 'includes/header.php';
</div>
<div class="mt-5 text-center p-4 rounded-4" style="background: rgba(0, 242, 255, 0.05);">
<p class="text-white mb-4 fs-5">没找到您要的答案?</p>
<div class="mt-5 text-center p-4 rounded-4" style="background: rgba(255, 51, 153, 0.05);">
<p class="text-dark mb-4 fs-5">没找到您要的答案?</p>
<a href="<?php echo $settings['tg_support'] ?? '#'; ?>" class="btn btn-primary px-5 py-3 rounded-pill">咨询在线客服</a>
</div>
</div>

View File

@ -1,18 +1,19 @@
<?php
$footer_text = $settings['footer_text'] ?? ('&copy; ' . date('Y') . ' ' . $site_name . '. All rights reserved.');
$current_page = basename($_SERVER['PHP_SELF']);
?>
</div> <!-- end container mt-4 from header -->
<footer class="mt-5 pt-5 pb-4 border-top border-light bg-white">
<footer class="mt-5 pt-5 pb-4 border-top border-light bg-white d-none d-lg-block">
<div class="container">
<div class="row g-4">
<div class="col-lg-4">
<a class="navbar-brand d-flex align-items-center mb-3" href="index.php">
<div class="site-logo">
<i class="bi bi-globe-americas"></i>
<i class="bi bi-airplane-fill"></i>
</div>
<img src="<?php echo $site_logo; ?>" alt="Logo" style="height: 30px; margin-right: 10px;">
<span class="fw-bold"><?php echo $site_name; ?></span>
</a>
<p class="text-muted small pe-lg-5">
我们提供全球优质软件账号服务,支持 24 小时自动发货,质保无忧。
<?php echo $settings['site_description'] ?? '我们提供全球优质软件账号服务,支持 24 小时自动发货,质保无忧。'; ?>
</p>
<div class="mt-3">
<a href="<?php echo $tg_link; ?>" target="_blank" class="btn btn-primary rounded-pill px-4">
@ -22,22 +23,19 @@
</div>
<div class="col-6 col-lg-2">
<h6 class="text-dark fw-bold mb-3">产品中心</h6>
<a href="category.php?id=1" class="footer-link">社交账号</a>
<a href="category.php?id=2" class="footer-link">海外社交</a>
<a href="category.php?id=3" class="footer-link">AI 办公</a>
<a href="category.php?id=4" class="footer-link">邮箱工具</a>
<a href="index.php" class="footer-link">所有分类</a>
<a href="orders.php" class="footer-link">订单查询</a>
<a href="help.php" class="footer-link">帮助中心</a>
</div>
<div class="col-6 col-lg-2">
<h6 class="text-dark fw-bold mb-3">用户支持</h6>
<a href="orders.php" class="footer-link">订单查询</a>
<a href="help.php" class="footer-link">帮助中心</a>
<a href="faq.php" class="footer-link">常见问题</a>
<a href="policy.php" class="footer-link">服务协议</a>
</div>
<div class="col-lg-4">
<h6 class="text-dark fw-bold mb-3">联系我们</h6>
<p class="text-muted small mb-2">
<i class="bi bi-telegram text-primary me-2"></i> 官方客服:<a href="<?php echo $tg_link; ?>" class="text-decoration-none text-primary fw-bold" target="_blank">@zhangshihao818</a>
<i class="bi bi-telegram text-primary me-2"></i> 官方客服:<a href="<?php echo $tg_link; ?>" class="text-decoration-none text-primary fw-bold" target="_blank">点击跳转</a>
</p>
<p class="text-muted small mb-2">
<i class="bi bi-envelope text-primary me-2"></i> 售后邮箱support@hao-soft.world
@ -51,7 +49,7 @@
<hr class="my-4 border-light">
<div class="row align-items-center">
<div class="col-md-6 text-center text-md-start">
<p class="text-muted small mb-0">&copy; <?php echo date('Y'); ?> <?php echo $site_name; ?>. All rights reserved.</p>
<p class="text-muted small mb-0"><?php echo $footer_text; ?></p>
</div>
<div class="col-md-6 text-center text-md-end mt-2 mt-md-0">
<a href="#" class="text-muted small text-decoration-none me-3">隐私权政策</a>
@ -61,6 +59,26 @@
</div>
</footer>
<!-- Mobile Bottom Navigation -->
<div class="mobile-bottom-nav d-lg-none">
<a href="index.php" class="mobile-nav-item <?php echo $current_page == 'index.php' ? 'active' : ''; ?>">
<i class="bi bi-house-door<?php echo $current_page == 'index.php' ? '-fill' : ''; ?>"></i>
<span>首页</span>
</a>
<a href="search.php" class="mobile-nav-item <?php echo $current_page == 'search.php' ? 'active' : ''; ?>">
<i class="bi bi-grid<?php echo $current_page == 'search.php' ? '-fill' : ''; ?>"></i>
<span>分类</span>
</a>
<a href="cart.php" class="mobile-nav-item <?php echo $current_page == 'cart.php' ? 'active' : ''; ?>">
<i class="bi bi-cart3<?php echo $current_page == 'cart.php' ? '-fill' : ''; ?>"></i>
<span>购物车</span>
</a>
<a href="orders.php" class="mobile-nav-item <?php echo $current_page == 'orders.php' ? 'active' : ''; ?>">
<i class="bi bi-person<?php echo $current_page == 'orders.php' ? '-fill' : ''; ?>"></i>
<span>我的订单</span>
</a>
</div>
<!-- Floating TG Button -->
<a href="<?php echo $tg_link; ?>" target="_blank" class="floating-tg">
<i class="bi bi-send-fill"></i>
@ -68,7 +86,7 @@
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>

View File

@ -7,14 +7,19 @@ try {
$stmt = db()->query("SELECT key_name, key_value FROM settings");
$settings = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
} catch (Exception $e) {
$settings = [
'site_name' => '豪软世界',
'tg_support' => 'https://t.me/zhangshihao818'
];
$settings = [];
}
$site_name = $settings['site_name'] ?? '豪软世界';
$tg_link = $settings['tg_support'] ?? 'https://t.me/zhangshihao818';
$tg_link = $settings['tg_link'] ?? ($settings['tg_support'] ?? 'https://t.me/zhangshihao818');
$site_logo = $settings['site_logo'] ?? 'assets/pasted-20260208-082111-302e08e2.png';
$site_description = $settings['site_description'] ?? '豪软世界,为您提供最优质的软件授权与数字化服务。';
// Theme colors
$primary_color = $settings['primary_color'] ?? '#ff3399';
$accent_color = $settings['accent_color'] ?? '#0088cc';
$mobile_primary = $settings['mobile_primary_color'] ?? '#e1251b';
$mobile_accent = $settings['mobile_accent_color'] ?? '#ff9900';
?>
<!DOCTYPE html>
<html lang="zh-CN">
@ -22,8 +27,10 @@ $tg_link = $settings['tg_support'] ?? 'https://t.me/zhangshihao818';
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo $site_name; ?> - 全球专业软件服务商</title>
<meta name="description" content="<?php echo htmlspecialchars($site_description); ?>">
<!-- Favicon -->
<link rel="icon" type="image/png" href="assets/pasted-20260208-082111-302e08e2.png">
<link rel="icon" type="image/png" href="<?php echo $site_logo; ?>">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap Icons -->
@ -32,26 +39,33 @@ $tg_link = $settings['tg_support'] ?? 'https://t.me/zhangshihao818';
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap" rel="stylesheet">
<!-- Custom CSS -->
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
<style>
:root {
--primary-color: <?php echo $primary_color; ?>;
--accent-color: <?php echo $accent_color; ?>;
--mobile-primary: <?php echo $mobile_primary; ?>;
--mobile-accent: <?php echo $mobile_accent; ?>;
}
.site-logo-img {
height: 40px;
width: auto;
margin-right: 12px;
border-radius: 8px;
}
.navbar-brand {
font-weight: 800;
font-size: 1.5rem;
color: #333 !important;
@media (max-width: 768px) {
.site-logo-img { height: 30px; }
.navbar-brand { font-size: 1.1rem !important; }
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg sticky-top navbar-light">
<!-- PC Navbar -->
<nav class="navbar navbar-expand-lg sticky-top navbar-light d-none d-lg-block">
<div class="container">
<a class="navbar-brand d-flex align-items-center" href="index.php">
<img src="assets/pasted-20260208-082111-302e08e2.png" alt="Logo" class="site-logo-img">
<img src="<?php echo $site_logo; ?>" alt="Logo" class="site-logo-img">
<?php echo $site_name; ?>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
@ -96,6 +110,32 @@ $tg_link = $settings['tg_support'] ?? 'https://t.me/zhangshihao818';
</div>
</nav>
<!-- Mobile Header -->
<div class="d-lg-none sticky-top" style="background: var(--mobile-primary); padding: 10px 0; z-index: 1040;">
<div class="container">
<div class="d-flex justify-content-between align-items-center mb-2">
<a class="navbar-brand d-flex align-items-center text-white" href="index.php">
<img src="<?php echo $site_logo; ?>" alt="Logo" class="site-logo-img" style="filter: brightness(0) invert(1);">
<span class="text-white"><?php echo $site_name; ?></span>
</a>
<div class="d-flex gap-3">
<a href="cart.php" class="text-white position-relative">
<i class="bi bi-cart3 fs-4"></i>
<span id="cart-badge-mobile" class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-warning text-dark d-none" style="font-size: 0.6rem;">
0
</span>
</a>
</div>
</div>
<form action="search.php" method="GET">
<div class="mobile-search-bar">
<i class="bi bi-search text-muted"></i>
<input type="search" name="q" placeholder="搜索您需要的商品...">
</div>
</form>
</div>
</div>
<div class="container mt-4">
<?php if (isset($settings['notice']) && !empty($settings['notice'])): ?>
<div class="alert glass-card mb-4 border-0 py-2 bg-white shadow-sm overflow-hidden" role="alert">
@ -103,7 +143,10 @@ $tg_link = $settings['tg_support'] ?? 'https://t.me/zhangshihao818';
<i class="bi bi-megaphone-fill me-3 fs-5" style="color: var(--primary-color);"></i>
<div class="announcement-container flex-grow-1">
<div class="announcement-content text-dark fw-bold">
<?php echo $settings['notice']; ?> &nbsp;&nbsp;&nbsp;&nbsp;温馨提示:下单后请务必保存订单号,如有问题请联系在线客服处理。&nbsp;&nbsp;&nbsp;&nbsp;官方频道:<?php echo $settings['tg_channel'] ?? '未设置'; ?>
<?php echo $settings['notice']; ?>
<?php if (!empty($settings['tg_channel'])): ?>
&nbsp;&nbsp;&nbsp;&nbsp;官方频道:<?php echo $settings['tg_channel']; ?>
<?php endif; ?>
</div>
</div>
</div>

View File

@ -1,4 +1,5 @@
<div class="glass-card p-3 product-card h-100 d-flex flex-column bg-white">
<!-- PC Card -->
<div class="glass-card p-3 product-card h-100 d-none d-lg-flex flex-column bg-white">
<div class="product-img-container mb-3">
<a href="product.php?id=<?php echo $product['id']; ?>">
<img src="<?php echo $product['image_url']; ?>" class="product-img" alt="<?php echo $product['name']; ?>">
@ -22,3 +23,26 @@
</div>
</div>
</div>
<!-- Mobile Card (Taobao Style) -->
<div class="product-card-mobile d-lg-none">
<a href="product.php?id=<?php echo $product['id']; ?>" class="text-decoration-none">
<img src="<?php echo $product['image_url']; ?>" class="product-img-mobile" alt="<?php echo $product['name']; ?>">
</a>
<div class="product-info-mobile">
<a href="product.php?id=<?php echo $product['id']; ?>" class="text-decoration-none">
<div class="product-title-mobile">
<?php if (isset($product['is_hot']) && $product['is_hot']): ?>
<span class="product-tag-mobile">爆款</span>
<?php endif; ?>
<?php echo $product['name']; ?>
</div>
</a>
<div class="d-flex justify-content-between align-items-center mt-2">
<span class="product-price-mobile"><?php echo $product['price_usdt']; ?> <small style="font-size: 0.6rem;">USDT</small></span>
<button class="btn btn-sm p-0 text-primary" onclick="addToCart(<?php echo $product['id']; ?>, '<?php echo addslashes($product['name']); ?>', <?php echo $product['price_usdt']; ?>, '<?php echo $product['image_url']; ?>')">
<i class="bi bi-cart-plus-fill fs-5"></i>
</button>
</div>
</div>
</div>

241
index.php
View File

@ -1,7 +1,7 @@
<?php
include 'includes/header.php';
// Fetch site settings (already in header, but ensuring db connection)
// Fetch site settings
$db = db();
// Fetch hot products (Popular Recommendations) - 8 items
@ -24,64 +24,98 @@ $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>
<!-- Carousel Section -->
<div class="carousel-section mb-4 mb-lg-5">
<div id="heroCarousel" class="carousel slide carousel-fade shadow-sm overflow-hidden border-0" data-bs-ride="carousel" data-bs-interval="2000" data-bs-pause="false">
<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>
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="3"></button>
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="4"></button>
</div>
<div class="carousel-inner h-100">
<!-- Slide 1 -->
<div class="carousel-item active h-100" data-bs-interval="2000">
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%);">
<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.35;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-4 carousel-title mb-3">专业软件账号中心</h2>
<div class="mb-4 pc-only">
<span class="carousel-subtitle">全球主流平台 · 即买即发 · 稳定质保</span>
</div>
<div class="d-flex justify-content-center gap-2">
<a href="#market" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">立即探索</a>
</div>
</div>
</div>
</div>
<!-- Slide 2 -->
<div class="carousel-item h-100" data-bs-interval="2000">
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);">
<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.35;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-4 carousel-title mb-3">AI 办公提效神器</h2>
<div class="mb-4 pc-only">
<span class="carousel-subtitle" style="color: #006064 !important;">ChatGPT, Midjourney 独享权限</span>
</div>
<a href="category.php?id=3" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">立即升级</a>
</div>
</div>
</div>
<!-- Slide 3 -->
<div class="carousel-item h-100" data-bs-interval="2000">
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);">
<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.35;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-4 carousel-title mb-3">全自动 24H 交付</h2>
<div class="mb-4 pc-only">
<span class="carousel-subtitle" style="color: #4a148c !important;">卡密信息实时到达订单中心</span>
</div>
<a href="orders.php" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">查询订单</a>
</div>
</div>
</div>
<!-- Slide 4 -->
<div class="carousel-item h-100" data-bs-interval="2000">
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);">
<div class="position-absolute w-100 h-100" style="background: url('https://images.pexels.com/photos/3760067/pexels-photo-3760067.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') center/cover; opacity: 0.35;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-4 carousel-title mb-3">多平台社交引流</h2>
<div class="mb-4 pc-only">
<span class="carousel-subtitle" style="color: #e65100 !important;">海外主流社媒,安全稳定不封号</span>
</div>
<a href="category.php?id=2" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">进入专区</a>
</div>
</div>
</div>
<!-- Slide 5 -->
<div class="carousel-item h-100" data-bs-interval="2000">
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);">
<div class="position-absolute w-100 h-100" style="background: url('https://images.pexels.com/photos/674010/pexels-photo-674010.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') center/cover; opacity: 0.35;"></div>
<div class="text-center position-relative px-3" style="z-index: 10;">
<h2 class="display-4 carousel-title mb-3">安全加密 支付无忧</h2>
<div class="mb-4 pc-only">
<span class="carousel-subtitle" style="color: #1b5e20 !important;">支持 USDT 匿名支付,保护隐私</span>
</div>
<a href="faq.php" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">了解更多</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">
<!-- Categories Quick Links (Improved Style) -->
<div class="row g-2 g-lg-4 mb-4 mb-lg-5 px-1">
<?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 class="col-3 col-md">
<a href="category.php?id=<?php echo $cat['id']; ?>" class="text-decoration-none category-item d-block">
<div class="text-center">
<div class="category-icon-wrapper">
<i class="bi <?php echo $cat['icon'] ?: 'bi-grid-fill'; ?>"></i>
</div>
<div class="category-name"><?php echo $cat['name']; ?></div>
</div>
</a>
</div>
@ -89,16 +123,15 @@ $categories = $db->query("SELECT * FROM categories")->fetchAll();
</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">
<!-- Hot Products Section -->
<div class="mb-4 mb-lg-5">
<div class="d-flex justify-content-between align-items-center mb-3 mb-lg-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>
<h4 class="mb-0 fw-bold text-dark"><i class="bi bi-fire text-danger me-2"></i>热门推荐</h4>
</div>
<a href="search.php" class="btn btn-outline-primary rounded-pill px-4">查看全部</a>
<a href="search.php" class="text-primary text-decoration-none small">查看全部 <i class="bi bi-chevron-right"></i></a>
</div>
<div class="row g-4">
<div class="row g-2 g-lg-4">
<?php foreach ($hot_products as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
@ -107,10 +140,10 @@ $categories = $db->query("SELECT * FROM categories")->fetchAll();
</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">
<!-- Social Accounts -->
<div class="mb-4 mb-lg-5">
<h5 class='text-dark mb-3 mb-lg-4 mt-4 d-flex align-items-center fw-bold'><span class='category-accent me-2 me-lg-3'></span> 社交账号展示区</h5>
<div class="row g-2 g-lg-4">
<?php foreach ($social_accounts as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
@ -119,22 +152,10 @@ $categories = $db->query("SELECT * FROM categories")->fetchAll();
</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">
<!-- AI Office -->
<div class="mb-4 mb-lg-5">
<h5 class='text-dark mb-3 mb-lg-4 mt-4 d-flex align-items-center fw-bold'><span class='category-accent me-2 me-lg-3'></span> AI 办公展示区</h5>
<div class="row g-2 g-lg-4">
<?php foreach ($ai_office as $product): ?>
<div class="col-6 col-lg-3">
<?php include 'includes/product_card.php'; ?>
@ -142,56 +163,36 @@ $categories = $db->query("SELECT * FROM categories")->fetchAll();
<?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>
<!-- Trust Badges (Improved Contrast) -->
<div class="row g-2 g-lg-4 mt-4 mt-lg-5 pb-5">
<div class="col-6 col-md-3">
<div class="text-center p-3 p-lg-4 bg-white rounded-4 shadow-sm h-100 border border-light">
<i class="bi bi-lightning-charge fs-2 text-primary mb-3 d-block"></i>
<h6 class="text-dark fw-bold mb-2">秒速发货</h6>
<p class="text-secondary small mb-0 d-none d-lg-block">系统自动处理,无需等待。</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 class="col-6 col-md-3">
<div class="text-center p-3 p-lg-4 bg-white rounded-4 shadow-sm h-100 border border-light">
<i class="bi bi-shield-check fs-2 text-success mb-3 d-block"></i>
<h6 class="text-dark fw-bold mb-2">质量保障</h6>
<p class="text-secondary small mb-0 d-none d-lg-block">所有账号通过质保测试。</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 class="col-6 col-md-3 mt-2 mt-md-0">
<div class="text-center p-3 p-lg-4 bg-white rounded-4 shadow-sm h-100 border border-light">
<i class="bi bi-headset fs-2 text-info mb-3 d-block"></i>
<h6 class="text-dark fw-bold mb-2">优质售后</h6>
<p class="text-secondary small mb-0 d-none d-lg-block">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 class="col-6 col-md-3 mt-2 mt-md-0">
<div class="text-center p-3 p-lg-4 bg-white rounded-4 shadow-sm h-100 border border-light">
<i class="bi bi-currency-bitcoin fs-2 text-warning mb-3 d-block"></i>
<h6 class="text-dark fw-bold mb-2">USDT 支付</h6>
<p class="text-secondary small mb-0 d-none d-lg-block">隐私安全,交易无忧。</p>
</div>
</div>
</div>

View File

@ -8,7 +8,7 @@ $stmt->execute([$order_no]);
$order = $stmt->fetch();
if (!$order) {
echo "<div class='container my-5 py-5 text-center'><div class='alert glass-card text-danger border-danger p-5'><i class='bi bi-exclamation-octagon display-1 d-block mb-4'></i><h2>订单不存在</h2><p>请检查您的订单号是否正确或联系客服。</p><a href='index.php' class='btn btn-primary mt-4'>返回首页</a></div></div>";
echo "<div class='container my-5 py-5 text-center'><div class='alert glass-card text-danger border-danger p-4 p-lg-5'><i class='bi bi-exclamation-octagon display-4 d-block mb-3'></i><h4>订单不存在</h4><p>请检查您的订单号是否正确或联系客服。</p><a href='index.php' class='btn btn-primary mt-3'>返回首页</a></div></div>";
include 'includes/footer.php';
exit;
}
@ -20,72 +20,72 @@ $qty_data = $stmt->fetch();
$total_qty = $qty_data['total_qty'] ?? 1;
$usdt_address = $settings['usdt_address'] ?? 'Txxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$qr_code_custom = $settings['qr_code_custom'] ?? '';
$qr_src = !empty($qr_code_custom) ? $qr_code_custom : "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=" . urlencode($usdt_address);
?>
<div class="row justify-content-center">
<div class="col-lg-10">
<div class="col-lg-10 p-2 p-lg-0">
<div class="glass-card p-0 overflow-hidden bg-white shadow-lg border-0 rounded-4">
<div class="bg-primary bg-opacity-10 p-4 border-bottom d-flex justify-content-between align-items-center">
<h4 class="text-dark mb-0 fw-bold"><i class="bi bi-shield-lock-fill me-2 text-primary"></i>安全支付收银台</h4>
<div class="badge bg-primary px-4 py-2 rounded-pill fw-bold">USDT - TRC20</div>
<div class="bg-primary bg-opacity-10 p-3 p-lg-4 border-bottom d-flex justify-content-between align-items-center">
<h5 class="text-dark mb-0 fw-bold"><i class="bi bi-shield-lock-fill me-2 text-primary"></i>支付收银台</h5>
<div class="badge bg-primary px-3 py-1 rounded-pill fw-bold small">USDT - TRC20</div>
</div>
<div class="p-4 p-lg-5">
<div class="row g-5">
<div class="p-3 p-lg-5">
<div class="row g-4 g-lg-5">
<div class="col-lg-5 text-center">
<div class="p-4 rounded-4 d-inline-block border border-light bg-light mb-4">
<img src="https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=<?php echo urlencode($usdt_address); ?>" alt="QR Code" class="img-fluid" style="width: 250px;">
<div class="p-3 rounded-4 d-inline-block border border-light bg-light mb-3">
<img src="<?php echo $qr_src; ?>" alt="QR Code" class="img-fluid" style="width: 200px;">
</div>
<div class="p-4 bg-light rounded-4 mb-4">
<label class="text-muted small d-block mb-2 fw-bold">支付倒计时</label>
<div id="countdown" class="display-4 fw-bold text-primary">60:00</div>
<div class="p-3 bg-light rounded-4 mb-3">
<label class="text-muted small d-block mb-1 fw-bold">支付倒计时</label>
<div id="countdown" class="h2 fw-bold text-primary">60:00</div>
</div>
<p class="text-muted small"><i class="bi bi-info-circle me-1"></i> 请在倒计时结束前完成支付以保证订单有效</p>
<p class="text-muted" style="font-size: 0.7rem;"><i class="bi bi-info-circle me-1"></i> 请在倒计时结束前完成支付</p>
</div>
<div class="col-lg-7">
<div class="mb-5 p-4 bg-light rounded-4">
<h5 class="text-dark fw-bold mb-4 border-bottom pb-3">订单信息</h5>
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="mb-4 p-3 bg-light rounded-4">
<h6 class="text-dark fw-bold mb-3 border-bottom pb-2">订单信息</h6>
<div class="d-flex justify-content-between align-items-center mb-2 small">
<span class="text-muted">订单编号:</span>
<span class="text-dark fw-bold"><?php echo $order_no; ?></span>
</div>
<div class="d-flex justify-content-between align-items-center mb-3">
<div class="d-flex justify-content-between align-items-center mb-2 small">
<span class="text-muted">商品数量:</span>
<span class="text-dark fw-bold"><?php echo $total_qty; ?> 件</span>
</div>
<div class="d-flex justify-content-between align-items-center pt-3 border-top mt-3">
<span class="text-dark fs-5 fw-bold">应付金额:</span>
<span class="display-5 fw-bold text-primary"><?php echo $order['total_amount']; ?> <small class="fs-4">USDT</small></span>
<div class="d-flex justify-content-between align-items-center pt-2 border-top mt-2">
<span class="text-dark fw-bold">应付金额:</span>
<span class="h3 fw-bold text-primary mb-0"><?php echo $order['total_amount']; ?> <small class="fs-6">USDT</small></span>
</div>
</div>
<div class="mb-5">
<h5 class="text-dark fw-bold mb-4">收款地址 (TRC20)</h5>
<div class="input-group input-group-lg">
<input type="text" id="usdtAddress" class="form-control bg-light border-0 text-dark p-4 font-monospace fs-6" value="<?php echo $usdt_address; ?>" readonly>
<button class="btn btn-primary px-4" onclick="copyAddress()">
<i class="bi bi-copy me-2"></i> 复制地址
<div class="mb-4">
<h6 class="text-dark fw-bold mb-2">收款地址 (TRC20)</h6>
<div class="input-group">
<input type="text" id="usdtAddress" class="form-control bg-light border-0 text-dark font-monospace" style="font-size: 0.8rem;" value="<?php echo $usdt_address; ?>" readonly>
<button class="btn btn-primary btn-sm px-3" onclick="copyAddress()">
复制
</button>
</div>
</div>
<div class="p-4 rounded-4 border border-info border-opacity-10 bg-info bg-opacity-10 mb-5">
<h6 class="text-info fw-bold mb-3"><i class="bi bi-info-square-fill me-2"></i> 支付说明:</h6>
<ul class="text-muted small mb-0 ps-3 lh-lg">
<li>请务必使用 <strong class="text-primary">TRC20 (波场网络)</strong> 进行转账,暂不支持其他网络。</li>
<li>支付金额必须与订单金额 <strong class="text-primary">完全一致</strong> (<?php echo $order['total_amount']; ?> USDT),否则系统无法自动识别。</li>
<li>转账完成后,请点击下方的“已完成支付”按钮,联系客服确认发货。</li>
<li>区块确认通常需要 1-3 分钟,请耐心等待。</li>
<li>如需帮助,请提供订单号 <?php echo $order_no; ?> 给在线客服。</li>
<div class="p-3 rounded-4 border border-info border-opacity-10 bg-info bg-opacity-10 mb-4">
<h6 class="text-info fw-bold mb-2 small"><i class="bi bi-info-square-fill me-2"></i> 支付说明:</h6>
<ul class="text-muted small mb-0 ps-3 lh-sm" style="font-size: 0.75rem;">
<li>请使用 <strong class="text-primary">TRC20</strong> 网络转账。</li>
<li>金额必须 <strong class="text-primary">完全一致</strong> (<?php echo $order['total_amount']; ?> USDT)。</li>
<li>支付后点击下方按钮联系客服。</li>
</ul>
</div>
<div class="d-grid gap-3">
<div class="d-grid gap-2">
<button id="checkPaymentBtn" class="btn btn-primary btn-lg py-3 rounded-pill fw-bold shadow-lg">
<i class="bi bi-check-circle-fill me-2"></i> 我已完成支付,联系客服发货
<i class="bi bi-check-circle-fill me-2"></i> 我已完成支付,联系客服
</button>
<a href="index.php" class="btn btn-outline-secondary py-3 rounded-pill">
<a href="index.php" class="btn btn-outline-secondary py-2 rounded-pill small">
返回首页
</a>
</div>
@ -105,7 +105,7 @@ function copyAddress() {
const btn = document.querySelector('button[onclick="copyAddress()"]');
const originalText = btn.innerHTML;
btn.innerHTML = '<i class="bi bi-check2"></i> 已复制';
btn.innerHTML = '已复制';
btn.classList.replace('btn-primary', 'btn-success');
setTimeout(() => {
btn.innerHTML = originalText;
@ -114,7 +114,7 @@ function copyAddress() {
}
// Countdown Timer
let timeLeft = 60 * 60; // 60 minutes
let timeLeft = 60 * 60;
const countdownEl = document.getElementById('countdown');
const timer = setInterval(() => {
@ -129,16 +129,12 @@ const timer = setInterval(() => {
timeLeft--;
}, 1000);
// TG redirect with order details
document.getElementById('checkPaymentBtn').addEventListener('click', function() {
const message = encodeURIComponent(`您好,我已支付订单\n\n订单编号<?php echo $order_no; ?>\n商品数量:<?php echo $total_qty; ?> 件\n实付金额:<?php echo $order['total_amount']; ?> USDT\n\n请核实并处理。`);
const message = encodeURIComponent(`您好,我已支付订单.\n\n订单编号<?php echo $order_no; ?>\n实付金额<?php echo $order['total_amount']; ?> USDT\n\n请核实。`);
const tgLink = `<?php echo $tg_link; ?>?text=${message}`;
// Redirect to Telegram
window.open(tgLink, '_blank');
});
// Clear cart after reaching payment page
localStorage.removeItem('cart');
if (typeof updateCartBadge === 'function') updateCartBadge();
</script>

View File

@ -8,35 +8,35 @@ $title = ($type === 'payment') ? '支付说明' : '售后政策';
<div class="row justify-content-center">
<div class="col-lg-9">
<div class="glass-card p-5">
<h1 class="display-4 fw-bold mb-5 d-flex align-items-center">
<h1 class="display-4 fw-bold mb-5 d-flex align-items-center text-dark">
<i class="bi <?php echo ($type === 'payment') ? 'bi-credit-card' : 'bi-shield-check'; ?> me-3 text-primary"></i>
<?php echo $title; ?>
</h1>
<?php if ($type === 'payment'): ?>
<section class="mb-5">
<h3 class="text-white mb-4"><i class="bi bi-1-circle me-2"></i> 为什么选择 USDT 支付?</h3>
<h3 class="text-dark mb-4"><i class="bi bi-1-circle me-2 text-primary"></i> 为什么选择 USDT 支付?</h3>
<p class="text-muted lh-lg">USDT (Tether) 是一种与美元挂钩的加密货币,具有交易快、手续费低、全球通用等特点。通过 USDT 支付,可以确保您的资金安全和隐私,同时实现全自动化的即时发货。</p>
</section>
<section class="mb-5">
<h3 class="text-white mb-4"><i class="bi bi-2-circle me-2"></i> 支付流程</h3>
<h3 class="text-dark mb-4"><i class="bi bi-2-circle me-2 text-primary"></i> 支付流程</h3>
<div class="row g-4">
<div class="col-md-4">
<div class="p-4 border border-secondary rounded-4 h-100">
<h5 class="text-white">1. 选择商品</h5>
<p class="small text-muted mb-0">将您需要的软件账号加入购物车并提交订单。</p>
<div class="p-4 border border-light bg-light rounded-4 h-100 shadow-sm">
<h5 class="text-dark">1. 选择商品</h5>
<p class="small text-muted mb-0">将您需要的软件 or 账号加入购物车并提交订单。</p>
</div>
</div>
<div class="col-md-4">
<div class="p-4 border border-secondary rounded-4 h-100">
<h5 class="text-white">2. 转账支付</h5>
<div class="p-4 border border-light bg-light rounded-4 h-100 shadow-sm">
<h5 class="text-dark">2. 转账支付</h5>
<p class="small text-muted mb-0">复制收款地址或扫码,使用您的钱包转入精确金额。</p>
</div>
</div>
<div class="col-md-4">
<div class="p-4 border border-secondary rounded-4 h-100">
<h5 class="text-white">3. 自动交付</h5>
<div class="p-4 border border-light bg-light rounded-4 h-100 shadow-sm">
<h5 class="text-dark">3. 自动交付</h5>
<p class="small text-muted mb-0">区块链确认后,系统将自动跳转并提供您的卡密信息。</p>
</div>
</div>
@ -44,22 +44,22 @@ $title = ($type === 'payment') ? '支付说明' : '售后政策';
</section>
<section class="mb-5">
<h3 class="text-white mb-4"><i class="bi bi-exclamation-triangle-fill me-2 text-warning"></i> 注意事项</h3>
<h3 class="text-dark mb-4"><i class="bi bi-exclamation-triangle-fill me-2 text-warning"></i> 注意事项</h3>
<ul class="text-muted lh-lg">
<li>请务必使用 <strong class="text-white">TRC20 (Tron)</strong> 网络,使用其他网络(如 ERC20, BEP20将导致资金丢失。</li>
<li>请确保转账金额与订单显示的金额 <strong class="text-white">完全一致</strong></li>
<li>请务必使用 <strong class="text-primary">TRC20 (Tron)</strong> 网络,使用其他网络(如 ERC20, BEP20将导致资金丢失。</li>
<li>请确保转账金额与订单显示的金额 <strong class="text-primary">完全一致</strong></li>
<li>支付完成后请保留交易哈希 (TXID) 以备售后查询。</li>
<li>订单有效期为 60 分钟,请在倒计时结束前完成转账。</li>
</ul>
</section>
<?php else: ?>
<section class="mb-5">
<h3 class="text-white mb-4"><i class="bi bi-patch-check-fill me-2 text-success"></i> 质保范围</h3>
<h3 class="text-dark mb-4"><i class="bi bi-patch-check-fill me-2 text-success"></i> 质保范围</h3>
<p class="text-muted lh-lg">我们对所有售出的账号提供首登质保。即在购买后 24 小时内,如出现无法登录、账号密码错误等非人为操作问题,我们将为您免费更换。</p>
</section>
<section class="mb-5">
<h3 class="text-white mb-4"><i class="bi bi-x-circle-fill me-2 text-danger"></i> 非质保情况</h3>
<h3 class="text-dark mb-4"><i class="bi bi-x-circle-fill me-2 text-danger"></i> 非质保情况</h3>
<ul class="text-muted lh-lg">
<li>登录后因发布违规信息、频繁切换 IP 导致的封号。</li>
<li>因使用劣质代理 (VPN) 导致的登录异常。</li>
@ -69,8 +69,8 @@ $title = ($type === 'payment') ? '支付说明' : '售后政策';
</section>
<section class="mb-5">
<h3 class="text-white mb-4"><i class="bi bi-headset me-2 text-primary"></i> 售后申请流程</h3>
<p class="text-muted lh-lg">如遇问题,请准备好您的 <strong class="text-white">订单号</strong> <strong class="text-white">异常截图</strong>,联系我们的 Telegram 在线客服。客服将在 1-12 小时内处理您的请求。</p>
<h3 class="text-dark mb-4"><i class="bi bi-headset me-2 text-primary"></i> 售后申请流程</h3>
<p class="text-muted lh-lg">如遇问题,请准备好您的 <strong class="text-primary">订单号</strong> <strong class="text-primary">异常截图</strong>,联系我们的 Telegram 在线客服。客服将在 1-12 小时内处理您的请求。</p>
<div class="mt-4">
<a href="<?php echo $settings['tg_support'] ?? '#'; ?>" class="btn btn-primary px-5 py-3 rounded-pill">联系售后客服</a>
</div>

View File

@ -4,7 +4,7 @@ include 'includes/header.php';
$q = $_GET['q'] ?? '';
$results = [];
if (!empty($q)) {
$stmt = db()->prepare("SELECT p.*, c.name as cat_name FROM products p JOIN categories c ON p.category_id = c.id WHERE p.name LIKE ? OR p.description LIKE ? OR c.name LIKE ? ORDER BY p.id DESC");
$stmt = db()->prepare("SELECT p.*, c.name as category_name FROM products p JOIN categories c ON p.category_id = c.id WHERE p.name LIKE ? OR p.description LIKE ? OR c.name LIKE ? ORDER BY p.id DESC");
$stmt->execute(['%'.$q.'%', '%'.$q.'%', '%'.$q.'%']);
$results = $stmt->fetchAll();
}
@ -12,7 +12,7 @@ if (!empty($q)) {
<div class="row mb-5 align-items-center">
<div class="col-md-6">
<h1 class="fw-bold text-white mb-0">搜索结果</h1>
<h1 class="fw-bold text-dark mb-0">搜索结果</h1>
<p class="text-muted mt-2">关键词: <span class="text-primary fw-bold">"<?php echo htmlspecialchars($q); ?>"</span></p>
</div>
<div class="col-md-6 text-md-end mt-3 mt-md-0">
@ -22,41 +22,18 @@ if (!empty($q)) {
<?php if (empty($results)): ?>
<div class="text-center py-5">
<div class="glass-card p-5">
<div class="glass-card p-5 bg-white shadow-sm">
<i class="bi bi-search fs-1 text-muted d-block mb-3"></i>
<h4 class="text-white">未找到相关结果</h4>
<h4 class="text-dark">未找到相关结果</h4>
<p class="text-muted">换个关键词试试,或者联系客服定制您需要的软件。</p>
<a href="index.php" class="btn btn-primary mt-3 px-5 rounded-pill">返回商城首页</a>
</div>
</div>
<?php else: ?>
<div class="row g-4">
<div class="row g-2 g-lg-4">
<?php foreach ($results as $product): ?>
<div class="col-6 col-lg-3">
<div class="glass-card p-3 product-card h-100 d-flex flex-column">
<div class="product-img-container mb-3">
<a href="product.php?id=<?php echo $product['id']; ?>">
<img src="<?php echo $product['image_url']; ?>" class="product-img" alt="<?php echo $product['name']; ?>">
<?php if ($product['is_hot']): ?>
<span class="badge-hot">HOT</span>
<?php endif; ?>
</a>
</div>
<div class="px-2 flex-grow-1 d-flex flex-column">
<span class="text-muted small"><?php echo $product['cat_name']; ?></span>
<h5 class="text-white mb-3">
<a href="product.php?id=<?php echo $product['id']; ?>" class="text-white text-decoration-none hover-primary">
<?php echo $product['name']; ?>
</a>
</h5>
<div class="mt-auto d-flex justify-content-between align-items-center">
<span class="price-tag"><?php echo $product['price_usdt']; ?> <small class="small">USDT</small></span>
<button class="btn btn-sm btn-outline-primary rounded-circle" onclick="addToCart(<?php echo $product['id']; ?>, '<?php echo addslashes($product['name']); ?>', <?php echo $product['price_usdt']; ?>, '<?php echo $product['image_url']; ?>')">
<i class="bi bi-cart-plus"></i>
</button>
</div>
</div>
</div>
<?php include 'includes/product_card.php'; ?>
</div>
<?php endforeach; ?>
</div>