Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
019834cdd5 | ||
|
|
602648171f | ||
|
|
d80d0a04ab | ||
|
|
7174e34e88 |
153
admin.php
Normal file
153
admin.php
Normal file
@ -0,0 +1,153 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['admin_logged_in'])) {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
$pdo = db();
|
||||
|
||||
$message = '';
|
||||
|
||||
// Handle Settings Update
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_settings'])) {
|
||||
$updates = [
|
||||
'site_title' => $_POST['site_title'],
|
||||
'site_logo' => $_POST['site_logo'],
|
||||
'tg_link' => $_POST['tg_link'],
|
||||
'footer_copy' => $_POST['footer_copy'],
|
||||
'watermark_text' => $_POST['watermark_text']
|
||||
];
|
||||
|
||||
foreach ($updates as $key => $val) {
|
||||
$stmt = $pdo->prepare("UPDATE settings SET setting_value = ? WHERE setting_key = ?");
|
||||
$stmt->execute([$val, $key]);
|
||||
}
|
||||
$message = '设置更新成功!';
|
||||
}
|
||||
|
||||
// Get current settings
|
||||
$settings = [];
|
||||
$stmt = $pdo->query("SELECT setting_key, setting_value FROM settings");
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$settings[$row['setting_key']] = $row['setting_value'];
|
||||
}
|
||||
$site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.jpg';
|
||||
?>
|
||||
<!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 htmlspecialchars($settings['site_title'] ?? '财神组聊天框架'); ?></title>
|
||||
<link rel="icon" type="image/jpeg" href="<?php echo htmlspecialchars($site_logo); ?>">
|
||||
<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.1/font/bootstrap-icons.css">
|
||||
<style>
|
||||
:root { --admin-sidebar-width: 240px; }
|
||||
body { background: #f8f9fa; }
|
||||
.sidebar {
|
||||
height: 100vh;
|
||||
background: #212529;
|
||||
color: #fff;
|
||||
padding-top: 20px;
|
||||
position: fixed;
|
||||
width: var(--admin-sidebar-width);
|
||||
z-index: 100;
|
||||
}
|
||||
.sidebar a { color: #adb5bd; text-decoration: none; padding: 12px 20px; display: block; transition: 0.2s; }
|
||||
.sidebar a:hover, .sidebar a.active { background: #343a40; color: #fff; border-left: 4px solid #d4af37; }
|
||||
.main-content {
|
||||
margin-left: var(--admin-sidebar-width);
|
||||
padding: 40px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 5px 0;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
justify-content: flex-start;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
|
||||
}
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
padding: 80px 15px 20px 15px;
|
||||
}
|
||||
.sidebar a {
|
||||
padding: 10px 15px;
|
||||
white-space: nowrap;
|
||||
font-size: 0.85rem;
|
||||
border-left: none !important;
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
.sidebar a.active {
|
||||
border-bottom: 3px solid #d4af37;
|
||||
}
|
||||
.sidebar hr, .sidebar .text-center { display: none !important; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="sidebar">
|
||||
<div class="text-center mb-4 px-3">
|
||||
<?php if($site_logo): ?>
|
||||
<img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;">
|
||||
<?php endif; ?>
|
||||
<h5 class="text-warning">财神组管理</h5>
|
||||
</div>
|
||||
<a href="admin.php" class="active"><i class="bi bi-gear-fill me-2"></i> 系统设置</a>
|
||||
<a href="admin_steps.php"><i class="bi bi-chat-dots-fill me-2"></i> 话术管理</a>
|
||||
<a href="index.php" target="_blank"><i class="bi bi-eye me-2"></i> 查看前台</a>
|
||||
<a href="logout.php"><i class="bi bi-box-arrow-right me-2"></i> 退出登录</a>
|
||||
</div>
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid">
|
||||
<h3>系统设置</h3>
|
||||
<?php if($message): ?>
|
||||
<div class="alert alert-success mt-3"><?php echo $message; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card shadow-sm mt-4">
|
||||
<div class="card-body p-4">
|
||||
<form method="POST">
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-bold">网站名称</label>
|
||||
<input type="text" name="site_title" class="form-control" value="<?php echo htmlspecialchars($settings['site_title'] ?? ''); ?>">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label fw-bold">网站 Logo/Favicon 路径</label>
|
||||
<input type="text" name="site_logo" class="form-control" value="<?php echo htmlspecialchars($settings['site_logo'] ?? ''); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">Telegram 客服链接</label>
|
||||
<input type="text" name="tg_link" class="form-control" value="<?php echo htmlspecialchars($settings['tg_link'] ?? ''); ?>">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">底部版权信息</label>
|
||||
<textarea name="footer_copy" class="form-control" rows="2"><?php echo htmlspecialchars($settings['footer_copy'] ?? ''); ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">全屏水印文字</label>
|
||||
<input type="text" name="watermark_text" class="form-control" value="<?php echo htmlspecialchars($settings['watermark_text'] ?? ''); ?>">
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<button type="submit" name="update_settings" class="btn btn-warning px-5 fw-bold">保存全局设置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
226
admin_steps.php
Normal file
226
admin_steps.php
Normal file
@ -0,0 +1,226 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (!isset($_SESSION['admin_logged_in'])) {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
$pdo = db();
|
||||
|
||||
// Get settings for favicon and logo
|
||||
$stmt = $pdo->query("SELECT setting_key, setting_value FROM settings");
|
||||
$settings = [];
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$settings[$row['setting_key']] = $row['setting_value'];
|
||||
}
|
||||
$site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.jpg';
|
||||
|
||||
$message = '';
|
||||
$edit_day = isset($_GET['edit']) ? (int)$_GET['edit'] : 0;
|
||||
|
||||
// Handle Content Update
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_step'])) {
|
||||
$day = (int)$_POST['day_number'];
|
||||
$stmt = $pdo->prepare("UPDATE steps SET
|
||||
title = ?, what_to_chat = ?, how_to_chat = ?, why_to_chat = ?,
|
||||
correct_example = ?, wrong_example = ?, correct_explanation = ?,
|
||||
wrong_explanation = ?, image_url = ?
|
||||
WHERE day_number = ?");
|
||||
|
||||
$stmt->execute([
|
||||
$_POST['title'], $_POST['what_to_chat'], $_POST['how_to_chat'], $_POST['why_to_chat'],
|
||||
$_POST['correct_example'], $_POST['wrong_example'], $_POST['correct_explanation'],
|
||||
$_POST['wrong_explanation'], $_POST['image_url'], $day
|
||||
]);
|
||||
$message = "第 {$day} 天的内容更新成功!";
|
||||
$edit_day = 0;
|
||||
}
|
||||
|
||||
// Fetch all steps
|
||||
$steps = $pdo->query("SELECT * FROM steps ORDER BY day_number ASC")->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
// Fetch specific step for editing
|
||||
$current_step = null;
|
||||
if ($edit_day > 0) {
|
||||
foreach ($steps as $s) {
|
||||
if ($s['day_number'] == $edit_day) {
|
||||
$current_step = $s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!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 htmlspecialchars($settings['site_title'] ?? '财神组聊天框架'); ?></title>
|
||||
<link rel="icon" type="image/jpeg" href="<?php echo htmlspecialchars($site_logo); ?>">
|
||||
<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.1/font/bootstrap-icons.css">
|
||||
<style>
|
||||
:root { --admin-sidebar-width: 240px; }
|
||||
body { background: #f8f9fa; }
|
||||
.sidebar {
|
||||
height: 100vh;
|
||||
background: #212529;
|
||||
color: #fff;
|
||||
padding-top: 20px;
|
||||
position: fixed;
|
||||
width: var(--admin-sidebar-width);
|
||||
z-index: 100;
|
||||
}
|
||||
.sidebar a { color: #adb5bd; text-decoration: none; padding: 12px 20px; display: block; transition: 0.2s; }
|
||||
.sidebar a:hover, .sidebar a.active { background: #343a40; color: #fff; border-left: 4px solid #d4af37; }
|
||||
.main-content {
|
||||
margin-left: var(--admin-sidebar-width);
|
||||
padding: 40px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 5px 0;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
justify-content: flex-start;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
|
||||
}
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
padding: 80px 15px 20px 15px;
|
||||
}
|
||||
.sidebar a {
|
||||
padding: 10px 15px;
|
||||
white-space: nowrap;
|
||||
font-size: 0.85rem;
|
||||
border-left: none !important;
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
.sidebar a.active {
|
||||
border-bottom: 3px solid #d4af37;
|
||||
}
|
||||
.sidebar hr, .sidebar .text-center { display: none !important; }
|
||||
}
|
||||
.card-header { font-weight: bold; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="sidebar">
|
||||
<div class="text-center mb-4 px-3">
|
||||
<?php if($site_logo): ?>
|
||||
<img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="img-fluid mb-2" style="max-height: 60px; border-radius: 8px;">
|
||||
<?php endif; ?>
|
||||
<h5 class="text-warning">财神组管理</h5>
|
||||
</div>
|
||||
<a href="admin.php"><i class="bi bi-gear-fill me-2"></i> 系统设置</a>
|
||||
<a href="admin_steps.php" class="active"><i class="bi bi-chat-dots-fill me-2"></i> 话术管理</a>
|
||||
<a href="index.php" target="_blank"><i class="bi bi-eye me-2"></i> 查看前台</a>
|
||||
<a href="logout.php"><i class="bi bi-box-arrow-right me-2"></i> 退出登录</a>
|
||||
</div>
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h3>话术管理</h3>
|
||||
</div>
|
||||
|
||||
<?php if($message): ?>
|
||||
<div class="alert alert-success"><?php echo $message; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($current_step): ?>
|
||||
<div class="card shadow-sm mb-5">
|
||||
<div class="card-header bg-dark text-white d-flex justify-content-between">
|
||||
<span>正在编辑:第 <?php echo $current_step['day_number']; ?> 天</span>
|
||||
<a href="admin_steps.php" class="text-white text-decoration-none"><i class="bi bi-x-lg"></i></a>
|
||||
</div>
|
||||
<div class="card-body p-4">
|
||||
<form method="POST">
|
||||
<input type="hidden" name="day_number" value="<?php echo $current_step['day_number']; ?>">
|
||||
<div class="row g-3 mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">步骤标题</label>
|
||||
<input type="text" name="title" class="form-control" value="<?php echo htmlspecialchars($current_step['title']); ?>" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">示例图片 URL</label>
|
||||
<input type="text" name="image_url" class="form-control" value="<?php echo htmlspecialchars($current_step['image_url']); ?>" placeholder="https://...">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">聊什么 (What)</label>
|
||||
<textarea name="what_to_chat" class="form-control" rows="3"><?php echo htmlspecialchars($current_step['what_to_chat']); ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">怎么去聊 (How)</label>
|
||||
<textarea name="how_to_chat" class="form-control" rows="3"><?php echo htmlspecialchars($current_step['how_to_chat']); ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-bold">为什么要这样聊 (Why)</label>
|
||||
<textarea name="why_to_chat" class="form-control" rows="3"><?php echo htmlspecialchars($current_step['why_to_chat']); ?></textarea>
|
||||
</div>
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-md-6">
|
||||
<div class="p-3 border rounded bg-light">
|
||||
<label class="form-label text-success fw-bold">正确做法示例</label>
|
||||
<textarea name="correct_example" class="form-control mb-2" rows="4"><?php echo htmlspecialchars($current_step['correct_example']); ?></textarea>
|
||||
<label class="form-label small fw-bold">正确做法解释</label>
|
||||
<textarea name="correct_explanation" class="form-control" rows="2"><?php echo htmlspecialchars($current_step['correct_explanation']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="p-3 border rounded bg-light">
|
||||
<label class="form-label text-danger fw-bold">错误做法示例</label>
|
||||
<textarea name="wrong_example" class="form-control mb-2" rows="4"><?php echo htmlspecialchars($current_step['wrong_example']); ?></textarea>
|
||||
<label class="form-label small fw-bold">错误做法解释</label>
|
||||
<textarea name="wrong_explanation" class="form-control" rows="2"><?php echo htmlspecialchars($current_step['wrong_explanation']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="submit" name="update_step" class="btn btn-warning px-5 fw-bold">更新内容</button>
|
||||
<a href="admin_steps.php" class="btn btn-light px-4">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="table-responsive bg-white p-3 rounded shadow-sm">
|
||||
<table class="table table-hover align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th width="80">天数</th>
|
||||
<th>标题</th>
|
||||
<th class="d-none d-md-table-cell">最后更新</th>
|
||||
<th width="120">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($steps as $s): ?>
|
||||
<tr>
|
||||
<td class="fw-bold">Day <?php echo $s['day_number']; ?></td>
|
||||
<td><?php echo htmlspecialchars($s['title']); ?></td>
|
||||
<td class="small text-muted d-none d-md-table-cell"><?php echo $s['updated_at']; ?></td>
|
||||
<td>
|
||||
<a href="admin_steps.php?edit=<?php echo $s['day_number']; ?>" class="btn btn-sm btn-outline-warning">
|
||||
<i class="bi bi-pencil-square"></i> 编辑
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,346 +1,136 @@
|
||||
:root {
|
||||
--color-bg: #ffffff;
|
||||
--color-text: #1a1a1a;
|
||||
--color-primary: #2563EB; /* Vibrant Blue */
|
||||
--color-secondary: #000000;
|
||||
--color-accent: #A3E635; /* Lime Green */
|
||||
--color-surface: #f8f9fa;
|
||||
--font-heading: 'Space Grotesk', sans-serif;
|
||||
--font-body: 'Inter', sans-serif;
|
||||
--border-width: 2px;
|
||||
--shadow-hard: 5px 5px 0px #000;
|
||||
--shadow-hover: 8px 8px 0px #000;
|
||||
--radius-pill: 50rem;
|
||||
--radius-card: 1rem;
|
||||
--primary-color: #0f172a;
|
||||
--secondary-color: #3b82f6;
|
||||
--accent-color: #f59e0b;
|
||||
--bg-color: #f8fafc;
|
||||
--surface-color: #ffffff;
|
||||
--text-main: #1e293b;
|
||||
--text-muted: #64748b;
|
||||
--border-color: #e2e8f0;
|
||||
--radius: 8px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
overflow-x: hidden;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-main);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, .navbar-brand {
|
||||
font-family: var(--font-heading);
|
||||
letter-spacing: -0.03em;
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
backdrop-filter: blur(10px);
|
||||
border-bottom: var(--border-width) solid transparent;
|
||||
transition: all 0.3s;
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.navbar.scrolled {
|
||||
border-bottom-color: #000;
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.brand-text {
|
||||
font-size: 1.5rem;
|
||||
.navbar-brand {
|
||||
font-weight: 800;
|
||||
color: var(--primary-color) !important;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-weight: 500;
|
||||
color: var(--color-text);
|
||||
margin-left: 1rem;
|
||||
position: relative;
|
||||
.hero-section {
|
||||
padding: 120px 0 80px;
|
||||
background: radial-gradient(circle at top right, #e0f2fe 0%, transparent 40%);
|
||||
}
|
||||
|
||||
.nav-link:hover, .nav-link.active {
|
||||
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;
|
||||
.hero-title {
|
||||
font-size: 3.5rem;
|
||||
font-weight: 800;
|
||||
line-height: 1.1;
|
||||
color: var(--primary-color);
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--color-primary);
|
||||
border-color: #000;
|
||||
color: #fff;
|
||||
background-color: var(--secondary-color);
|
||||
border: none;
|
||||
padding: 0.75rem 1.5rem;
|
||||
font-weight: 600;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #1d4ed8;
|
||||
border-color: #000;
|
||||
color: #fff;
|
||||
background-color: #2563eb;
|
||||
}
|
||||
|
||||
.btn-outline-dark {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
.section-title {
|
||||
font-weight: 800;
|
||||
font-size: 2.25rem;
|
||||
margin-bottom: 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-cta {
|
||||
background-color: var(--color-accent);
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.btn-cta:hover {
|
||||
background-color: #8cc629;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.hero-section {
|
||||
min-height: 100vh;
|
||||
padding-top: 80px;
|
||||
}
|
||||
|
||||
.background-blob {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(80px);
|
||||
opacity: 0.6;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.blob-1 {
|
||||
top: -10%;
|
||||
right: -10%;
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
background: radial-gradient(circle, var(--color-accent), transparent);
|
||||
}
|
||||
|
||||
.blob-2 {
|
||||
bottom: 10%;
|
||||
left: -10%;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
background: radial-gradient(circle, var(--color-primary), transparent);
|
||||
}
|
||||
|
||||
.highlight-text {
|
||||
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;
|
||||
white-space: nowrap;
|
||||
border-top: 2px solid #000;
|
||||
border-bottom: 2px solid #000;
|
||||
}
|
||||
|
||||
.rotate-divider {
|
||||
transform: rotate(-2deg) scale(1.05);
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: -50px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.marquee-content {
|
||||
display: inline-block;
|
||||
animation: marquee 20s linear infinite;
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 700;
|
||||
font-size: 1.5rem;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
@keyframes marquee {
|
||||
0% { transform: translateX(0); }
|
||||
100% { transform: translateX(-50%); }
|
||||
}
|
||||
|
||||
/* Portfolio Cards */
|
||||
.project-card {
|
||||
border: 2px solid #000;
|
||||
border-radius: var(--radius-card);
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
transition: transform 0.3s ease;
|
||||
box-shadow: var(--shadow-hard);
|
||||
.service-card {
|
||||
background: var(--surface-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius);
|
||||
padding: 2rem;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.project-card:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 8px 8px 0 #000;
|
||||
.service-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.card-img-holder {
|
||||
height: 250px;
|
||||
.service-icon {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: #eff6ff;
|
||||
color: var(--secondary-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom: 2px solid #000;
|
||||
position: relative;
|
||||
font-size: 4rem;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.placeholder-art {
|
||||
transition: transform 0.3s ease;
|
||||
.contact-section {
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
padding: 80px 0;
|
||||
}
|
||||
|
||||
.project-card:hover .placeholder-art {
|
||||
transform: scale(1.2) rotate(10deg);
|
||||
.contact-card {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
backdrop-filter: blur(10px);
|
||||
padding: 3rem;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.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;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
color: white;
|
||||
padding: 0.75rem;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
box-shadow: 4px 4px 0 var(--color-primary);
|
||||
border-color: #000;
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-color: var(--secondary-color);
|
||||
color: white;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
.animate-up {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
animation: fadeUp 0.8s ease forwards;
|
||||
.form-label {
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.delay-100 { animation-delay: 0.1s; }
|
||||
.delay-200 { animation-delay: 0.2s; }
|
||||
footer {
|
||||
padding: 40px 0;
|
||||
border-top: 1px solid var(--border-color);
|
||||
background: var(--surface-color);
|
||||
}
|
||||
|
||||
@keyframes fadeUp {
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
@media (max-width: 768px) {
|
||||
.hero-title {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
.hero-section {
|
||||
padding-top: 120px;
|
||||
text-align: center;
|
||||
min-height: auto;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.display-1 { font-size: 3.5rem; }
|
||||
|
||||
.blob-1 { width: 300px; height: 300px; right: -20%; }
|
||||
.blob-2 { width: 300px; height: 300px; left: -20%; }
|
||||
}
|
||||
|
||||
@ -1,73 +1,56 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const leadForm = document.getElementById('leadForm');
|
||||
const successToast = document.getElementById('successToast');
|
||||
const toast = new bootstrap.Toast(successToast);
|
||||
|
||||
// Smooth scrolling for navigation links
|
||||
if (leadForm) {
|
||||
leadForm.addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const submitBtn = leadForm.querySelector('button[type="submit"]');
|
||||
const originalBtnText = submitBtn.innerHTML;
|
||||
|
||||
// UI State: Loading
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.innerHTML = '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Sending...';
|
||||
|
||||
const formData = new FormData(leadForm);
|
||||
|
||||
fetch('save_lead.php', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
toast.show();
|
||||
leadForm.reset();
|
||||
} else {
|
||||
alert('Error: ' + (data.error || 'Something went wrong'));
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
alert('An error occurred while sending your message.');
|
||||
})
|
||||
.finally(() => {
|
||||
// UI State: Reset
|
||||
submitBtn.disabled = false;
|
||||
submitBtn.innerHTML = originalBtnText;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Smooth scrolling for anchor links
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
const targetId = this.getAttribute('href');
|
||||
if (targetId === '#') return;
|
||||
|
||||
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"
|
||||
const target = document.querySelector(this.getAttribute('href'));
|
||||
if (target) {
|
||||
target.scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 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 = {
|
||||
threshold: 0.1,
|
||||
rootMargin: "0px 0px -50px 0px"
|
||||
};
|
||||
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('animate-up');
|
||||
entry.target.style.opacity = "1";
|
||||
observer.unobserve(entry.target); // Only animate once
|
||||
}
|
||||
});
|
||||
}, observerOptions);
|
||||
|
||||
// Select elements to animate (add a class 'reveal' to them in HTML if not already handled by CSS animation)
|
||||
// For now, let's just make sure the hero animations run.
|
||||
// If we want scroll animations, we'd add opacity: 0 to elements in CSS and reveal them here.
|
||||
// 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);
|
||||
});
|
||||
|
||||
});
|
||||
BIN
assets/pasted-20260207-134833-7329dc42.jpg
Normal file
BIN
assets/pasted-20260207-134833-7329dc42.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
68
db/init.php
Normal file
68
db/init.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
// Initialize database tables
|
||||
require_once __DIR__ . '/config.php';
|
||||
|
||||
try {
|
||||
$pdo = db();
|
||||
|
||||
// Create users table
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS users (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
username VARCHAR(50) NOT NULL UNIQUE,
|
||||
password VARCHAR(255) NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)");
|
||||
|
||||
// Create settings table
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS settings (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
setting_key VARCHAR(50) NOT NULL UNIQUE,
|
||||
setting_value TEXT,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
)");
|
||||
|
||||
// Create steps table
|
||||
$pdo->exec("CREATE TABLE IF NOT EXISTS steps (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
day_number INT NOT NULL UNIQUE,
|
||||
title VARCHAR(255),
|
||||
what_to_chat TEXT,
|
||||
how_to_chat TEXT,
|
||||
why_to_chat TEXT,
|
||||
correct_example TEXT,
|
||||
wrong_example TEXT,
|
||||
correct_explanation TEXT,
|
||||
wrong_explanation TEXT,
|
||||
image_url VARCHAR(255),
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
)");
|
||||
|
||||
// Seed default admin if not exists
|
||||
$stmt = $pdo->prepare("SELECT COUNT(*) FROM users WHERE username = 'admin'");
|
||||
$stmt->execute();
|
||||
if ($stmt->fetchColumn() == 0) {
|
||||
$password = password_hash('admin123', PASSWORD_DEFAULT);
|
||||
$pdo->prepare("INSERT INTO users (username, password) VALUES ('admin', ?)")->execute([$password]);
|
||||
}
|
||||
|
||||
// Seed default settings
|
||||
$defaultSettings = [
|
||||
'site_title' => '财神组聊天框架',
|
||||
'site_logo' => 'assets/pasted-20260207-134833-7329dc42.jpg',
|
||||
'tg_link' => 'https://t.me/zhangshihao818',
|
||||
'footer_copy' => '© 2026 财神组聊天框架构造. 内部资料,翻版必究。',
|
||||
'watermark_text' => '财神组专用字体'
|
||||
];
|
||||
|
||||
foreach ($defaultSettings as $key => $val) {
|
||||
$pdo->prepare("INSERT IGNORE INTO settings (setting_key, setting_value) VALUES (?, ?)")->execute([$key, $val]);
|
||||
}
|
||||
|
||||
// Seed default steps 1-7
|
||||
for ($i = 1; $i <= 7; $i++) {
|
||||
$pdo->prepare("INSERT IGNORE INTO steps (day_number, title) VALUES (?, ?)")->execute([$i, "第{$i}天:初步沟通"]);
|
||||
}
|
||||
|
||||
} catch (PDOException $e) {
|
||||
error_log("DB Init Error: " . $e->getMessage());
|
||||
}
|
||||
335
index.php
335
index.php
@ -1,150 +1,213 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
@ini_set('display_errors', '1');
|
||||
@error_reporting(E_ALL);
|
||||
@date_default_timezone_set('UTC');
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
|
||||
$phpVersion = PHP_VERSION;
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$project_name = $_SERVER['PROJECT_NAME'] ?? 'SMM Pro Agency';
|
||||
$project_description = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Elevate your social media presence with data-driven strategies and creative content.';
|
||||
?>
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>New Style</title>
|
||||
<?php
|
||||
// Read project preview data from environment
|
||||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||||
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
?>
|
||||
<?php if ($projectDescription): ?>
|
||||
<!-- Meta description -->
|
||||
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<!-- Twitter meta tags -->
|
||||
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<?php endif; ?>
|
||||
<?php if ($projectImageUrl): ?>
|
||||
<!-- Open Graph image -->
|
||||
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<!-- Twitter image -->
|
||||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<?php endif; ?>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo htmlspecialchars($project_name); ?></title>
|
||||
<meta name="description" content="<?php echo htmlspecialchars($project_description); ?>">
|
||||
|
||||
<!-- Bootstrap 5 CDN -->
|
||||
<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.1/font/bootstrap-icons.css">
|
||||
|
||||
<!-- Google Fonts: Inter -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
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>');
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
@keyframes bg-pan {
|
||||
0% { background-position: 0% 0%; }
|
||||
100% { background-position: 100% 100%; }
|
||||
}
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.loader {
|
||||
margin: 1.25rem auto 1.25rem;
|
||||
width: 48px;
|
||||
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>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
</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>
|
||||
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar navbar-expand-lg sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">
|
||||
<i class="bi bi-rocket-takeoff-fill me-2 text-primary"></i><?php echo htmlspecialchars($project_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 ms-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="#services">Services</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#results">Results</a></li>
|
||||
<li class="nav-item"><a class="nav-link ms-lg-3 btn btn-primary text-white" href="#contact">Get a Quote</a></li>
|
||||
</ul>
|
||||
</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>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
</nav>
|
||||
|
||||
<!-- Hero Section -->
|
||||
<section class="hero-section">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="hero-title">Dominate Social Media. Grow Your Business.</h1>
|
||||
<p class="lead text-muted mb-4">We help ambitious brands scale through professional social media management, targeted advertising, and high-impact content creation.</p>
|
||||
<div class="d-flex gap-3">
|
||||
<a href="#contact" class="btn btn-primary btn-lg">Start Your Project</a>
|
||||
<a href="#services" class="btn btn-outline-dark btn-lg">Our Services</a>
|
||||
</div>
|
||||
<div class="mt-5 d-flex align-items-center gap-4">
|
||||
<div>
|
||||
<h4 class="mb-0 fw-bold">500+</h4>
|
||||
<p class="text-muted small">Campaigns Run</p>
|
||||
</div>
|
||||
<div class="vr opacity-25"></div>
|
||||
<div>
|
||||
<h4 class="mb-0 fw-bold">10M+</h4>
|
||||
<p class="text-muted small">Reach Generated</p>
|
||||
</div>
|
||||
<div class="vr opacity-25"></div>
|
||||
<div>
|
||||
<h4 class="mb-0 fw-bold">98%</h4>
|
||||
<p class="text-muted small">Client Retention</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 d-none d-lg-block">
|
||||
<img src="https://images.pexels.com/photos/607812/pexels-photo-607812.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2" alt="SMM Strategy" class="img-fluid rounded shadow-lg">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Services Section -->
|
||||
<section id="services" class="py-5">
|
||||
<div class="container py-5">
|
||||
<h2 class="section-title">Our Expertise</h2>
|
||||
<div class="row g-4">
|
||||
<div class="col-md-4">
|
||||
<div class="service-card">
|
||||
<div class="service-icon"><i class="bi bi-megaphone"></i></div>
|
||||
<h3>Social Strategy</h3>
|
||||
<p class="text-muted">Comprehensive planning to align your social presence with your business goals and target audience.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="service-card">
|
||||
<div class="service-icon"><i class="bi bi-camera-reels"></i></div>
|
||||
<h3>Content Creation</h3>
|
||||
<p class="text-muted">High-quality visuals and compelling copy that stop the scroll and drive engagement.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="service-card">
|
||||
<div class="service-icon"><i class="bi bi-graph-up-arrow"></i></div>
|
||||
<h3>Paid Ads (ROI Focus)</h3>
|
||||
<p class="text-muted">Targeted ad campaigns on Meta, TikTok, and LinkedIn designed to convert followers into customers.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Results Section (Placeholder/Static) -->
|
||||
<section id="results" class="py-5 bg-white">
|
||||
<div class="container py-5">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-5">
|
||||
<h2 class="fw-bold mb-4">Real Results for Real Brands</h2>
|
||||
<p class="text-muted mb-4">We don't just chase likes; we chase business outcomes. Our case studies show consistent growth in ROI and brand authority.</p>
|
||||
<ul class="list-unstyled">
|
||||
<li class="mb-3 d-flex align-items-center"><i class="bi bi-check-circle-fill text-success me-2"></i> 250% average increase in organic reach</li>
|
||||
<li class="mb-3 d-flex align-items-center"><i class="bi bi-check-circle-fill text-success me-2"></i> 4x ROAS on paid social campaigns</li>
|
||||
<li class="mb-3 d-flex align-items-center"><i class="bi bi-check-circle-fill text-success me-2"></i> Premium content tailored to each platform</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<div class="row g-3">
|
||||
<div class="col-6">
|
||||
<img src="https://images.pexels.com/photos/3183150/pexels-photo-3183150.jpeg?auto=compress&cs=tinysrgb&w=600" class="img-fluid rounded" alt="Teamwork">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<img src="https://images.pexels.com/photos/7007191/pexels-photo-7007191.jpeg?auto=compress&cs=tinysrgb&w=600" class="img-fluid rounded mt-4" alt="Analysis">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Contact Section -->
|
||||
<section id="contact" class="contact-section">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8">
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="fw-bold text-white">Ready to Scale?</h2>
|
||||
<p class="text-white-50">Fill out the form below and we'll get back to you with a custom strategy within 24 hours.</p>
|
||||
</div>
|
||||
<div class="contact-card">
|
||||
<form id="leadForm">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Full Name</label>
|
||||
<input type="text" name="name" class="form-control" placeholder="John Doe" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Email Address</label>
|
||||
<input type="email" name="email" class="form-control" placeholder="john@example.com" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Website (Optional)</label>
|
||||
<input type="url" name="website" class="form-control" placeholder="https://yourbrand.com">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">Service Interested In</label>
|
||||
<select name="service" class="form-select form-control">
|
||||
<option value="Full Management">Full Management</option>
|
||||
<option value="Paid Social Ads">Paid Social Ads</option>
|
||||
<option value="Content Creation">Content Creation</option>
|
||||
<option value="Strategy Only">Strategy Only</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label">Message / Goals</label>
|
||||
<textarea name="message" class="form-control" rows="4" placeholder="Tell us about your brand and what you want to achieve..."></textarea>
|
||||
</div>
|
||||
<div class="col-12 text-center mt-4">
|
||||
<button type="submit" class="btn btn-primary btn-lg px-5 shadow">Get My Free Quote</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="mb-3">
|
||||
<a href="#" class="text-dark mx-2 fs-4"><i class="bi bi-instagram"></i></a>
|
||||
<a href="#" class="text-dark mx-2 fs-4"><i class="bi bi-linkedin"></i></a>
|
||||
<a href="#" class="text-dark mx-2 fs-4"><i class="bi bi-twitter-x"></i></a>
|
||||
</div>
|
||||
<p class="text-muted">© <?php echo date('Y'); ?> <?php echo htmlspecialchars($project_name); ?>. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Success Toast -->
|
||||
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
||||
<div id="successToast" class="toast align-items-center text-white bg-success border-0" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="d-flex">
|
||||
<div class="toast-body">
|
||||
Message sent successfully! We'll contact you soon.
|
||||
</div>
|
||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
73
login.php
Normal file
73
login.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
|
||||
$pdo = db();
|
||||
$stmt = $pdo->query("SELECT setting_value FROM settings WHERE setting_key = 'site_logo'");
|
||||
$site_logo = $stmt->fetchColumn() ?: 'assets/pasted-20260207-134833-7329dc42.jpg';
|
||||
|
||||
$error = '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$username = $_POST['username'] ?? '';
|
||||
$password = $_POST['password'] ?? '';
|
||||
|
||||
if ($username === 'admin') {
|
||||
$stmt = $pdo->prepare("SELECT password FROM users WHERE username = 'admin'");
|
||||
$stmt->execute();
|
||||
$user = $stmt->fetch();
|
||||
|
||||
if ($user && password_verify($password, $user['password'])) {
|
||||
$_SESSION['admin_logged_in'] = true;
|
||||
header('Location: admin.php');
|
||||
exit;
|
||||
} else {
|
||||
$error = '用户名或密码错误';
|
||||
}
|
||||
} else {
|
||||
$error = '权限不足';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>登录 - 财神组聊天框架</title>
|
||||
<link rel="icon" type="image/jpeg" href="<?php echo htmlspecialchars($site_logo); ?>">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body { background-color: #f8f9fa; height: 100vh; display: flex; align-items: center; justify-content: center; }
|
||||
.login-card { width: 100%; max-width: 400px; padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); background: #fff; }
|
||||
.btn-warning { background-color: #d4af37; border: none; color: #fff; }
|
||||
.btn-warning:hover { background-color: #b8860b; color: #fff; }
|
||||
.logo-img { max-height: 100px; margin-bottom: 20px; border-radius: 12px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-card text-center">
|
||||
<?php if($site_logo): ?>
|
||||
<img src="<?php echo htmlspecialchars($site_logo); ?>" alt="Logo" class="logo-img">
|
||||
<?php endif; ?>
|
||||
<h3 class="mb-4">管理登录</h3>
|
||||
<?php if($error): ?>
|
||||
<div class="alert alert-danger text-start"><?php echo $error; ?></div>
|
||||
<?php endif; ?>
|
||||
<form method="POST" class="text-start">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">用户名</label>
|
||||
<input type="text" name="username" class="form-control" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">密码</label>
|
||||
<input type="password" name="password" class="form-control" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-warning w-100 py-2 mt-2">登录</button>
|
||||
</form>
|
||||
<div class="text-center mt-3">
|
||||
<a href="index.php" class="text-muted text-decoration-none small">返回首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
logout.php
Normal file
5
logout.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
43
save_lead.php
Normal file
43
save_lead.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid request method']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$name = trim($_POST['name'] ?? '');
|
||||
$email = trim($_POST['email'] ?? '');
|
||||
$website = trim($_POST['website'] ?? '');
|
||||
$service = trim($_POST['service'] ?? '');
|
||||
$message = trim($_POST['message'] ?? '');
|
||||
|
||||
if (empty($name) || empty($email)) {
|
||||
echo json_encode(['success' => false, 'error' => 'Name and Email are required']);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid email format']);
|
||||
exit;
|
||||
}
|
||||
|
||||
try {
|
||||
$pdo = db();
|
||||
$stmt = $pdo->prepare("INSERT INTO leads (name, email, website, service, message) VALUES (?, ?, ?, ?, ?)");
|
||||
$stmt->execute([$name, $email, $website, $service, $message]);
|
||||
|
||||
// Optional: Send email notification
|
||||
if (file_exists(__DIR__ . '/mail/MailService.php')) {
|
||||
require_once __DIR__ . '/mail/MailService.php';
|
||||
$subject = "New Lead from SMM Agency: $name";
|
||||
$body = "Name: $name\nEmail: $email\nWebsite: $website\nService: $service\nMessage: $message";
|
||||
MailService::sendMail(null, $subject, nl2br(htmlspecialchars($body)), $body);
|
||||
}
|
||||
|
||||
echo json_encode(['success' => true]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'error' => 'Database error: ' . $e->getMessage()]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user