Compare commits
No commits in common. "ai-dev" and "master" have entirely different histories.
@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (session_status() === PHP_SESSION_NONE) {
|
|
||||||
session_start();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($_SESSION['user_id']) || $_SESSION['role'] !== 'admin') {
|
|
||||||
header("Location: ../login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../db/config.php';
|
|
||||||
$db = db();
|
|
||||||
?>
|
|
||||||
@ -1,118 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'auth.php';
|
|
||||||
|
|
||||||
// Handle Delete
|
|
||||||
if (isset($_GET['delete'])) {
|
|
||||||
$stmt = $db->prepare("DELETE FROM categories WHERE id = ?");
|
|
||||||
$stmt->execute([$_GET['delete']]);
|
|
||||||
header("Location: categories.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle Add/Edit
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
||||||
$id = $_POST['id'] ?? null;
|
|
||||||
$name = $_POST['name'];
|
|
||||||
$icon = $_POST['icon'];
|
|
||||||
|
|
||||||
if ($id) {
|
|
||||||
$stmt = $db->prepare("UPDATE categories SET name=?, icon=? WHERE id=?");
|
|
||||||
$stmt->execute([$name, $icon, $id]);
|
|
||||||
} else {
|
|
||||||
$stmt = $db->prepare("INSERT INTO categories (name, icon) VALUES (?, ?)");
|
|
||||||
$stmt->execute([$name, $icon]);
|
|
||||||
}
|
|
||||||
header("Location: categories.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$categories = $db->query("SELECT * FROM categories ORDER BY id ASC")->fetchAll();
|
|
||||||
|
|
||||||
$edit_cat = null;
|
|
||||||
if (isset($_GET['edit'])) {
|
|
||||||
$stmt = $db->prepare("SELECT * FROM categories WHERE id = ?");
|
|
||||||
$stmt->execute([$_GET['edit']]);
|
|
||||||
$edit_cat = $stmt->fetch();
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>分类管理 - 豪软后台</title>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
body { background: #f8f9fa; }
|
|
||||||
.sidebar { min-height: 100vh; background: #212529; color: white; }
|
|
||||||
.sidebar a { color: rgba(255,255,255,0.7); text-decoration: none; padding: 12px 20px; display: block; }
|
|
||||||
.sidebar a:hover, .sidebar a.active { background: #343a40; color: white; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2 p-0 sidebar">
|
|
||||||
<div class="p-4 fs-4 fw-bold border-bottom border-secondary">豪软管理</div>
|
|
||||||
<a href="index.php"><i class="bi bi-speedometer2 me-2"></i> 仪表盘</a>
|
|
||||||
<a href="products.php"><i class="bi bi-box-seam me-2"></i> 商品管理</a>
|
|
||||||
<a href="categories.php" class="active"><i class="bi bi-grid me-2"></i> 分类管理</a>
|
|
||||||
<a href="orders.php"><i class="bi bi-cart me-2"></i> 订单管理</a>
|
|
||||||
<a href="settings.php"><i class="bi bi-gear me-2"></i> 站点设置</a>
|
|
||||||
<div class="mt-auto p-3">
|
|
||||||
<a href="../index.php" target="_blank" class="small"><i class="bi bi-house me-1"></i> 返回前台</a>
|
|
||||||
<a href="../logout.php" class="small text-danger"><i class="bi bi-box-arrow-right me-1"></i> 退出</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-10 p-5">
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
||||||
<h2><?php echo $edit_cat ? '编辑分类' : '新增分类'; ?></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card p-4 mb-5">
|
|
||||||
<form method="POST">
|
|
||||||
<?php if ($edit_cat): ?><input type="hidden" name="id" value="<?php echo $edit_cat['id']; ?>"><?php endif; ?>
|
|
||||||
<div class="row g-3">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<label class="form-label">分类名称</label>
|
|
||||||
<input type="text" name="name" class="form-control" value="<?php echo $edit_cat['name'] ?? ''; ?>" required>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5">
|
|
||||||
<label class="form-label">图标 (Bootstrap Icon Class)</label>
|
|
||||||
<input type="text" name="icon" class="form-control" value="<?php echo $edit_cat['icon'] ?? 'bi-box'; ?>" placeholder="bi-wechat">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2 d-flex align-items-end">
|
|
||||||
<button type="submit" class="btn btn-primary w-100"><?php echo $edit_cat ? '更新' : '添加'; ?></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card p-4">
|
|
||||||
<table class="table table-hover align-middle">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>图标</th>
|
|
||||||
<th>分类名称</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($categories as $c): ?>
|
|
||||||
<tr>
|
|
||||||
<td><i class="bi <?php echo $c['icon']; ?> fs-4"></i></td>
|
|
||||||
<td class="fw-bold"><?php echo $c['name']; ?></td>
|
|
||||||
<td>
|
|
||||||
<a href="?edit=<?php echo $c['id']; ?>" class="btn btn-sm btn-outline-info me-2">编辑</a>
|
|
||||||
<a href="?delete=<?php echo $c['id']; ?>" class="btn btn-sm btn-outline-danger" onclick="return confirm('确定删除?')">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
107
admin/index.php
107
admin/index.php
@ -1,107 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'auth.php';
|
|
||||||
|
|
||||||
$stats = [];
|
|
||||||
$stats['orders_count'] = $db->query("SELECT COUNT(*) FROM orders")->fetchColumn();
|
|
||||||
$stats['total_sales'] = $db->query("SELECT SUM(total_amount) FROM orders WHERE status = 'completed'")->fetchColumn() ?: 0;
|
|
||||||
$stats['products_count'] = $db->query("SELECT COUNT(*) FROM products")->fetchColumn();
|
|
||||||
$stats['users_count'] = $db->query("SELECT COUNT(*) FROM users")->fetchColumn();
|
|
||||||
|
|
||||||
$recent_orders = $db->query("SELECT * FROM orders ORDER BY id DESC LIMIT 5")->fetchAll();
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>管理后台 - 豪软世界</title>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
body { background: #f8f9fa; }
|
|
||||||
.sidebar { min-height: 100vh; background: #212529; color: white; }
|
|
||||||
.sidebar a { color: rgba(255,255,255,0.7); text-decoration: none; padding: 12px 20px; display: block; }
|
|
||||||
.sidebar a:hover, .sidebar a.active { background: #343a40; color: white; }
|
|
||||||
.card { border: none; box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075); border-radius: 10px; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2 p-0 sidebar">
|
|
||||||
<div class="p-4 fs-4 fw-bold border-bottom border-secondary">豪软管理</div>
|
|
||||||
<a href="index.php" class="active"><i class="bi bi-speedometer2 me-2"></i> 仪表盘</a>
|
|
||||||
<a href="products.php"><i class="bi bi-box-seam me-2"></i> 商品管理</a>
|
|
||||||
<a href="categories.php"><i class="bi bi-grid me-2"></i> 分类管理</a>
|
|
||||||
<a href="orders.php"><i class="bi bi-cart me-2"></i> 订单管理</a>
|
|
||||||
<a href="settings.php"><i class="bi bi-gear me-2"></i> 站点设置</a>
|
|
||||||
<div class="mt-auto p-3">
|
|
||||||
<a href="../index.php" target="_blank" class="small"><i class="bi bi-house me-1"></i> 返回前台</a>
|
|
||||||
<a href="../logout.php" class="small text-danger"><i class="bi bi-box-arrow-right me-1"></i> 退出</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-10 p-5">
|
|
||||||
<h2 class="mb-4">数据总览</h2>
|
|
||||||
<div class="row g-4 mb-5">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card p-4 bg-primary text-white">
|
|
||||||
<div class="small">累计订单</div>
|
|
||||||
<div class="fs-2 fw-bold"><?php echo $stats['orders_count']; ?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card p-4 bg-success text-white">
|
|
||||||
<div class="small">完成交易 (USDT)</div>
|
|
||||||
<div class="fs-2 fw-bold"><?php echo number_format($stats['total_sales'], 2); ?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card p-4 bg-info text-white">
|
|
||||||
<div class="small">在售商品</div>
|
|
||||||
<div class="fs-2 fw-bold"><?php echo $stats['products_count']; ?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="card p-4 bg-warning text-dark">
|
|
||||||
<div class="small">注册用户</div>
|
|
||||||
<div class="fs-2 fw-bold"><?php echo $stats['users_count']; ?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card p-4">
|
|
||||||
<h5 class="mb-4">最新订单</h5>
|
|
||||||
<table class="table align-middle">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>订单号</th>
|
|
||||||
<th>联系方式</th>
|
|
||||||
<th>金额</th>
|
|
||||||
<th>状态</th>
|
|
||||||
<th>日期</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($recent_orders as $o): ?>
|
|
||||||
<tr>
|
|
||||||
<td><code><?php echo $o['order_no']; ?></code></td>
|
|
||||||
<td><?php echo $o['contact_info']; ?></td>
|
|
||||||
<td><?php echo $o['total_amount']; ?> USDT</td>
|
|
||||||
<td>
|
|
||||||
<span class="badge bg-<?php echo $o['status'] === 'completed' ? 'success' : ($o['status'] === 'pending' ? 'warning' : 'info'); ?>">
|
|
||||||
<?php echo $o['status']; ?>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td><?php echo date('m-d H:i', strtotime($o['created_at'])); ?></td>
|
|
||||||
<td><a href="orders.php?id=<?php echo $o['id']; ?>" class="btn btn-sm btn-outline-primary">查看</a></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
158
admin/orders.php
158
admin/orders.php
@ -1,158 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'auth.php';
|
|
||||||
|
|
||||||
// Handle Status Update
|
|
||||||
if (isset($_POST['update_status'])) {
|
|
||||||
$stmt = $db->prepare("UPDATE orders SET status = ? WHERE id = ?");
|
|
||||||
$stmt->execute([$_POST['status'], $_POST['order_id']]);
|
|
||||||
header("Location: orders.php" . (isset($_GET['id']) ? "?id=".$_POST['order_id'] : ""));
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$view_order = null;
|
|
||||||
if (isset($_GET['id'])) {
|
|
||||||
$stmt = $db->prepare("SELECT * FROM orders WHERE id = ?");
|
|
||||||
$stmt->execute([$_GET['id']]);
|
|
||||||
$view_order = $stmt->fetch();
|
|
||||||
|
|
||||||
if ($view_order) {
|
|
||||||
$stmt = $db->prepare("SELECT oi.*, p.name FROM order_items oi JOIN products p ON oi.product_id = p.id WHERE oi.order_id = ?");
|
|
||||||
$stmt->execute([$view_order['id']]);
|
|
||||||
$view_order['items'] = $stmt->fetchAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$orders = $db->query("SELECT * FROM orders ORDER BY id DESC")->fetchAll();
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>订单管理 - 豪软后台</title>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
body { background: #f8f9fa; }
|
|
||||||
.sidebar { min-height: 100vh; background: #212529; color: white; }
|
|
||||||
.sidebar a { color: rgba(255,255,255,0.7); text-decoration: none; padding: 12px 20px; display: block; }
|
|
||||||
.sidebar a:hover, .sidebar a.active { background: #343a40; color: white; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2 p-0 sidebar">
|
|
||||||
<div class="p-4 fs-4 fw-bold border-bottom border-secondary">豪软管理</div>
|
|
||||||
<a href="index.php"><i class="bi bi-speedometer2 me-2"></i> 仪表盘</a>
|
|
||||||
<a href="products.php"><i class="bi bi-box-seam me-2"></i> 商品管理</a>
|
|
||||||
<a href="categories.php"><i class="bi bi-grid me-2"></i> 分类管理</a>
|
|
||||||
<a href="orders.php" class="active"><i class="bi bi-cart me-2"></i> 订单管理</a>
|
|
||||||
<a href="settings.php"><i class="bi bi-gear me-2"></i> 站点设置</a>
|
|
||||||
<div class="mt-auto p-3">
|
|
||||||
<a href="../index.php" target="_blank" class="small"><i class="bi bi-house me-1"></i> 返回前台</a>
|
|
||||||
<a href="../logout.php" class="small text-danger"><i class="bi bi-box-arrow-right me-1"></i> 退出</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-10 p-5">
|
|
||||||
<?php if ($view_order): ?>
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
||||||
<h2>订单详情: <?php echo $view_order['order_no']; ?></h2>
|
|
||||||
<a href="orders.php" class="btn btn-secondary">返回列表</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row g-4">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card p-4 mb-4">
|
|
||||||
<h5 class="mb-4">商品列表</h5>
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>商品</th>
|
|
||||||
<th>单价</th>
|
|
||||||
<th>数量</th>
|
|
||||||
<th>小计</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($view_order['items'] as $it): ?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo $it['name']; ?></td>
|
|
||||||
<td><?php echo $it['price_usdt']; ?> USDT</td>
|
|
||||||
<td><?php echo $it['quantity']; ?></td>
|
|
||||||
<td class="fw-bold"><?php echo number_format($it['price_usdt'] * $it['quantity'], 2); ?> USDT</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" class="text-end fw-bold">合计金额</td>
|
|
||||||
<td class="text-primary fs-5 fw-bold"><?php echo $view_order['total_amount']; ?> USDT</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="card p-4 mb-4">
|
|
||||||
<h5 class="mb-4">订单状态</h5>
|
|
||||||
<form method="POST">
|
|
||||||
<input type="hidden" name="order_id" value="<?php echo $view_order['id']; ?>">
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="form-label">修改状态</label>
|
|
||||||
<select name="status" class="form-select">
|
|
||||||
<option value="pending" <?php echo $view_order['status'] === 'pending' ? 'selected' : ''; ?>>待付款 (Pending)</option>
|
|
||||||
<option value="paid" <?php echo $view_order['status'] === 'paid' ? 'selected' : ''; ?>>已付款 (Paid)</option>
|
|
||||||
<option value="completed" <?php echo $view_order['status'] === 'completed' ? 'selected' : ''; ?>>已完成 (Completed)</option>
|
|
||||||
<option value="cancelled" <?php echo $view_order['status'] === 'cancelled' ? 'selected' : ''; ?>>已取消 (Cancelled)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<button type="submit" name="update_status" class="btn btn-primary w-100">更新状态</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="card p-4">
|
|
||||||
<h5 class="mb-3">客户信息</h5>
|
|
||||||
<p><strong>联系方式:</strong><br><?php echo $view_order['contact_info']; ?></p>
|
|
||||||
<p><strong>下单时间:</strong><br><?php echo $view_order['created_at']; ?></p>
|
|
||||||
<p><strong>支付方式:</strong><br><?php echo $view_order['payment_method']; ?></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php else: ?>
|
|
||||||
<h2 class="mb-4">订单管理</h2>
|
|
||||||
<div class="card p-4">
|
|
||||||
<table class="table table-hover align-middle">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>订单号</th>
|
|
||||||
<th>联系方式</th>
|
|
||||||
<th>金额</th>
|
|
||||||
<th>状态</th>
|
|
||||||
<th>日期</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($orders as $o): ?>
|
|
||||||
<tr>
|
|
||||||
<td><code><?php echo $o['order_no']; ?></code></td>
|
|
||||||
<td><?php echo $o['contact_info']; ?></td>
|
|
||||||
<td class="fw-bold"><?php echo $o['total_amount']; ?> USDT</td>
|
|
||||||
<td>
|
|
||||||
<span class="badge bg-<?php echo $o['status'] === 'completed' ? 'success' : ($o['status'] === 'pending' ? 'warning' : ($o['status'] === 'paid' ? 'info' : 'danger')); ?>">
|
|
||||||
<?php echo $o['status']; ?>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td><?php echo $o['created_at']; ?></td>
|
|
||||||
<td><a href="?id=<?php echo $o['id']; ?>" class="btn btn-sm btn-outline-primary">查看详情</a></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,186 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'auth.php';
|
|
||||||
|
|
||||||
// Handle Delete
|
|
||||||
if (isset($_GET['delete'])) {
|
|
||||||
$stmt = $db->prepare("DELETE FROM products WHERE id = ?");
|
|
||||||
$stmt->execute([$_GET['delete']]);
|
|
||||||
header("Location: products.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle Add/Edit
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
||||||
$id = $_POST['id'] ?? null;
|
|
||||||
$name = $_POST['name'];
|
|
||||||
$cat_id = $_POST['category_id'];
|
|
||||||
$desc = $_POST['description'];
|
|
||||||
$content = $_POST['content'];
|
|
||||||
$price = $_POST['price_usdt'];
|
|
||||||
$stock = $_POST['stock'];
|
|
||||||
$img = $_POST['image_url'];
|
|
||||||
$is_hot = isset($_POST['is_hot']) ? 1 : 0;
|
|
||||||
$is_active = isset($_POST['is_active']) ? 1 : 0;
|
|
||||||
|
|
||||||
if ($id) {
|
|
||||||
$stmt = $db->prepare("UPDATE products SET name=?, category_id=?, description=?, content=?, price_usdt=?, stock=?, image_url=?, is_hot=?, is_active=? WHERE id=?");
|
|
||||||
$stmt->execute([$name, $cat_id, $desc, $content, $price, $stock, $img, $is_hot, $is_active, $id]);
|
|
||||||
} else {
|
|
||||||
$stmt = $db->prepare("INSERT INTO products (name, category_id, description, content, price_usdt, stock, image_url, is_hot, is_active) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
|
||||||
$stmt->execute([$name, $cat_id, $desc, $content, $price, $stock, $img, $is_hot, $is_active]);
|
|
||||||
}
|
|
||||||
header("Location: products.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$categories = $db->query("SELECT * FROM categories")->fetchAll();
|
|
||||||
$products = $db->query("SELECT p.*, c.name as cat_name FROM products p JOIN categories c ON p.category_id = c.id ORDER BY p.id DESC")->fetchAll();
|
|
||||||
|
|
||||||
$edit_product = null;
|
|
||||||
if (isset($_GET['edit'])) {
|
|
||||||
$stmt = $db->prepare("SELECT * FROM products WHERE id = ?");
|
|
||||||
$stmt->execute([$_GET['edit']]);
|
|
||||||
$edit_product = $stmt->fetch();
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<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; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2 p-0 sidebar">
|
|
||||||
<?php include 'sidebar.php'; ?>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-10 p-4">
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
||||||
<h2><?php echo $edit_product ? '编辑商品' : '商品管理'; ?></h2>
|
|
||||||
<?php if ($edit_product): ?>
|
|
||||||
<a href="products.php" class="btn btn-secondary">添加新商品</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card shadow-sm mb-4">
|
|
||||||
<div class="card-body">
|
|
||||||
<form method="POST">
|
|
||||||
<?php if ($edit_product): ?>
|
|
||||||
<input type="hidden" name="id" value="<?php echo $edit_product['id']; ?>">
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<div class="row g-3">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<label class="form-label">商品名称</label>
|
|
||||||
<input type="text" name="name" class="form-control" value="<?php echo htmlspecialchars($edit_product['name'] ?? ''); ?>" required>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label class="form-label">所属分类</label>
|
|
||||||
<select name="category_id" class="form-select">
|
|
||||||
<?php foreach ($categories as $c): ?>
|
|
||||||
<option value="<?php echo $c['id']; ?>" <?php echo (isset($edit_product['category_id']) && $edit_product['category_id'] == $c['id']) ? 'selected' : ''; ?>>
|
|
||||||
<?php echo $c['name']; ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label class="form-label">价格 (USDT)</label>
|
|
||||||
<input type="number" step="0.01" name="price_usdt" class="form-control" value="<?php echo $edit_product['price_usdt'] ?? ''; ?>" required>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label class="form-label">库存数量</label>
|
|
||||||
<input type="number" name="stock" class="form-control" value="<?php echo $edit_product['stock'] ?? '999'; ?>" required>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<label class="form-label">商品图片 URL</label>
|
|
||||||
<input type="text" name="image_url" class="form-control" value="<?php echo htmlspecialchars($edit_product['image_url'] ?? ''); ?>" required>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 d-flex align-items-end gap-3">
|
|
||||||
<div class="form-check mb-2">
|
|
||||||
<input class="form-check-input" type="checkbox" name="is_hot" value="1" id="isHot" <?php echo (isset($edit_product['is_hot']) && $edit_product['is_hot']) ? 'checked' : ''; ?>>
|
|
||||||
<label class="form-check-label" for="isHot">设为热门推荐</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check mb-2">
|
|
||||||
<input class="form-check-input" type="checkbox" name="is_active" value="1" id="isActive" <?php echo (!isset($edit_product) || $edit_product['is_active']) ? 'checked' : ''; ?>>
|
|
||||||
<label class="form-check-label" for="isActive">上架显示</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<label class="form-label">简短描述 (显示在列表页)</label>
|
|
||||||
<input type="text" name="description" class="form-control" value="<?php echo htmlspecialchars($edit_product['description'] ?? ''); ?>">
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<label class="form-label">详细内容 (显示在详情页)</label>
|
|
||||||
<textarea name="content" class="form-control" rows="5"><?php echo htmlspecialchars($edit_product['content'] ?? ''); ?></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<button type="submit" class="btn btn-primary px-5"><?php echo $edit_product ? '保存修改' : '立即添加'; ?></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card shadow-sm">
|
|
||||||
<div class="card-body">
|
|
||||||
<table class="table table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>ID</th>
|
|
||||||
<th>商品</th>
|
|
||||||
<th>分类</th>
|
|
||||||
<th>价格</th>
|
|
||||||
<th>库存</th>
|
|
||||||
<th>状态</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($products as $p): ?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo $p['id']; ?></td>
|
|
||||||
<td>
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<img src="<?php echo $p['image_url']; ?>" width="32" height="32" class="me-2 rounded">
|
|
||||||
<?php echo $p['name']; ?>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td><?php echo $p['cat_name']; ?></td>
|
|
||||||
<td><?php echo $p['price_usdt']; ?> USDT</td>
|
|
||||||
<td><?php echo $p['stock']; ?></td>
|
|
||||||
<td>
|
|
||||||
<?php if ($p['is_hot']): ?>
|
|
||||||
<span class="badge bg-danger">热门</span>
|
|
||||||
<?php endif; ?>
|
|
||||||
<?php if (!$p['is_active']): ?>
|
|
||||||
<span class="badge bg-secondary">隐藏</span>
|
|
||||||
<?php else: ?>
|
|
||||||
<span class="badge bg-success">显示</span>
|
|
||||||
<?php endif; ?>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href="?edit=<?php echo $p['id']; ?>" class="btn btn-sm btn-outline-primary">编辑</a>
|
|
||||||
<a href="?delete=<?php echo $p['id']; ?>" class="btn btn-sm btn-outline-danger" onclick="return confirm('确定删除?')">删除</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,140 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'auth.php';
|
|
||||||
|
|
||||||
$message = '';
|
|
||||||
|
|
||||||
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 = '设置已成功更新';
|
|
||||||
}
|
|
||||||
|
|
||||||
$settings_raw = $db->query("SELECT * FROM settings ORDER BY key_name 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', 'customer_service_email', 'payment_info'],
|
|
||||||
'API 与 通知' => ['tg_bot_token', 'tg_chat_id']
|
|
||||||
];
|
|
||||||
|
|
||||||
// Check if new settings exist, if not, create them (idempotent)
|
|
||||||
$check_new_settings = ['customer_service_email', 'payment_info'];
|
|
||||||
foreach ($check_new_settings as $new_key) {
|
|
||||||
if (!isset($settings[$new_key])) {
|
|
||||||
$desc = ($new_key == 'customer_service_email') ? '客服邮箱' : '收款信息/备注';
|
|
||||||
$stmt = $db->prepare("INSERT IGNORE INTO settings (key_name, key_value, description) VALUES (?, '', ?)");
|
|
||||||
$stmt->execute([$new_key, $desc]);
|
|
||||||
|
|
||||||
// Refresh settings
|
|
||||||
$settings_raw = $db->query("SELECT * FROM settings ORDER BY key_name ASC")->fetchAll();
|
|
||||||
$settings = [];
|
|
||||||
foreach ($settings_raw as $s) {
|
|
||||||
$settings[$s['key_name']] = $s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<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: #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>
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2 p-0 sidebar">
|
|
||||||
<?php include 'sidebar.php'; ?>
|
|
||||||
</div>
|
|
||||||
<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 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; ?>
|
|
||||||
|
|
||||||
<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' || $key === 'payment_info'): ?>
|
|
||||||
<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'] ?: '#000000'); ?>" 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>
|
|
||||||
</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 端 and 手机端前端页面上。</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>
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
<?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 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: 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> 仪表盘
|
|
||||||
</a>
|
|
||||||
<a href="categories.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'categories.php' ? 'active' : ''; ?>">
|
|
||||||
<i class="bi bi-grid me-2"></i> 分类管理
|
|
||||||
</a>
|
|
||||||
<a href="products.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'products.php' ? 'active' : ''; ?>">
|
|
||||||
<i class="bi bi-box-seam me-2"></i> 商品管理
|
|
||||||
</a>
|
|
||||||
<a href="orders.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'orders.php' ? 'active' : ''; ?>">
|
|
||||||
<i class="bi bi-cart-check me-2"></i> 订单管理
|
|
||||||
</a>
|
|
||||||
<a href="settings.php" class="<?php echo basename($_SERVER['PHP_SELF']) == 'settings.php' ? 'active' : ''; ?>">
|
|
||||||
<i class="bi bi-gear me-2"></i> 系统设置
|
|
||||||
</a>
|
|
||||||
<hr class="mx-3 opacity-25">
|
|
||||||
<a href="../index.php">
|
|
||||||
<i class="bi bi-house me-2"></i> 返回首页
|
|
||||||
</a>
|
|
||||||
<a href="../logout.php">
|
|
||||||
<i class="bi bi-box-arrow-right me-2"></i> 退出登录
|
|
||||||
</a>
|
|
||||||
</nav>
|
|
||||||
@ -1,461 +1,346 @@
|
|||||||
:root {
|
:root {
|
||||||
--primary-color: #ff3399; /* Default pink */
|
--color-bg: #ffffff;
|
||||||
--secondary-color: #ff66b2;
|
--color-text: #1a1a1a;
|
||||||
--accent-color: #0088cc;
|
--color-primary: #2563EB; /* Vibrant Blue */
|
||||||
--bg-light: #fff5f7;
|
--color-secondary: #000000;
|
||||||
--card-bg: #ffffff;
|
--color-accent: #A3E635; /* Lime Green */
|
||||||
--glass-border: rgba(255, 51, 153, 0.1);
|
--color-surface: #f8f9fa;
|
||||||
--text-dark: #1a202c;
|
--font-heading: 'Space Grotesk', sans-serif;
|
||||||
--text-muted: #4a5568;
|
--font-body: 'Inter', sans-serif;
|
||||||
--mobile-primary: #e1251b;
|
--border-width: 2px;
|
||||||
--mobile-accent: #ff9900;
|
--shadow-hard: 5px 5px 0px #000;
|
||||||
|
--shadow-hover: 8px 8px 0px #000;
|
||||||
|
--radius-pill: 50rem;
|
||||||
|
--radius-card: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: var(--bg-light);
|
font-family: var(--font-body);
|
||||||
color: var(--text-dark);
|
background-color: var(--color-bg);
|
||||||
font-family: 'Inter', sans-serif;
|
color: var(--color-text);
|
||||||
background-image:
|
overflow-x: hidden;
|
||||||
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 {
|
h1, h2, h3, h4, h5, h6, .navbar-brand {
|
||||||
background: var(--card-bg);
|
font-family: var(--font-heading);
|
||||||
border: 1px solid var(--glass-border);
|
letter-spacing: -0.03em;
|
||||||
border-radius: 1rem;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Utilities */
|
||||||
|
.text-primary { color: var(--color-primary) !important; }
|
||||||
|
.bg-black { background-color: #000 !important; }
|
||||||
|
.text-white { color: #fff !important; }
|
||||||
|
.shadow-hard { box-shadow: var(--shadow-hard); }
|
||||||
|
.border-2-black { border: var(--border-width) solid #000; }
|
||||||
|
.py-section { padding-top: 5rem; padding-bottom: 5rem; }
|
||||||
|
|
||||||
|
/* Navbar */
|
||||||
.navbar {
|
.navbar {
|
||||||
background: rgba(255, 255, 255, 0.9);
|
background: rgba(255, 255, 255, 0.9);
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
border-bottom: 1px solid var(--glass-border);
|
border-bottom: var(--border-width) solid transparent;
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
transition: all 0.3s;
|
||||||
|
padding-top: 1rem;
|
||||||
|
padding-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar.scrolled {
|
||||||
|
border-bottom-color: #000;
|
||||||
|
padding-top: 0.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-text {
|
||||||
|
font-size: 1.5rem;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
letter-spacing: -0.025em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: var(--primary-color) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
font-weight: 600;
|
font-weight: 500;
|
||||||
font-size: 0.95rem;
|
color: var(--color-text);
|
||||||
color: var(--text-dark) !important;
|
margin-left: 1rem;
|
||||||
transition: color 0.3s ease;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link:hover {
|
.nav-link:hover, .nav-link.active {
|
||||||
color: var(--primary-color) !important;
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons */
|
||||||
|
.btn {
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: var(--font-heading);
|
||||||
|
padding: 0.8rem 2rem;
|
||||||
|
border-radius: var(--radius-pill);
|
||||||
|
border: var(--border-width) solid #000;
|
||||||
|
transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
|
||||||
|
box-shadow: var(--shadow-hard);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
transform: translate(-2px, -2px);
|
||||||
|
box-shadow: var(--shadow-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:active {
|
||||||
|
transform: translate(2px, 2px);
|
||||||
|
box-shadow: 0 0 0 #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
|
background-color: var(--color-primary);
|
||||||
border: none;
|
border-color: #000;
|
||||||
color: white !important;
|
color: #fff;
|
||||||
font-weight: 700;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover {
|
.btn-primary:hover {
|
||||||
background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
|
background-color: #1d4ed8;
|
||||||
transform: translateY(-2px);
|
border-color: #000;
|
||||||
box-shadow: 0 10px 20px rgba(255, 51, 153, 0.2);
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-card {
|
.btn-outline-dark {
|
||||||
overflow: hidden;
|
background-color: #fff;
|
||||||
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-card:hover {
|
.btn-cta {
|
||||||
transform: translateY(-5px);
|
background-color: var(--color-accent);
|
||||||
border-color: var(--primary-color);
|
color: #000;
|
||||||
box-shadow: 0 10px 25px rgba(255, 51, 153, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-img-container {
|
.btn-cta:hover {
|
||||||
aspect-ratio: 1/1;
|
background-color: #8cc629;
|
||||||
overflow: hidden;
|
color: #000;
|
||||||
border-radius: 0.75rem;
|
|
||||||
position: relative;
|
|
||||||
background: #f8fafc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-img {
|
/* Hero Section */
|
||||||
width: 100%;
|
.hero-section {
|
||||||
height: 100%;
|
min-height: 100vh;
|
||||||
object-fit: contain;
|
padding-top: 80px;
|
||||||
padding: 15px;
|
|
||||||
transition: transform 0.5s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-card:hover .product-img {
|
.background-blob {
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge-hot {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
|
||||||
right: 10px;
|
|
||||||
background: var(--primary-color);
|
|
||||||
color: white !important;
|
|
||||||
font-size: 0.7rem;
|
|
||||||
font-weight: 800;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 4px;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.price-tag {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
font-weight: 800;
|
|
||||||
color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link {
|
|
||||||
color: var(--text-muted);
|
|
||||||
text-decoration: none;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-link:hover {
|
|
||||||
color: var(--primary-color);
|
|
||||||
padding-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Carousel Custom Styles */
|
|
||||||
.carousel-inner {
|
|
||||||
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 {
|
|
||||||
height: 100% !important;
|
|
||||||
transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-bg {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
padding: 40px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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;
|
|
||||||
right: 30px;
|
|
||||||
z-index: 1000;
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
background: #0088cc;
|
|
||||||
color: white;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
filter: blur(80px);
|
||||||
align-items: center;
|
opacity: 0.6;
|
||||||
justify-content: center;
|
z-index: 1;
|
||||||
font-size: 30px;
|
|
||||||
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
.blob-1 {
|
||||||
.floating-tg {
|
top: -10%;
|
||||||
bottom: 80px;
|
right: -10%;
|
||||||
right: 20px;
|
width: 600px;
|
||||||
width: 50px;
|
height: 600px;
|
||||||
height: 50px;
|
background: radial-gradient(circle, var(--color-accent), transparent);
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-section {
|
|
||||||
margin-top: 30px;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category-icon-wrapper {
|
|
||||||
width: 55px;
|
|
||||||
height: 55px;
|
|
||||||
border-radius: 18px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.floating-tg:hover {
|
.blob-2 {
|
||||||
transform: scale(1.1) rotate(10deg);
|
bottom: 10%;
|
||||||
color: white;
|
left: -10%;
|
||||||
|
width: 500px;
|
||||||
|
height: 500px;
|
||||||
|
background: radial-gradient(circle, var(--color-primary), transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scrolling Announcement */
|
.highlight-text {
|
||||||
.announcement-container {
|
background: linear-gradient(120deg, transparent 0%, transparent 40%, var(--color-accent) 40%, var(--color-accent) 100%);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% 40%;
|
||||||
|
background-position: 0 88%;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot { color: var(--color-primary); }
|
||||||
|
|
||||||
|
.badge-pill {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
border: 2px solid #000;
|
||||||
|
border-radius: 50px;
|
||||||
|
font-weight: 700;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 4px 4px 0 #000;
|
||||||
|
font-family: var(--font-heading);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Marquee */
|
||||||
|
.marquee-container {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: relative;
|
border-top: 2px solid #000;
|
||||||
|
border-bottom: 2px solid #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.announcement-content {
|
.rotate-divider {
|
||||||
|
transform: rotate(-2deg) scale(1.05);
|
||||||
|
z-index: 10;
|
||||||
|
position: relative;
|
||||||
|
margin-top: -50px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.marquee-content {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-left: 100%;
|
animation: marquee 20s linear infinite;
|
||||||
animation: marquee 25s linear infinite;
|
font-family: var(--font-heading);
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
letter-spacing: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes marquee {
|
@keyframes marquee {
|
||||||
0% { transform: translate(0, 0); }
|
0% { transform: translateX(0); }
|
||||||
100% { transform: translate(-100%, 0); }
|
100% { transform: translateX(-50%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- MOBILE JD/TAOBAO STYLE --- */
|
/* Portfolio Cards */
|
||||||
@media (max-width: 768px) {
|
.project-card {
|
||||||
:root {
|
border: 2px solid #000;
|
||||||
--primary-color: var(--mobile-primary);
|
border-radius: var(--radius-card);
|
||||||
--accent-color: var(--mobile-accent);
|
overflow: hidden;
|
||||||
--bg-light: #f4f4f4;
|
background: #fff;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
box-shadow: var(--shadow-hard);
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-card:hover {
|
||||||
|
transform: translateY(-10px);
|
||||||
|
box-shadow: 8px 8px 0 #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-img-holder {
|
||||||
|
height: 250px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-bottom: 2px solid #000;
|
||||||
|
position: relative;
|
||||||
|
font-size: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.placeholder-art {
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-card:hover .placeholder-art {
|
||||||
|
transform: scale(1.2) rotate(10deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-soft-blue { background-color: #e0f2fe; }
|
||||||
|
.bg-soft-green { background-color: #dcfce7; }
|
||||||
|
.bg-soft-purple { background-color: #f3e8ff; }
|
||||||
|
.bg-soft-yellow { background-color: #fef9c3; }
|
||||||
|
|
||||||
|
.category-tag {
|
||||||
|
position: absolute;
|
||||||
|
top: 15px;
|
||||||
|
right: 15px;
|
||||||
|
background: #000;
|
||||||
|
color: #fff;
|
||||||
|
padding: 5px 12px;
|
||||||
|
border-radius: 20px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body { padding: 1.5rem; }
|
||||||
|
|
||||||
|
.link-arrow {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #000;
|
||||||
|
font-weight: 700;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-arrow i { transition: transform 0.2s; margin-left: 5px; }
|
||||||
|
.link-arrow:hover i { transform: translateX(5px); }
|
||||||
|
|
||||||
|
/* About */
|
||||||
|
.about-image-stack {
|
||||||
|
position: relative;
|
||||||
|
height: 400px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stack-card {
|
||||||
|
position: absolute;
|
||||||
|
width: 80%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: var(--radius-card);
|
||||||
|
border: 2px solid #000;
|
||||||
|
box-shadow: var(--shadow-hard);
|
||||||
|
left: 10%;
|
||||||
|
transform: rotate(-3deg);
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Forms */
|
||||||
|
.form-control {
|
||||||
|
border: 2px solid #000;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
padding: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:focus {
|
||||||
|
box-shadow: 4px 4px 0 var(--color-primary);
|
||||||
|
border-color: #000;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animations */
|
||||||
|
.animate-up {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(30px);
|
||||||
|
animation: fadeUp 0.8s ease forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.delay-100 { animation-delay: 0.1s; }
|
||||||
|
.delay-200 { animation-delay: 0.2s; }
|
||||||
|
|
||||||
|
@keyframes fadeUp {
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Social */
|
||||||
|
.social-links a {
|
||||||
|
transition: transform 0.2s;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.social-links a:hover {
|
||||||
|
transform: scale(1.2) rotate(10deg);
|
||||||
|
color: var(--color-accent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive */
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
.rotate-divider {
|
||||||
|
transform: rotate(0);
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
.hero-section {
|
||||||
background-image: none;
|
padding-top: 120px;
|
||||||
padding-bottom: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
text-align: center;
|
||||||
color: #666;
|
min-height: auto;
|
||||||
text-decoration: none;
|
padding-bottom: 100px;
|
||||||
font-size: 0.7rem;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile-nav-item i {
|
.display-1 { font-size: 3.5rem; }
|
||||||
font-size: 1.4rem;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav-item.active {
|
.blob-1 { width: 300px; height: 300px; right: -20%; }
|
||||||
color: var(--primary-color);
|
.blob-2 { width: 300px; height: 300px; left: -20%; }
|
||||||
}
|
|
||||||
|
|
||||||
/* 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,115 +1,73 @@
|
|||||||
// Cart Management
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
function addToCart(id, name, price, img) {
|
|
||||||
let cart = JSON.parse(localStorage.getItem('cart') || '[]');
|
|
||||||
let found = cart.find(item => item.id === id);
|
|
||||||
|
|
||||||
if (found) {
|
// Smooth scrolling for navigation links
|
||||||
found.qty++;
|
|
||||||
} else {
|
|
||||||
cart.push({ id, name, price, qty: 1, img });
|
|
||||||
}
|
|
||||||
|
|
||||||
localStorage.setItem('cart', JSON.stringify(cart));
|
|
||||||
updateCartBadge();
|
|
||||||
showToast(`${name} 已加入购物车`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateCartBadge() {
|
|
||||||
let cart = JSON.parse(localStorage.getItem('cart') || '[]');
|
|
||||||
let count = cart.reduce((acc, item) => acc + item.qty, 0);
|
|
||||||
|
|
||||||
// Update PC Badge
|
|
||||||
let badge = document.getElementById('cart-badge');
|
|
||||||
if (badge) {
|
|
||||||
if (count > 0) {
|
|
||||||
badge.textContent = count;
|
|
||||||
badge.classList.remove('d-none');
|
|
||||||
} else {
|
|
||||||
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
|
|
||||||
function showToast(message) {
|
|
||||||
let toastContainer = document.getElementById('toast-container');
|
|
||||||
if (!toastContainer) {
|
|
||||||
toastContainer = document.createElement('div');
|
|
||||||
toastContainer.id = 'toast-container';
|
|
||||||
toastContainer.className = 'position-fixed bottom-0 end-0 p-3';
|
|
||||||
toastContainer.style.zIndex = '9999';
|
|
||||||
document.body.appendChild(toastContainer);
|
|
||||||
}
|
|
||||||
|
|
||||||
const toastId = 'toast-' + Date.now();
|
|
||||||
const toastHtml = `
|
|
||||||
<div id="${toastId}" class="toast align-items-center text-white bg-primary border-0 shadow-lg" role="alert" aria-live="assertive" aria-atomic="true">
|
|
||||||
<div class="d-flex">
|
|
||||||
<div class="toast-body fw-bold">
|
|
||||||
<i class="bi bi-check-circle-fill me-2"></i> ${message}
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
toastContainer.insertAdjacentHTML('beforeend', toastHtml);
|
|
||||||
const toastElement = document.getElementById(toastId);
|
|
||||||
const toast = new bootstrap.Toast(toastElement, { delay: 3000 });
|
|
||||||
toast.show();
|
|
||||||
|
|
||||||
toastElement.addEventListener('hidden.bs.toast', () => {
|
|
||||||
toastElement.remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize on load
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
updateCartBadge();
|
|
||||||
|
|
||||||
// Smooth scrolling for anchor links
|
|
||||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||||
anchor.addEventListener('click', function (e) {
|
anchor.addEventListener('click', function (e) {
|
||||||
if (this.getAttribute('href') === '#') return;
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const target = document.querySelector(this.getAttribute('href'));
|
const targetId = this.getAttribute('href');
|
||||||
if (target) {
|
if (targetId === '#') return;
|
||||||
target.scrollIntoView({
|
|
||||||
behavior: 'smooth'
|
const targetElement = document.querySelector(targetId);
|
||||||
|
if (targetElement) {
|
||||||
|
// Close mobile menu if open
|
||||||
|
const navbarToggler = document.querySelector('.navbar-toggler');
|
||||||
|
const navbarCollapse = document.querySelector('.navbar-collapse');
|
||||||
|
if (navbarCollapse.classList.contains('show')) {
|
||||||
|
navbarToggler.click();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scroll with offset
|
||||||
|
const offset = 80;
|
||||||
|
const elementPosition = targetElement.getBoundingClientRect().top;
|
||||||
|
const offsetPosition = elementPosition + window.pageYOffset - offset;
|
||||||
|
|
||||||
|
window.scrollTo({
|
||||||
|
top: offsetPosition,
|
||||||
|
behavior: "smooth"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add animation to cards on scroll
|
// Navbar scroll effect
|
||||||
|
const navbar = document.querySelector('.navbar');
|
||||||
|
window.addEventListener('scroll', () => {
|
||||||
|
if (window.scrollY > 50) {
|
||||||
|
navbar.classList.add('scrolled', 'shadow-sm', 'bg-white');
|
||||||
|
navbar.classList.remove('bg-transparent');
|
||||||
|
} else {
|
||||||
|
navbar.classList.remove('scrolled', 'shadow-sm', 'bg-white');
|
||||||
|
navbar.classList.add('bg-transparent');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Intersection Observer for fade-up animations
|
||||||
const observerOptions = {
|
const observerOptions = {
|
||||||
threshold: 0.1
|
threshold: 0.1,
|
||||||
|
rootMargin: "0px 0px -50px 0px"
|
||||||
};
|
};
|
||||||
|
|
||||||
const observer = new IntersectionObserver((entries) => {
|
const observer = new IntersectionObserver((entries) => {
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if (entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
entry.target.style.opacity = '1';
|
entry.target.classList.add('animate-up');
|
||||||
entry.target.style.transform = 'translateY(0)';
|
entry.target.style.opacity = "1";
|
||||||
|
observer.unobserve(entry.target); // Only animate once
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, observerOptions);
|
}, observerOptions);
|
||||||
|
|
||||||
document.querySelectorAll('.glass-card').forEach(card => {
|
// Select elements to animate (add a class 'reveal' to them in HTML if not already handled by CSS animation)
|
||||||
card.style.opacity = '0';
|
// For now, let's just make sure the hero animations run.
|
||||||
card.style.transform = 'translateY(20px)';
|
// If we want scroll animations, we'd add opacity: 0 to elements in CSS and reveal them here.
|
||||||
card.style.transition = 'all 0.6s cubic-bezier(0.23, 1, 0.32, 1)';
|
// Given the request, the CSS animation I added runs on load for Hero.
|
||||||
|
// Let's make the project cards animate in.
|
||||||
|
|
||||||
|
const projectCards = document.querySelectorAll('.project-card');
|
||||||
|
projectCards.forEach((card, index) => {
|
||||||
|
card.style.opacity = "0";
|
||||||
|
card.style.animationDelay = `${index * 0.1}s`;
|
||||||
observer.observe(card);
|
observer.observe(card);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 642 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 368 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
153
cart.php
153
cart.php
@ -1,153 +0,0 @@
|
|||||||
<?php
|
|
||||||
$page_title = '购物车 - 豪软世界';
|
|
||||||
require_once 'includes/header.php';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<main class="py-5">
|
|
||||||
<div class="container">
|
|
||||||
<h1 class="fw-bold text-white mb-5 d-flex align-items-center gap-3">
|
|
||||||
<i class="bi bi-bag-check text-primary"></i> 您的购物车
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div id="cart-container" class="row g-5">
|
|
||||||
<div class="col-lg-8">
|
|
||||||
<div class="bg-dark bg-opacity-50 rounded-5 border border-secondary border-opacity-25 overflow-hidden">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-dark table-hover mb-0 align-middle">
|
|
||||||
<thead class="bg-white bg-opacity-5">
|
|
||||||
<tr>
|
|
||||||
<th class="ps-4 py-4 border-0">商品信息</th>
|
|
||||||
<th class="py-4 border-0">单价</th>
|
|
||||||
<th class="py-4 border-0">数量</th>
|
|
||||||
<th class="py-4 border-0">小计</th>
|
|
||||||
<th class="pe-4 py-4 border-0 text-end">操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody id="cart-items-body">
|
|
||||||
<!-- JS will populate this -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div id="empty-cart-msg" class="p-5 text-center" style="display:none;">
|
|
||||||
<i class="bi bi-cart-x fs-1 text-muted d-block mb-3"></i>
|
|
||||||
<h5 class="text-white">购物车空空如也</h5>
|
|
||||||
<p class="text-muted">快去选购您心仪的软件吧!</p>
|
|
||||||
<a href="/" class="btn btn-primary mt-3">前往商城</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-lg-4">
|
|
||||||
<div class="bg-dark bg-opacity-50 rounded-5 border border-secondary border-opacity-25 p-4 sticky-top" style="top: 100px; z-index: 10;">
|
|
||||||
<h5 class="text-white fw-bold mb-4">订单摘要</h5>
|
|
||||||
<div class="d-flex justify-content-between mb-3">
|
|
||||||
<span class="text-muted">商品总数</span>
|
|
||||||
<span class="text-white fw-bold" id="summary-count">0</span>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-between mb-4">
|
|
||||||
<span class="text-muted">支付币种</span>
|
|
||||||
<span class="text-primary fw-bold">USDT (TRC20)</span>
|
|
||||||
</div>
|
|
||||||
<hr class="border-secondary opacity-25 mb-4">
|
|
||||||
<div class="d-flex justify-content-between align-items-end mb-5">
|
|
||||||
<span class="text-white">应付总额</span>
|
|
||||||
<div class="text-end">
|
|
||||||
<div class="fs-2 fw-black text-primary" id="summary-total">0.00</div>
|
|
||||||
<div class="text-muted small">含支付手续费 0.00</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="checkout.php" id="checkout-btn" class="btn btn-primary btn-lg w-100 py-3 rounded-3 shadow mb-3">
|
|
||||||
<i class="bi bi-credit-card me-2"></i> 立即下单
|
|
||||||
</a>
|
|
||||||
<div class="text-center">
|
|
||||||
<img src="https://placehold.co/200x40/0f172a/94a3b8?text=TRUSTED+PAYMENTS" alt="Trusted" class="grayscale opacity-50">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
renderCart();
|
|
||||||
});
|
|
||||||
|
|
||||||
function renderCart() {
|
|
||||||
const cart = JSON.parse(localStorage.getItem('cart') || '[]');
|
|
||||||
const body = document.getElementById('cart-items-body');
|
|
||||||
const emptyMsg = document.getElementById('empty-cart-msg');
|
|
||||||
const checkoutBtn = document.getElementById('checkout-btn');
|
|
||||||
|
|
||||||
if (cart.length === 0) {
|
|
||||||
body.innerHTML = '';
|
|
||||||
emptyMsg.style.display = 'block';
|
|
||||||
checkoutBtn.classList.add('disabled');
|
|
||||||
updateSummary(0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
emptyMsg.style.display = 'none';
|
|
||||||
checkoutBtn.classList.remove('disabled');
|
|
||||||
|
|
||||||
let html = '';
|
|
||||||
let total = 0;
|
|
||||||
let count = 0;
|
|
||||||
|
|
||||||
cart.forEach((item, index) => {
|
|
||||||
const subtotal = item.price * item.qty;
|
|
||||||
total += subtotal;
|
|
||||||
count += parseInt(item.qty);
|
|
||||||
|
|
||||||
html += `
|
|
||||||
<tr class="border-bottom border-secondary border-opacity-10">
|
|
||||||
<td class="ps-4 py-4">
|
|
||||||
<div class="d-flex align-items-center gap-3">
|
|
||||||
<div class="text-white fw-bold">${item.name}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="py-4 text-primary fw-bold">${parseFloat(item.price).toFixed(2)}</td>
|
|
||||||
<td class="py-4">
|
|
||||||
<div class="d-flex align-items-center bg-black bg-opacity-25 rounded-2 border border-secondary border-opacity-25" style="width: fit-content;">
|
|
||||||
<button class="btn btn-link text-white p-2" onclick="updateQty(${index}, -1)"><i class="bi bi-dash"></i></button>
|
|
||||||
<span class="px-2 text-white fw-bold">${item.qty}</span>
|
|
||||||
<button class="btn btn-link text-white p-2" onclick="updateQty(${index}, 1)"><i class="bi bi-plus"></i></button>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="py-4 text-white fw-bold">${subtotal.toFixed(2)}</td>
|
|
||||||
<td class="pe-4 py-4 text-end">
|
|
||||||
<button class="btn btn-link text-danger p-0" onclick="removeItem(${index})"><i class="bi bi-trash fs-5"></i></button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
`;
|
|
||||||
});
|
|
||||||
|
|
||||||
body.innerHTML = html;
|
|
||||||
updateSummary(count, total);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateQty(index, delta) {
|
|
||||||
let cart = JSON.parse(localStorage.getItem('cart') || '[]');
|
|
||||||
cart[index].qty = parseInt(cart[index].qty) + delta;
|
|
||||||
if (cart[index].qty < 1) cart[index].qty = 1;
|
|
||||||
localStorage.setItem('cart', JSON.stringify(cart));
|
|
||||||
renderCart();
|
|
||||||
updateCartBadge();
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeItem(index) {
|
|
||||||
let cart = JSON.parse(localStorage.getItem('cart') || '[]');
|
|
||||||
cart.splice(index, 1);
|
|
||||||
localStorage.setItem('cart', JSON.stringify(cart));
|
|
||||||
renderCart();
|
|
||||||
updateCartBadge();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateSummary(count, total) {
|
|
||||||
document.getElementById('summary-count').textContent = count;
|
|
||||||
document.getElementById('summary-total').textContent = total.toFixed(2);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php require_once 'includes/footer.php'; ?>
|
|
||||||
57
category.php
57
category.php
@ -1,57 +0,0 @@
|
|||||||
<?php
|
|
||||||
include 'includes/header.php';
|
|
||||||
|
|
||||||
$id = $_GET['id'] ?? 0;
|
|
||||||
$stmt = db()->prepare("SELECT * FROM categories WHERE id = ?");
|
|
||||||
$stmt->execute([$id]);
|
|
||||||
$cat = $stmt->fetch();
|
|
||||||
|
|
||||||
if (!$cat) {
|
|
||||||
header("Location: index.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch products for this category
|
|
||||||
$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 = ? AND p.is_active = 1 ORDER BY p.id DESC");
|
|
||||||
$stmt->execute([$id]);
|
|
||||||
$cat_products = $stmt->fetchAll();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="row mb-5 align-items-center">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb mb-2">
|
|
||||||
<li class="breadcrumb-item"><a href="index.php" class="text-decoration-none text-muted">首页</a></li>
|
|
||||||
<li class="breadcrumb-item active text-dark" aria-current="page"><?php echo htmlspecialchars($cat['name']); ?></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
<h1 class="fw-bold text-dark mb-0 d-flex align-items-center gap-3">
|
|
||||||
<i class="bi <?php echo $cat['icon'] ?? 'bi-grid'; ?> text-primary"></i>
|
|
||||||
<?php echo htmlspecialchars($cat['name']); ?>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 text-md-end mt-3 mt-md-0">
|
|
||||||
<span class="badge bg-primary bg-opacity-10 text-primary rounded-pill px-4 py-2 border border-primary border-opacity-25"><?php echo count($cat_products); ?> 个商品</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row g-4">
|
|
||||||
<?php if (empty($cat_products)): ?>
|
|
||||||
<div class="col-12 text-center py-5">
|
|
||||||
<div class="glass-card p-5 bg-white shadow-sm">
|
|
||||||
<i class="bi bi-inbox fs-1 text-muted d-block mb-3"></i>
|
|
||||||
<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: ?>
|
|
||||||
<?php foreach ($cat_products as $product): ?>
|
|
||||||
<div class="col-6 col-lg-3">
|
|
||||||
<?php include 'includes/product_card.php'; ?>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
165
checkout.php
165
checkout.php
@ -1,165 +0,0 @@
|
|||||||
<?php
|
|
||||||
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') {
|
|
||||||
$db = db();
|
|
||||||
$payment_method = $_POST['payment_method'] ?? 'USDT (TRC20)';
|
|
||||||
$cart_data = json_decode($_POST['cart_data'], true);
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<main class="py-3 py-lg-5">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<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-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-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">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-5"></i>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="payment_method" value="USDT (TRC20)">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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-3">
|
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
|
||||||
<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" 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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<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') || '[]');
|
|
||||||
|
|
||||||
<?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) {
|
|
||||||
window.location.href = 'index.php';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById('cart-data-input').value = JSON.stringify(cart);
|
|
||||||
|
|
||||||
let html = '';
|
|
||||||
let total = 0;
|
|
||||||
cart.forEach(item => {
|
|
||||||
const subtotal = item.price * item.qty;
|
|
||||||
total += subtotal;
|
|
||||||
html += `
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
require_once 'includes/footer.php';
|
|
||||||
ob_end_flush();
|
|
||||||
?>
|
|
||||||
@ -15,41 +15,3 @@ function db() {
|
|||||||
}
|
}
|
||||||
return $pdo;
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
275
db/install.sql
275
db/install.sql
@ -1,275 +0,0 @@
|
|||||||
/*M!999999\- enable the sandbox mode */
|
|
||||||
-- MariaDB dump 10.19 Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
|
|
||||||
--
|
|
||||||
-- Host: 127.0.0.1 Database: app_38283
|
|
||||||
-- ------------------------------------------------------
|
|
||||||
-- Server version 10.11.14-MariaDB-0+deb12u2
|
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
||||||
/*!40101 SET NAMES utf8mb4 */;
|
|
||||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
||||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
||||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
||||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `categories`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `categories`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `categories` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(255) NOT NULL,
|
|
||||||
`icon` varchar(50) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `categories`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `categories` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `categories` DISABLE KEYS */;
|
|
||||||
INSERT INTO `categories` VALUES
|
|
||||||
(1,'社交账号','bi-people-fill'),
|
|
||||||
(2,'海外社交','bi-globe-central-south-asia'),
|
|
||||||
(3,'AI办公','bi-cpu-fill'),
|
|
||||||
(4,'邮箱工具','bi-envelope-at-fill'),
|
|
||||||
(5,'游戏专区','bi-controller');
|
|
||||||
/*!40000 ALTER TABLE `categories` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `order_items`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `order_items`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `order_items` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`order_id` int(11) NOT NULL,
|
|
||||||
`product_id` int(11) NOT NULL,
|
|
||||||
`quantity` int(11) NOT NULL,
|
|
||||||
`price_usdt` decimal(10,2) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `order_id` (`order_id`),
|
|
||||||
CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `order_items`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `order_items` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `order_items` DISABLE KEYS */;
|
|
||||||
INSERT INTO `order_items` VALUES
|
|
||||||
(1,1,8,1,25.00),
|
|
||||||
(2,2,8,1,25.00),
|
|
||||||
(3,3,8,1,25.00),
|
|
||||||
(4,4,8,1,25.00),
|
|
||||||
(5,5,8,1,25.00);
|
|
||||||
/*!40000 ALTER TABLE `order_items` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `orders`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `orders`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `orders` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`order_no` varchar(50) DEFAULT NULL,
|
|
||||||
`user_id` int(11) DEFAULT NULL,
|
|
||||||
`total_amount` decimal(10,2) DEFAULT NULL,
|
|
||||||
`status` enum('pending','paid','completed','cancelled') DEFAULT 'pending',
|
|
||||||
`payment_method` varchar(20) DEFAULT NULL,
|
|
||||||
`contact_info` varchar(255) DEFAULT NULL,
|
|
||||||
`created_at` timestamp NULL DEFAULT current_timestamp(),
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `order_no` (`order_no`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `orders`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `orders` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `orders` DISABLE KEYS */;
|
|
||||||
INSERT INTO `orders` VALUES
|
|
||||||
(1,'HR20260208071009304',NULL,25.00,'pending','USDT','osafuyanij822@gmail.com','2026-02-08 07:10:09'),
|
|
||||||
(2,'HR20260208074125245',NULL,25.00,'pending','USDT','osafuyanij822@gmail.com','2026-02-08 07:41:25'),
|
|
||||||
(3,'HR20260208080820547',NULL,25.00,'pending','USDT','osafuyanij822@gmail.com','2026-02-08 08:08:20'),
|
|
||||||
(4,'HR20260208080843609',NULL,25.00,'pending','USDT','osafuyanij822@gmail.com','2026-02-08 08:08:43'),
|
|
||||||
(5,'HR20260208082550362',NULL,25.00,'pending','USDT (TRC20)','','2026-02-08 08:25:50');
|
|
||||||
/*!40000 ALTER TABLE `orders` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `products`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `products`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `products` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`category_id` int(11) DEFAULT NULL,
|
|
||||||
`name` varchar(255) NOT NULL,
|
|
||||||
`description` text DEFAULT NULL,
|
|
||||||
`content` text DEFAULT NULL,
|
|
||||||
`price_usdt` decimal(10,2) NOT NULL,
|
|
||||||
`stock` int(11) DEFAULT 0,
|
|
||||||
`image_url` varchar(255) DEFAULT NULL,
|
|
||||||
`is_hot` tinyint(4) DEFAULT 0,
|
|
||||||
`is_active` tinyint(4) DEFAULT 1,
|
|
||||||
`created_at` timestamp NULL DEFAULT current_timestamp(),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `products`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `products` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `products` DISABLE KEYS */;
|
|
||||||
INSERT INTO `products` VALUES
|
|
||||||
(13,2,'Discord 满月老号','高权重/已过验证','Discord 满月老号,纯手工注册,权重极高。已绑定海外手机号并完成邮箱验证。适合加入各种大群、使用各种机器人,不容易被封。发货格式:账号----密码----Token',5.00,999,'https://cdn-icons-png.flaticon.com/512/3670/3670157.png',1,1,'2026-02-08 07:40:15'),
|
|
||||||
(14,2,'TikTok 权重号','千粉/直播权限','TikTok 优质权重老号,拥有1000+真实粉丝,已开通直播权限。适合引流、卖货。包含注册邮箱原始密码。发货格式:账号----密码----邮箱----邮箱密码',15.00,50,'https://cdn-icons-png.flaticon.com/512/3046/3046121.png',1,1,'2026-02-08 07:40:15'),
|
|
||||||
(15,3,'ChatGPT Plus 共享号','GPT-4o/稳定独享','ChatGPT Plus 会员共享号,支持最新的 GPT-4o 模型,DALL-E 3 生成图片。稳定不掉线,封号包赔。发货格式:邮箱----密码----Token',10.00,100,'https://cdn-icons-png.flaticon.com/512/12222/12222588.png',1,1,'2026-02-08 07:40:15'),
|
|
||||||
(16,1,'小红书 优质老号','带粉/无违规','小红书优质权重账号,注册时间长,无任何违规记录。适合做博主、引流。',8.00,200,'https://images.pexels.com/photos/5077039/pexels-photo-5077039.jpeg?auto=compress&cs=tinysrgb&w=200',1,1,'2026-02-08 07:40:15'),
|
|
||||||
(17,1,'抖音 权重老号','实名/可直播','抖音实名优质号,高权重,搜索排名靠前。',12.00,100,'https://images.pexels.com/photos/5081914/pexels-photo-5081914.jpeg?auto=compress&cs=tinysrgb&w=200',1,1,'2026-02-08 07:40:15'),
|
|
||||||
(18,2,'Instagram 极品老号','带粉丝/发帖稳','Instagram 2-5年老号,带少量粉丝,权重极高,发帖不容易被屏蔽。',6.00,300,'https://cdn-icons-png.flaticon.com/512/174/174855.png',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(19,2,'Telegram 协议号','API/Hash格式','TG 协议号,支持各路协议软件登录。',3.00,5000,'https://cdn-icons-png.flaticon.com/512/2111/2111646.png',1,1,'2026-02-08 07:40:15'),
|
|
||||||
(20,2,'WhatsApp 活跃号','直登号/耐用','WhatsApp 长期活跃号,不容易封禁。',4.50,1000,'https://cdn-icons-png.flaticon.com/512/733/733585.png',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(21,1,'WeChat 微信老号','稳定/不封号','微信老号,已过实名,朋友圈活跃。',25.00,20,'https://cdn-icons-png.flaticon.com/512/733/733641.png',1,1,'2026-02-08 07:40:15'),
|
|
||||||
(22,1,'QQ 极品老号','等级高/带Q币','QQ 10年老号,皇冠等级,适合收藏。',18.00,10,'https://cdn-icons-png.flaticon.com/512/3536/3536647.png',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(23,4,'Gmail 优质新号','独享/带辅助','Gmail 全新号,独享注册,带辅助邮箱。',1.50,2000,'https://cdn-icons-png.flaticon.com/512/281/281769.png',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(24,4,'Outlook 混合号','便宜/量大','Outlook 邮箱,适合批量注册。',0.50,10000,'https://cdn-icons-png.flaticon.com/512/732/732200.png',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(25,2,'Snapchat 满月号','高权重/耐封','Snapchat 满月账号,高权重。',4.00,500,'https://cdn-icons-png.flaticon.com/512/3670/3670174.png',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(26,2,'LINE 台湾/日本号','已验证/直登','LINE 账号,已完成手机验证。',7.00,100,'https://cdn-icons-png.flaticon.com/512/124/124025.png',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(27,1,'知乎 权重号','高质量/老号','知乎高质量账号,适合引流。',5.50,200,'https://images.pexels.com/photos/267350/pexels-photo-267350.jpeg?auto=compress&cs=tinysrgb&w=200',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(28,1,'豆瓣小组 进群号','免审/高活跃','豆瓣老号,已进各种大组,权重高。',6.50,150,'https://images.pexels.com/photos/159868/book-read-old-literature-159868.jpeg?auto=compress&cs=tinysrgb&w=200',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(29,2,'Amino 活跃号','全球版/稳定','Amino 账号,稳定耐用。',4.00,300,'https://images.pexels.com/photos/1038914/pexels-photo-1038914.jpeg?auto=compress&cs=tinysrgb&w=200',0,1,'2026-02-08 07:40:15'),
|
|
||||||
(30,1,'Twitter 独享账号','高权重 Twitter 独享账号,已过手机验证。',NULL,15.00,99,'https://images.pexels.com/photos/267399/pexels-photo-267399.jpeg?auto=compress&cs=tinysrgb&w=200',1,1,'2026-02-08 08:23:13'),
|
|
||||||
(31,1,'Instagram 老号','2020年注册 Instagram 老号,高权重。',NULL,12.00,50,'https://cdn-icons-png.flaticon.com/512/174/174855.png',0,1,'2026-02-08 08:23:13'),
|
|
||||||
(32,3,'Midjourney 订阅','Midjourney 标准版按月订阅,独立账号。',NULL,30.00,10,'https://images.pexels.com/photos/1748386/pexels-photo-1748386.jpeg?auto=compress&cs=tinysrgb&w=200',1,1,'2026-02-08 08:23:13'),
|
|
||||||
(33,3,'Claude 3.5 Sonnet','Claude Pro 订阅,体验最强 AI 模型。',NULL,25.00,20,'https://images.pexels.com/photos/8386440/pexels-photo-8386440.jpeg?auto=compress&cs=tinysrgb&w=200',0,1,'2026-02-08 08:23:13'),
|
|
||||||
(34,3,'Notion AI 升级','Notion AI 永久功能开启。',NULL,10.00,100,'https://images.pexels.com/photos/590022/pexels-photo-590022.jpeg?auto=compress&cs=tinysrgb&w=200',0,1,'2026-02-08 08:23:13'),
|
|
||||||
(35,4,'Yahoo 优质老号','Yahoo 经典邮箱,高权重老号',NULL,1.50,500,'https://cdn-icons-png.flaticon.com/512/732/732264.png',0,1,'2026-02-08 08:23:13'),
|
|
||||||
(36,4,'ProtonMail 旗舰版','加密邮箱 ProtonMail 尊享版。',NULL,8.00,30,'https://cdn-icons-png.flaticon.com/512/5968/5968538.png',1,1,'2026-02-08 08:23:13');
|
|
||||||
/*!40000 ALTER TABLE `products` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `settings`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `settings`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `settings` (
|
|
||||||
`key_name` varchar(50) NOT NULL,
|
|
||||||
`key_value` text DEFAULT NULL,
|
|
||||||
`description` text DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`key_name`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `settings`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `settings` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
|
|
||||||
INSERT INTO `settings` VALUES
|
|
||||||
('copyright','© 2026 豪软世界 - 全球领先的数字软件服务商','版权信息'),
|
|
||||||
('notice','欢迎来到豪软世界,官方客服TG:@zhangshihao818','公告内容'),
|
|
||||||
('site_name','豪软世界','网站名称'),
|
|
||||||
('tg_support','https://t.me/zhangshihao818','Telegram客服链接'),
|
|
||||||
('usdt_address','Txxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx','USDT-TRC20收款地址');
|
|
||||||
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `site_settings`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `site_settings`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `site_settings` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`setting_key` varchar(50) DEFAULT NULL,
|
|
||||||
`setting_value` text DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `setting_key` (`setting_key`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `site_settings`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `site_settings` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `site_settings` DISABLE KEYS */;
|
|
||||||
INSERT INTO `site_settings` VALUES
|
|
||||||
(1,'site_name','豪软世界'),
|
|
||||||
(2,'tg_link','https://t.me/zhangshihao818'),
|
|
||||||
(3,'copyright','© 2026 豪软世界 - 专业软件与账号服务商');
|
|
||||||
/*!40000 ALTER TABLE `site_settings` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `users`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `users`;
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8mb4 */;
|
|
||||||
CREATE TABLE `users` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`username` varchar(50) NOT NULL,
|
|
||||||
`password` varchar(255) NOT NULL,
|
|
||||||
`email` varchar(100) DEFAULT NULL,
|
|
||||||
`role` enum('user','admin') DEFAULT 'user',
|
|
||||||
`created_at` timestamp NULL DEFAULT current_timestamp(),
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `username` (`username`),
|
|
||||||
UNIQUE KEY `email` (`email`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `users`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `users` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
|
||||||
INSERT INTO `users` VALUES
|
|
||||||
(1,'admin','$2y$10$ZjgjjPtVlM/nb7A8.fu0weXlqK1Vs5xWGgFO/zDk3rqpQzLOztmf2','admin@example.com','admin','2026-02-08 07:03:56');
|
|
||||||
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
||||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
||||||
|
|
||||||
-- Dump completed on 2026-02-08 8:51:56
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
-- Clean up existing data to avoid duplicates if re-run
|
|
||||||
DELETE FROM products;
|
|
||||||
DELETE FROM categories;
|
|
||||||
|
|
||||||
-- Categories
|
|
||||||
INSERT INTO categories (id, name, icon) VALUES
|
|
||||||
(1, '社交账号', 'bi-people-fill'),
|
|
||||||
(2, '海外社交', 'bi-globe-central-south-asia'),
|
|
||||||
(3, 'AI办公', 'bi-cpu-fill'),
|
|
||||||
(4, '邮箱工具', 'bi-envelope-at-fill'),
|
|
||||||
(5, '游戏专区', 'bi-controller');
|
|
||||||
|
|
||||||
-- Products
|
|
||||||
INSERT INTO products (name, category_id, description, content, price_usdt, stock, image_url, is_hot) VALUES
|
|
||||||
('Discord 满月老号', 2, '高权重/已过验证', 'Discord 满月老号,纯手工注册,权重极高。已绑定海外手机号并完成邮箱验证。适合加入各种大群、使用各种机器人,不容易被封。发货格式:账号----密码----Token', 5.00, 999, 'https://cdn-icons-png.flaticon.com/512/3670/3670157.png', 1),
|
|
||||||
('TikTok 权重号', 2, '千粉/直播权限', 'TikTok 优质权重老号,拥有1000+真实粉丝,已开通直播权限。适合引流、卖货。包含注册邮箱原始密码。发货格式:账号----密码----邮箱----邮箱密码', 15.00, 50, 'https://cdn-icons-png.flaticon.com/512/3046/3046121.png', 1),
|
|
||||||
('ChatGPT Plus 共享号', 3, 'GPT-4o/稳定独享', 'ChatGPT Plus 会员共享号,支持最新的 GPT-4o 模型,DALL-E 3 生成图片。稳定不掉线,封号包赔。发货格式:邮箱----密码----Token', 10.00, 100, 'https://cdn-icons-png.flaticon.com/512/12222/12222588.png', 1),
|
|
||||||
('小红书 优质老号', 1, '带粉/无违规', '小红书优质权重账号,注册时间长,无任何违规记录。适合做博主、引流。', 8.00, 200, 'https://placehold.co/400x400/ff2442/ffffff?text=Xiaohongshu', 1),
|
|
||||||
('抖音 权重老号', 1, '实名/可直播', '抖音实名优质号,高权重,搜索排名靠前。', 12.00, 100, 'https://placehold.co/400x400/000000/ffffff?text=Douyin', 1),
|
|
||||||
('Instagram 极品老号', 2, '带粉丝/发帖稳', 'Instagram 2-5年老号,带少量粉丝,权重极高,发帖不容易被屏蔽。', 6.00, 300, 'https://cdn-icons-png.flaticon.com/512/174/174855.png', 0),
|
|
||||||
('Telegram 协议号', 2, 'API/Hash格式', 'TG 协议号,支持各路协议软件登录。', 3.00, 5000, 'https://cdn-icons-png.flaticon.com/512/2111/2111646.png', 1),
|
|
||||||
('WhatsApp 活跃号', 2, '直登号/耐用', 'WhatsApp 长期活跃号,不容易封禁。', 4.50, 1000, 'https://cdn-icons-png.flaticon.com/512/733/733585.png', 0),
|
|
||||||
('WeChat 微信老号', 1, '稳定/不封号', '微信老号,已过实名,朋友圈活跃。', 25.00, 20, 'https://cdn-icons-png.flaticon.com/512/733/733585.png', 1),
|
|
||||||
('QQ 极品老号', 1, '等级高/带Q币', 'QQ 10年老号,皇冠等级,适合收藏。', 18.00, 10, 'https://cdn-icons-png.flaticon.com/512/3536/3536647.png', 0),
|
|
||||||
('Gmail 优质新号', 4, '独享/带辅助', 'Gmail 全新号,独享注册,带辅助邮箱。', 1.50, 2000, 'https://cdn-icons-png.flaticon.com/512/281/281769.png', 0),
|
|
||||||
('Outlook 混合号', 4, '便宜/量大', 'Outlook 邮箱,适合批量注册。', 0.50, 10000, 'https://cdn-icons-png.flaticon.com/512/732/732200.png', 0),
|
|
||||||
('Snapchat 满月号', 2, '高权重/耐封', 'Snapchat 满月账号,高权重。', 4.00, 500, 'https://cdn-icons-png.flaticon.com/512/3670/3670174.png', 0),
|
|
||||||
('LINE 台湾/日本号', 2, '已验证/直登', 'LINE 账号,已完成手机验证。', 7.00, 100, 'https://cdn-icons-png.flaticon.com/512/124/124025.png', 0),
|
|
||||||
('知乎 权重号', 1, '高质量/老号', '知乎高质量账号,适合引流。', 5.50, 200, 'https://placehold.co/400x400/0084ff/ffffff?text=Zhihu', 0),
|
|
||||||
('豆瓣小组 进群号', 1, '免审/高活跃', '豆瓣老号,已进各种大组,权重高。', 6.50, 150, 'https://placehold.co/400x400/00b51d/ffffff?text=Douban', 0),
|
|
||||||
('Amino 活跃号', 2, '全球版/稳定', 'Amino 账号,稳定耐用。', 4.00, 300, 'https://placehold.co/400x400/121212/ffffff?text=Amino', 0);
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
-- Add is_active column to products table if it doesn't exist
|
|
||||||
SET @dbname = DATABASE();
|
|
||||||
SET @tablename = 'products';
|
|
||||||
SET @columnname = 'is_active';
|
|
||||||
SET @preparedStatement = (SELECT IF(
|
|
||||||
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
|
|
||||||
WHERE TABLE_SCHEMA = @dbname
|
|
||||||
AND TABLE_NAME = @tablename
|
|
||||||
AND COLUMN_NAME = @columnname) > 0,
|
|
||||||
'SELECT 1',
|
|
||||||
'ALTER TABLE products ADD COLUMN is_active TINYINT(4) DEFAULT 1 AFTER is_hot'
|
|
||||||
));
|
|
||||||
PREPARE stmt FROM @preparedStatement;
|
|
||||||
EXECUTE stmt;
|
|
||||||
DEALLOCATE PREPARE stmt;
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
-- 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', '豪软世界', '网站名称');
|
|
||||||
77
faq.php
77
faq.php
@ -1,77 +0,0 @@
|
|||||||
<?php
|
|
||||||
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 text-dark">常见问题</h1>
|
|
||||||
<p class="text-muted fs-5">您可能遇到的一些疑问,我们在这里为您解答</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="glass-card p-5">
|
|
||||||
<div class="accordion accordion-flush bg-transparent" id="faqAccordion">
|
|
||||||
|
|
||||||
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
|
|
||||||
<h2 class="accordion-header">
|
|
||||||
<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>
|
|
||||||
<div id="faq1" class="accordion-collapse collapse" data-bs-parent="#faqAccordion">
|
|
||||||
<div class="accordion-body text-muted lh-lg">
|
|
||||||
支付成功后,系统会自动跳转到订单详情页显示卡密。如果您不小心关闭了页面,可以通过页面顶部的“订单查询”功能,输入您的订单号随时找回卡密。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
|
|
||||||
<h2 class="accordion-header">
|
|
||||||
<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>
|
|
||||||
<div id="faq2" class="accordion-collapse collapse" data-bs-parent="#faqAccordion">
|
|
||||||
<div class="accordion-body text-muted lh-lg">
|
|
||||||
通常是因为区块链确认延迟或者支付金额不匹配。请确保您支付的是精确的金额。如果 10 分钟后仍未发货,请截图您的支付记录联系我们的 Telegram 客服。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
|
|
||||||
<h2 class="accordion-header">
|
|
||||||
<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>
|
|
||||||
<div id="faq3" class="accordion-collapse collapse" data-bs-parent="#faqAccordion">
|
|
||||||
<div class="accordion-body text-muted lh-lg">
|
|
||||||
首先请检查您的网络环境(是否使用了干净的代理 IP)。如果确认是账号问题,请在购买后 24 小时内联系客服进行更换。请勿在同一个 IP 下大量登录账号,这会触发官方风控。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="accordion-item bg-transparent border-bottom border-secondary py-3">
|
|
||||||
<h2 class="accordion-header">
|
|
||||||
<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>
|
|
||||||
<div id="faq4" class="accordion-collapse collapse" data-bs-parent="#faqAccordion">
|
|
||||||
<div class="accordion-body text-muted lh-lg">
|
|
||||||
可以。如果您有大批量、长期稳定的供货需求,请直接联系我们的 TG 商务,我们将为您提供更具竞争力的批发价格和定制化服务。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
53
help.php
53
help.php
@ -1,53 +0,0 @@
|
|||||||
<?php
|
|
||||||
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>
|
|
||||||
<p class="text-muted fs-5">手把手教您如何高效、安全地使用我们的服务</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row g-4">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="glass-card p-5 h-100">
|
|
||||||
<div class="d-flex align-items-center mb-4">
|
|
||||||
<i class="bi bi-person-plus-fill fs-1 text-primary me-3"></i>
|
|
||||||
<h3 class="text-white mb-0">新手入门</h3>
|
|
||||||
</div>
|
|
||||||
<ul class="list-unstyled text-muted lh-lg">
|
|
||||||
<li class="mb-3"><i class="bi bi-check2-circle text-primary me-2"></i> <strong>环境准备:</strong> 使用账号前请确保代理 IP 纯净。</li>
|
|
||||||
<li class="mb-3"><i class="bi bi-check2-circle text-primary me-2"></i> <strong>购买流程:</strong> 选择商品 -> 填写联系方式 -> 扫码支付。</li>
|
|
||||||
<li class="mb-3"><i class="bi bi-check2-circle text-primary me-2"></i> <strong>提取卡密:</strong> 支付后网页自动弹出,或使用订单查询。</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="glass-card p-5 h-100">
|
|
||||||
<div class="d-flex align-items-center mb-4">
|
|
||||||
<i class="bi bi-shield-lock-fill fs-1 text-success me-3"></i>
|
|
||||||
<h3 class="text-white mb-0">安全建议</h3>
|
|
||||||
</div>
|
|
||||||
<ul class="list-unstyled text-muted lh-lg">
|
|
||||||
<li class="mb-3"><i class="bi bi-check2-circle text-success me-2"></i> <strong>即买即改:</strong> 拿到账号后请第一时间修改密码和密保。</li>
|
|
||||||
<li class="mb-3"><i class="bi bi-check2-circle text-success me-2"></i> <strong>指纹浏览器:</strong> 批量登录建议使用 AdsPower 或比特浏览器。</li>
|
|
||||||
<li class="mb-3"><i class="bi bi-check2-circle text-success me-2"></i> <strong>避免并发:</strong> 刚登录的老号请勿立即群发信息。</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="glass-card p-5">
|
|
||||||
<h3 class="text-white mb-4">关于发货</h3>
|
|
||||||
<p class="text-muted lh-lg mb-4">我们的平台采用 <strong class="text-white">API 直连支付系统</strong> 和 <strong class="text-white">全自动库存发货系统</strong>。无论是在深夜还是凌晨,只要您完成支付,系统都会在确认到账后的 30 秒内通过页面展示和后台记录双向交付。如果您在支付过程中遇到断网、浏览器崩溃,也不必担心,只需记录下您的订单号,通过“订单查询”即可找回。</p>
|
|
||||||
<div class="alert bg-black border-secondary p-4 d-flex align-items-center mb-0">
|
|
||||||
<i class="bi bi-info-circle-fill text-info fs-3 me-3"></i>
|
|
||||||
<span class="text-muted">提示:如果长时间未收到卡密,请检查您的钱包是否已经完成区块确认,或直接联系右侧客服咨询。</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
<?php
|
|
||||||
$footer_text = $settings['footer_text'] ?? ('© ' . date('Y') . ' ' . $site_name . '. All rights reserved.');
|
|
||||||
$current_page = basename($_SERVER['PHP_SELF']);
|
|
||||||
$cs_email = $settings['customer_service_email'] ?? 'support@hao-soft.world';
|
|
||||||
?>
|
|
||||||
</div> <!-- end container mt-4 from header -->
|
|
||||||
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<?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">
|
|
||||||
<i class="bi bi-telegram me-2"></i> 联系客服
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 col-lg-2">
|
|
||||||
<h6 class="text-dark fw-bold mb-3">产品中心</h6>
|
|
||||||
<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="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">点击跳转</a>
|
|
||||||
</p>
|
|
||||||
<p class="text-muted small mb-2">
|
|
||||||
<i class="bi bi-envelope text-primary me-2"></i> 售后邮箱:<?php echo htmlspecialchars($cs_email); ?>
|
|
||||||
</p>
|
|
||||||
<div class="mt-4">
|
|
||||||
<img src="https://img.shields.io/badge/USDT-Accepted-blue?style=flat-square&logo=tether" alt="USDT">
|
|
||||||
<img src="https://img.shields.io/badge/Security-Protected-green?style=flat-square&logo=bitdefender" alt="Security">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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"><?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>
|
|
||||||
<a href="#" class="text-muted small text-decoration-none">退款政策</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</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>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- 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?v=<?php echo time(); ?>"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,154 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once __DIR__ . '/../db/config.php';
|
|
||||||
if (session_status() === PHP_SESSION_NONE) {
|
|
||||||
session_start();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch site settings
|
|
||||||
try {
|
|
||||||
$stmt = db()->query("SELECT key_name, key_value FROM settings");
|
|
||||||
$settings = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
$settings = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$site_name = $settings['site_name'] ?? '豪软世界';
|
|
||||||
$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">
|
|
||||||
<head>
|
|
||||||
<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="<?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 -->
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
|
|
||||||
<!-- Google Fonts -->
|
|
||||||
<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;
|
|
||||||
}
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.site-logo-img { height: 30px; }
|
|
||||||
.navbar-brand { font-size: 1.1rem !important; }
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- 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="<?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">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNav">
|
|
||||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="index.php">网站首页</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="orders.php">订单查询</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="help.php">帮助中心</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="faq.php">常见问题</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="<?php echo $tg_link; ?>" target="_blank">联系客服</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<form class="d-flex search-container me-3" action="search.php" method="GET">
|
|
||||||
<input class="form-control me-2" type="search" name="q" placeholder="搜索软件、账号..." aria-label="Search">
|
|
||||||
<button class="btn btn-outline-primary" type="submit"><i class="bi bi-search"></i></button>
|
|
||||||
</form>
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<a href="cart.php" class="btn btn-outline-primary position-relative me-3">
|
|
||||||
<i class="bi bi-cart3"></i>
|
|
||||||
<span id="cart-badge" class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger d-none">
|
|
||||||
0
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<?php if (isset($_SESSION['user_id']) && $_SESSION['role'] === 'admin'): ?>
|
|
||||||
<a href="admin/index.php" class="btn btn-sm btn-outline-dark">后台管理</a>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</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">
|
|
||||||
<div class="d-flex align-items-center">
|
|
||||||
<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']; ?>
|
|
||||||
<?php if (!empty($settings['tg_channel'])): ?>
|
|
||||||
官方频道:<?php echo $settings['tg_channel']; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
.site-logo {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
background: linear-gradient(135deg, #ff3399, #ff007a);
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-right: 10px;
|
|
||||||
position: relative;
|
|
||||||
box-shadow: 0 0 10px rgba(255, 51, 153, 0.5);
|
|
||||||
}
|
|
||||||
.site-logo .bi-globe-americas {
|
|
||||||
color: white;
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
.site-logo .bi-airplane-fill {
|
|
||||||
color: #00f2ff;
|
|
||||||
font-size: 14px;
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
right: 5px;
|
|
||||||
transform: rotate(45deg);
|
|
||||||
text-shadow: 0 0 5px rgba(0, 242, 255, 0.8);
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
<!-- 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']; ?>">
|
|
||||||
<?php if (isset($product['is_hot']) && $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['category_name'] ?? ''; ?></span>
|
|
||||||
<h5 class="text-dark mb-3">
|
|
||||||
<a href="product.php?id=<?php echo $product['id']; ?>" class="text-dark text-decoration-none hover-primary fw-bold">
|
|
||||||
<?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>
|
|
||||||
|
|
||||||
<!-- 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>
|
|
||||||
354
index.php
354
index.php
@ -1,212 +1,150 @@
|
|||||||
<?php
|
<?php
|
||||||
include 'includes/header.php';
|
declare(strict_types=1);
|
||||||
|
@ini_set('display_errors', '1');
|
||||||
|
@error_reporting(E_ALL);
|
||||||
|
@date_default_timezone_set('UTC');
|
||||||
|
|
||||||
// Fetch site settings
|
$phpVersion = PHP_VERSION;
|
||||||
$db = db();
|
$now = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
// 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 AND p.is_active = 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 AND p.is_active = 1 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();
|
|
||||||
?>
|
?>
|
||||||
|
<!doctype html>
|
||||||
<!-- Carousel Section -->
|
<html lang="en">
|
||||||
<div class="carousel-section mb-4 mb-lg-5">
|
<head>
|
||||||
<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">
|
<meta charset="utf-8" />
|
||||||
<div class="carousel-indicators">
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="0" class="active" aria-current="true"></button>
|
<title>New Style</title>
|
||||||
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="1"></button>
|
<?php
|
||||||
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="2"></button>
|
// Read project preview data from environment
|
||||||
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="3"></button>
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||||||
<button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="4"></button>
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||||
</div>
|
?>
|
||||||
<div class="carousel-inner h-100">
|
<?php if ($projectDescription): ?>
|
||||||
<!-- Slide 1 -->
|
<!-- Meta description -->
|
||||||
<div class="carousel-item active h-100" data-bs-interval="2000">
|
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
||||||
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #fff0f5 0%, #ffe4e1 100%);">
|
<!-- Open Graph meta tags -->
|
||||||
<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>
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||||
<div class="text-center position-relative px-3" style="z-index: 10;">
|
<!-- Twitter meta tags -->
|
||||||
<h2 class="display-4 carousel-title mb-3">专业软件账号中心</h2>
|
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||||
<div class="mb-4 pc-only">
|
<?php endif; ?>
|
||||||
<span class="carousel-subtitle">全球主流平台 · 即买即发 · 稳定质保</span>
|
<?php if ($projectImageUrl): ?>
|
||||||
</div>
|
<!-- Open Graph image -->
|
||||||
<div class="d-flex justify-content-center gap-2">
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||||
<a href="#market" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">立即探索</a>
|
<!-- Twitter image -->
|
||||||
</div>
|
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||||
</div>
|
<?php endif; ?>
|
||||||
</div>
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
</div>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<!-- Slide 2 -->
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
<style>
|
||||||
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);">
|
:root {
|
||||||
<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>
|
--bg-color-start: #6a11cb;
|
||||||
<div class="text-center position-relative px-3" style="z-index: 10;">
|
--bg-color-end: #2575fc;
|
||||||
<h2 class="display-4 carousel-title mb-3">AI 办公提效神器</h2>
|
--text-color: #ffffff;
|
||||||
<div class="mb-4 pc-only">
|
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||||
<span class="carousel-subtitle" style="color: #006064 !important;">ChatGPT, Midjourney 独享权限</span>
|
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||||
</div>
|
}
|
||||||
<a href="category.php?id=3" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">立即升级</a>
|
body {
|
||||||
</div>
|
margin: 0;
|
||||||
</div>
|
font-family: 'Inter', sans-serif;
|
||||||
</div>
|
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||||
<!-- Slide 3 -->
|
color: var(--text-color);
|
||||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
display: flex;
|
||||||
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);">
|
justify-content: center;
|
||||||
<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>
|
align-items: center;
|
||||||
<div class="text-center position-relative px-3" style="z-index: 10;">
|
min-height: 100vh;
|
||||||
<h2 class="display-4 carousel-title mb-3">全自动 24H 交付</h2>
|
text-align: center;
|
||||||
<div class="mb-4 pc-only">
|
overflow: hidden;
|
||||||
<span class="carousel-subtitle" style="color: #4a148c !important;">卡密信息实时到达订单中心</span>
|
position: relative;
|
||||||
</div>
|
}
|
||||||
<a href="orders.php" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">查询订单</a>
|
body::before {
|
||||||
</div>
|
content: '';
|
||||||
</div>
|
position: absolute;
|
||||||
</div>
|
top: 0;
|
||||||
<!-- Slide 4 -->
|
left: 0;
|
||||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
width: 100%;
|
||||||
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);">
|
height: 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>
|
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
||||||
<div class="text-center position-relative px-3" style="z-index: 10;">
|
animation: bg-pan 20s linear infinite;
|
||||||
<h2 class="display-4 carousel-title mb-3">多平台社交引流</h2>
|
z-index: -1;
|
||||||
<div class="mb-4 pc-only">
|
}
|
||||||
<span class="carousel-subtitle" style="color: #e65100 !important;">海外主流社媒,安全稳定不封号</span>
|
@keyframes bg-pan {
|
||||||
</div>
|
0% { background-position: 0% 0%; }
|
||||||
<a href="category.php?id=2" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">进入专区</a>
|
100% { background-position: 100% 100%; }
|
||||||
</div>
|
}
|
||||||
</div>
|
main {
|
||||||
</div>
|
padding: 2rem;
|
||||||
<!-- Slide 5 -->
|
}
|
||||||
<div class="carousel-item h-100" data-bs-interval="2000">
|
.card {
|
||||||
<div class="carousel-bg h-100" style="background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);">
|
background: var(--card-bg-color);
|
||||||
<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>
|
border: 1px solid var(--card-border-color);
|
||||||
<div class="text-center position-relative px-3" style="z-index: 10;">
|
border-radius: 16px;
|
||||||
<h2 class="display-4 carousel-title mb-3">安全加密 支付无忧</h2>
|
padding: 2rem;
|
||||||
<div class="mb-4 pc-only">
|
backdrop-filter: blur(20px);
|
||||||
<span class="carousel-subtitle" style="color: #1b5e20 !important;">支持 USDT 匿名支付,保护隐私</span>
|
-webkit-backdrop-filter: blur(20px);
|
||||||
</div>
|
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||||
<a href="faq.php" class="btn btn-primary px-5 py-3 rounded-pill shadow-lg">了解更多</a>
|
}
|
||||||
</div>
|
.loader {
|
||||||
</div>
|
margin: 1.25rem auto 1.25rem;
|
||||||
</div>
|
width: 48px;
|
||||||
</div>
|
height: 48px;
|
||||||
|
border: 3px solid rgba(255, 255, 255, 0.25);
|
||||||
|
border-top-color: #fff;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes spin {
|
||||||
|
from { transform: rotate(0deg); }
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
.hint {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
.sr-only {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px; height: 1px;
|
||||||
|
padding: 0; margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(0, 0, 0, 0);
|
||||||
|
white-space: nowrap; border: 0;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 0.5rem 0;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
code {
|
||||||
|
background: rgba(0,0,0,0.2);
|
||||||
|
padding: 2px 6px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 1rem;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<div class="card">
|
||||||
|
<h1>Analyzing your requirements and generating your website…</h1>
|
||||||
|
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||||
|
<span class="sr-only">Loading…</span>
|
||||||
|
</div>
|
||||||
|
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
|
||||||
|
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
||||||
|
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</main>
|
||||||
|
<footer>
|
||||||
<!-- Categories Quick Links (Improved Style) -->
|
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||||
<div class="row g-2 g-lg-4 mb-4 mb-lg-5 px-1">
|
</footer>
|
||||||
<?php foreach ($categories as $cat): ?>
|
</body>
|
||||||
<div class="col-3 col-md">
|
</html>
|
||||||
<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>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="market">
|
|
||||||
<!-- 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>
|
|
||||||
<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="text-primary text-decoration-none small">查看全部 <i class="bi bi-chevron-right"></i></a>
|
|
||||||
</div>
|
|
||||||
<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'; ?>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 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'; ?>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 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'; ?>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Email Tools -->
|
|
||||||
<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 ($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 (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-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-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-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>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
|
|||||||
70
login.php
70
login.php
@ -1,70 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once 'db/config.php';
|
|
||||||
session_start();
|
|
||||||
$db = db();
|
|
||||||
|
|
||||||
$error = '';
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
||||||
$username = $_POST['username'];
|
|
||||||
$password = $_POST['password'];
|
|
||||||
|
|
||||||
$stmt = $db->prepare("SELECT * FROM users WHERE username = ?");
|
|
||||||
$stmt->execute([$username]);
|
|
||||||
$user = $stmt->fetch();
|
|
||||||
|
|
||||||
if ($user && password_verify($password, $user['password'])) {
|
|
||||||
$_SESSION['user_id'] = $user['id'];
|
|
||||||
$_SESSION['username'] = $user['username'];
|
|
||||||
$_SESSION['role'] = $user['role'];
|
|
||||||
|
|
||||||
if ($user['role'] === 'admin') {
|
|
||||||
$_SESSION['admin_logged_in'] = true;
|
|
||||||
header("Location: admin/index.php");
|
|
||||||
} else {
|
|
||||||
header("Location: index.php");
|
|
||||||
}
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$error = '用户名或密码错误';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$page_title = '登录 - 豪软世界';
|
|
||||||
require_once 'includes/header.php';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<main class="py-5">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<div class="bg-dark bg-opacity-50 rounded-5 border border-secondary border-opacity-25 p-5 shadow-lg">
|
|
||||||
<div class="text-center mb-5">
|
|
||||||
<div class="logo-box mx-auto mb-3" style="width: 50px; height: 50px; font-size: 1.8rem;">H</div>
|
|
||||||
<h2 class="text-white fw-bold">欢迎回来</h2>
|
|
||||||
<p class="text-muted">登录以管理您的订单和账户</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if ($error): ?>
|
|
||||||
<div class="alert alert-danger bg-danger bg-opacity-10 border-0 text-danger rounded-4 small">
|
|
||||||
<i class="bi bi-exclamation-circle me-2"></i> <?php echo $error; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<form method="POST">
|
|
||||||
<div class="mb-4">
|
|
||||||
<label class="form-label text-white small fw-bold">用户名</label>
|
|
||||||
<input type="text" name="username" class="form-control bg-black bg-opacity-50 border-secondary border-opacity-50 text-white p-3 rounded-3" placeholder="输入用户名" required>
|
|
||||||
</div>
|
|
||||||
<div class="mb-5">
|
|
||||||
<label class="form-label text-white small fw-bold">密码</label>
|
|
||||||
<input type="password" name="password" class="form-control bg-black bg-opacity-50 border-secondary border-opacity-50 text-white p-3 rounded-3" placeholder="输入密码" required>
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg w-100 py-3 rounded-3 shadow mb-4">立即登录</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<?php require_once 'includes/footer.php'; ?>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
session_destroy();
|
|
||||||
header('Location: index.php');
|
|
||||||
exit;
|
|
||||||
?>
|
|
||||||
125
orders.php
125
orders.php
@ -1,125 +0,0 @@
|
|||||||
<?php
|
|
||||||
include 'includes/header.php';
|
|
||||||
|
|
||||||
$search_order = null;
|
|
||||||
$error = '';
|
|
||||||
|
|
||||||
if (isset($_GET['order_no'])) {
|
|
||||||
$stmt = db()->prepare("SELECT * FROM orders WHERE order_no = ?");
|
|
||||||
$stmt->execute([$_GET['order_no']]);
|
|
||||||
$search_order = $stmt->fetch();
|
|
||||||
|
|
||||||
if (!$search_order) {
|
|
||||||
$error = '未找到该订单,请检查订单号是否正确';
|
|
||||||
} else {
|
|
||||||
$stmt = db()->prepare("SELECT oi.*, p.name FROM order_items oi JOIN products p ON oi.product_id = p.id WHERE oi.order_id = ?");
|
|
||||||
$stmt->execute([$search_order['id']]);
|
|
||||||
$search_order['items'] = $stmt->fetchAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-lg-10">
|
|
||||||
<div class="text-center mb-5">
|
|
||||||
<h1 class="display-4 fw-bold">订单查询</h1>
|
|
||||||
<p class="text-muted fs-5">输入您的订单号实时追踪订单状态与交付进度</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="glass-card p-4 mb-5">
|
|
||||||
<form action="orders.php" method="GET" class="row g-3">
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input type="text" name="order_no" class="form-control bg-dark border-secondary text-white p-3" placeholder="输入订单号 (例如: HR...)" value="<?php echo htmlspecialchars($_GET['order_no'] ?? ''); ?>" required>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg w-100 py-3">立即查询</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if ($error): ?>
|
|
||||||
<div class="alert glass-card text-danger border-danger p-4 text-center">
|
|
||||||
<i class="bi bi-exclamation-triangle-fill fs-3 d-block mb-2"></i>
|
|
||||||
<?php echo $error; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if ($search_order): ?>
|
|
||||||
<div class="glass-card overflow-hidden">
|
|
||||||
<div class="p-4 border-bottom border-secondary d-flex justify-content-between align-items-center" style="background: rgba(0, 242, 255, 0.05);">
|
|
||||||
<div>
|
|
||||||
<span class="text-muted small d-block">订单编号</span>
|
|
||||||
<h5 class="text-white fw-bold mb-0"><?php echo $search_order['order_no']; ?></h5>
|
|
||||||
</div>
|
|
||||||
<div class="text-end">
|
|
||||||
<span class="text-muted small d-block">订单状态</span>
|
|
||||||
<span class="badge rounded-pill bg-<?php echo $search_order['status'] === 'completed' ? 'success' : ($search_order['status'] === 'pending' ? 'warning' : 'info'); ?> px-4 py-2">
|
|
||||||
<?php echo strtoupper($search_order['status']); ?>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-4 p-lg-5">
|
|
||||||
<div class="table-responsive mb-5">
|
|
||||||
<table class="table table-dark table-borderless align-middle">
|
|
||||||
<thead class="border-bottom border-secondary">
|
|
||||||
<tr>
|
|
||||||
<th class="ps-0 py-3 text-muted">商品名称</th>
|
|
||||||
<th class="py-3 text-muted">数量</th>
|
|
||||||
<th class="py-3 text-muted text-end">小计</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($search_order['items'] as $it): ?>
|
|
||||||
<tr>
|
|
||||||
<td class="ps-0 py-4 fw-bold text-white"><?php echo $it['name']; ?></td>
|
|
||||||
<td class="py-4 text-white"><?php echo $it['quantity']; ?></td>
|
|
||||||
<td class="py-4 text-end fw-bold text-primary"><?php echo $it['price_usdt'] * $it['quantity']; ?> USDT</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr class="border-top border-secondary">
|
|
||||||
<td colspan="2" class="ps-0 py-4 text-white fs-4 fw-bold">订单总额</td>
|
|
||||||
<td class="py-4 text-end text-primary display-6 fw-bold"><?php echo $search_order['total_amount']; ?> USDT</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row g-4 mb-5">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="glass-card p-4 h-100">
|
|
||||||
<span class="text-muted small d-block mb-2">联系信息</span>
|
|
||||||
<div class="text-white fs-5"><?php echo htmlspecialchars($search_order['contact_info']); ?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="glass-card p-4 h-100">
|
|
||||||
<span class="text-muted small d-block mb-2">下单时间</span>
|
|
||||||
<div class="text-white fs-5"><?php echo $search_order['created_at']; ?></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if ($search_order['status'] === 'pending'): ?>
|
|
||||||
<div class="d-grid mb-4">
|
|
||||||
<a href="payment.php?order_no=<?php echo $search_order['order_no']; ?>" class="btn btn-primary btn-lg py-3">
|
|
||||||
<i class="bi bi-credit-card me-2"></i> 立即去支付
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<p class="text-muted mb-4">如果您对订单有任何疑问,请随时联系我们的客服。</p>
|
|
||||||
<a href="<?php echo $settings['tg_support'] ?? '#'; ?>?text=订单咨询: <?php echo $search_order['order_no']; ?>" target="_blank" class="btn btn-outline-info rounded-pill px-5">
|
|
||||||
<i class="bi bi-telegram me-2"></i> 联系客服
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
152
payment.php
152
payment.php
@ -1,152 +0,0 @@
|
|||||||
<?php
|
|
||||||
include 'includes/header.php';
|
|
||||||
|
|
||||||
$order_no = $_GET['order_no'] ?? '';
|
|
||||||
$db = db();
|
|
||||||
$stmt = $db->prepare("SELECT * FROM orders WHERE order_no = ?");
|
|
||||||
$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-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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch total quantity
|
|
||||||
$stmt = $db->prepare("SELECT SUM(quantity) as total_qty FROM order_items WHERE order_id = ?");
|
|
||||||
$stmt->execute([$order['id']]);
|
|
||||||
$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);
|
|
||||||
$payment_info = $settings['payment_info'] ?? '';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<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-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-3 p-lg-5">
|
|
||||||
<div class="row g-4 g-lg-5">
|
|
||||||
<div class="col-lg-5 text-center">
|
|
||||||
<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-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" style="font-size: 0.7rem;"><i class="bi bi-info-circle me-1"></i> 请在倒计时结束前完成支付</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-lg-7">
|
|
||||||
<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-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-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-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>
|
|
||||||
|
|
||||||
<?php if (!empty($payment_info)): ?>
|
|
||||||
<div class="p-3 rounded-4 border border-warning border-opacity-10 bg-warning bg-opacity-10 mb-4">
|
|
||||||
<h6 class="text-warning fw-bold mb-2 small"><i class="bi bi-exclamation-triangle-fill me-2"></i> 收款备注:</h6>
|
|
||||||
<div class="text-muted small lh-sm" style="font-size: 0.75rem;">
|
|
||||||
<?php echo nl2br(htmlspecialchars($payment_info)); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<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-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> 我已完成支付,联系客服
|
|
||||||
</button>
|
|
||||||
<a href="index.php" class="btn btn-outline-secondary py-2 rounded-pill small">
|
|
||||||
返回首页
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function copyAddress() {
|
|
||||||
var copyText = document.getElementById("usdtAddress");
|
|
||||||
copyText.select();
|
|
||||||
copyText.setSelectionRange(0, 99999);
|
|
||||||
navigator.clipboard.writeText(copyText.value);
|
|
||||||
|
|
||||||
const btn = document.querySelector('button[onclick="copyAddress()"]');
|
|
||||||
const originalText = btn.innerHTML;
|
|
||||||
btn.innerHTML = '已复制';
|
|
||||||
btn.classList.replace('btn-primary', 'btn-success');
|
|
||||||
setTimeout(() => {
|
|
||||||
btn.innerHTML = originalText;
|
|
||||||
btn.classList.replace('btn-success', 'btn-primary');
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Countdown Timer
|
|
||||||
let timeLeft = 60 * 60;
|
|
||||||
const countdownEl = document.getElementById('countdown');
|
|
||||||
|
|
||||||
const timer = setInterval(() => {
|
|
||||||
const minutes = Math.floor(timeLeft / 60);
|
|
||||||
let seconds = timeLeft % 60;
|
|
||||||
seconds = seconds < 10 ? '0' + seconds : seconds;
|
|
||||||
countdownEl.innerHTML = `${minutes}:${seconds}`;
|
|
||||||
if (timeLeft <= 0) {
|
|
||||||
clearInterval(timer);
|
|
||||||
countdownEl.innerHTML = "EXPIRED";
|
|
||||||
}
|
|
||||||
timeLeft--;
|
|
||||||
}, 1000);
|
|
||||||
|
|
||||||
document.getElementById('checkPaymentBtn').addEventListener('click', function() {
|
|
||||||
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}`;
|
|
||||||
window.open(tgLink, '_blank');
|
|
||||||
});
|
|
||||||
|
|
||||||
localStorage.removeItem('cart');
|
|
||||||
if (typeof updateCartBadge === 'function') updateCartBadge();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
83
policy.php
83
policy.php
@ -1,83 +0,0 @@
|
|||||||
<?php
|
|
||||||
include 'includes/header.php';
|
|
||||||
|
|
||||||
$type = $_GET['type'] ?? 'payment';
|
|
||||||
$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 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-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-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-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-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-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>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="mb-5">
|
|
||||||
<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-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-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-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>
|
|
||||||
<li>购买后超过 24 小时未登录核对的订单。</li>
|
|
||||||
<li>由于官方政策调整导致的系统性风控。</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="mb-5">
|
|
||||||
<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>
|
|
||||||
</section>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
95
product.php
95
product.php
@ -1,95 +0,0 @@
|
|||||||
<?php
|
|
||||||
include 'includes/header.php';
|
|
||||||
|
|
||||||
$id = $_GET['id'] ?? 0;
|
|
||||||
$stmt = db()->prepare("SELECT p.*, c.name as category_name FROM products p JOIN categories c ON p.category_id = c.id WHERE p.id = ? AND p.is_active = 1");
|
|
||||||
$stmt->execute([$id]);
|
|
||||||
$product = $stmt->fetch();
|
|
||||||
|
|
||||||
if (!$product) {
|
|
||||||
echo "<div class='container py-5 text-center'><div class='alert alert-danger p-5 rounded-4 shadow-sm border-0'><i class='bi bi-exclamation-triangle fs-1 d-block mb-3'></i><h4 class='fw-bold'>商品不存在或已下架</h4><p class='mb-4'>抱歉,您访问的商品可能已被下架或删除。</p><a href='index.php' class='btn btn-primary px-5 rounded-pill'>返回商城首页</a></div></div>";
|
|
||||||
include 'includes/footer.php';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="row g-5">
|
|
||||||
<div class="col-lg-5">
|
|
||||||
<div class="glass-card p-3 bg-white shadow-sm">
|
|
||||||
<img src="<?php echo $product['image_url']; ?>" class="img-fluid rounded-4 w-100" alt="<?php echo $product['name']; ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-7">
|
|
||||||
<div class="glass-card p-5 h-100 bg-white shadow-sm">
|
|
||||||
<nav aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="index.php" class="text-decoration-none text-muted">首页</a></li>
|
|
||||||
<li class="breadcrumb-item"><a href="category.php?id=<?php echo $product['category_id']; ?>" class="text-decoration-none text-muted"><?php echo $product['category_name']; ?></a></li>
|
|
||||||
<li class="breadcrumb-item active text-dark" aria-current="page"><?php echo $product['name']; ?></li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
<h1 class="display-4 mb-4 text-dark fw-bold"><?php echo $product['name']; ?></h1>
|
|
||||||
<div class="mb-4">
|
|
||||||
<span class="badge bg-primary bg-opacity-10 text-primary px-3 py-2 fs-6 mb-2"><?php echo $product['category_name']; ?></span>
|
|
||||||
<p class="fs-4 text-muted mt-3"><?php echo $product['description']; ?></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex align-items-center mb-5">
|
|
||||||
<div class="me-5">
|
|
||||||
<span class="text-muted d-block mb-1 small">建议零售价</span>
|
|
||||||
<span class="display-5 fw-bold" style="color: var(--primary-color);"><?php echo $product['price_usdt']; ?> <small class="fs-4">USDT</small></span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="text-muted d-block mb-1 small">库存状态</span>
|
|
||||||
<span class="badge <?php echo $product['stock'] > 0 ? 'bg-success bg-opacity-10 text-success' : 'bg-danger bg-opacity-10 text-danger'; ?> fs-6 py-2 px-4 rounded-pill border border-<?php echo $product['stock'] > 0 ? 'success' : 'danger'; ?> border-opacity-25">
|
|
||||||
<?php echo $product['stock'] > 0 ? '现货供应 ('.$product['stock'].')' : '缺货中'; ?>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-grid gap-3 d-md-flex">
|
|
||||||
<button class="btn btn-primary btn-lg px-5 flex-grow-1" 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 me-2"></i> 加入购物车
|
|
||||||
</button>
|
|
||||||
<a href="checkout.php?direct_id=<?php echo $product['id']; ?>" class="btn btn-outline-primary btn-lg px-5 flex-grow-1">
|
|
||||||
<i class="bi bi-lightning-fill me-2"></i> 立即购买
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-4 d-grid">
|
|
||||||
<a href="<?php echo $tg_link; ?>" target="_blank" class="btn btn-outline-info btn-lg">
|
|
||||||
<i class="bi bi-chat-dots me-2"></i> 联系客服购买
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-5 pt-5 border-top border-light">
|
|
||||||
<h5 class="text-dark mb-4">服务承诺</h5>
|
|
||||||
<div class="row text-center g-4">
|
|
||||||
<div class="col-4">
|
|
||||||
<i class="bi bi-shield-lock fs-2 mb-2 d-block" style="color: var(--primary-color);"></i>
|
|
||||||
<span class="small text-muted">安全支付</span>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<i class="bi bi-lightning-charge fs-2 mb-2 d-block" style="color: var(--primary-color);"></i>
|
|
||||||
<span class="small text-muted">自动发货</span>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<i class="bi bi-headset fs-2 mb-2 d-block" style="color: var(--primary-color);"></i>
|
|
||||||
<span class="small text-muted">售后保障</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-5">
|
|
||||||
<div class="glass-card p-5 bg-white shadow-sm">
|
|
||||||
<h3 class="text-dark mb-4">详细描述</h3>
|
|
||||||
<div class="text-muted lh-lg">
|
|
||||||
<?php echo nl2br($product['content'] ?? '暂无详细描述。'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
<?php
|
|
||||||
header("Location: index.php");
|
|
||||||
exit;
|
|
||||||
?>
|
|
||||||
42
search.php
42
search.php
@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
include 'includes/header.php';
|
|
||||||
|
|
||||||
$q = $_GET['q'] ?? '';
|
|
||||||
$results = [];
|
|
||||||
if (!empty($q)) {
|
|
||||||
$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 ?) AND p.is_active = 1 ORDER BY p.id DESC");
|
|
||||||
$stmt->execute(['%'.$q.'%', '%'.$q.'%', '%'.$q.'%']);
|
|
||||||
$results = $stmt->fetchAll();
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="row mb-5 align-items-center">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<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">
|
|
||||||
<span class="badge bg-primary bg-opacity-25 text-primary rounded-pill px-4 py-2 border border-primary border-opacity-25"><?php echo count($results); ?> 个相关结果</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if (empty($results)): ?>
|
|
||||||
<div class="text-center py-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-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-2 g-lg-4">
|
|
||||||
<?php foreach ($results as $product): ?>
|
|
||||||
<div class="col-6 col-lg-3">
|
|
||||||
<?php include 'includes/product_card.php'; ?>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php include 'includes/footer.php'; ?>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user