From 019834cdd5da7cc262048aad1c72e59ce175b888 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 8 Feb 2026 13:48:45 +0000 Subject: [PATCH] initial --- assets/css/custom.css | 406 ++++++++++-------------------------------- assets/js/main.js | 122 +++++-------- index.php | 360 ++++++++++++++++++------------------- save_lead.php | 43 +++++ 4 files changed, 365 insertions(+), 566 deletions(-) create mode 100644 save_lead.php diff --git a/assets/css/custom.css b/assets/css/custom.css index c5931f8..a617e1c 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,352 +1,136 @@ :root { - --primary-color: #d4af37; - --secondary-color: #1a1a1a; - --text-color: #333; - --bg-color: #f8f9fa; - --sidebar-width: 280px; + --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: 'Inter', "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: var(--bg-color); - color: var(--text-color); - overflow-x: hidden; + color: var(--text-main); + line-height: 1.6; } -/* Watermark */ -.watermark-container { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - pointer-events: none; - z-index: 9999; - opacity: 0.04; - overflow: hidden; +.navbar { + background: rgba(255, 255, 255, 0.8); + backdrop-filter: blur(10px); + border-bottom: 1px solid var(--border-color); + padding: 1rem 0; } -.watermark-text { - position: absolute; - width: 200%; - height: 200%; - top: -50%; - left: -50%; - display: flex; - flex-wrap: wrap; - justify-content: center; - align-content: center; - transform: rotate(-30deg); - font-size: 20px; - font-weight: bold; - color: #000; -} - -.watermark-item { - padding: 80px; - white-space: nowrap; -} - -/* Sidebar Layout */ -.wrapper { - display: flex; - min-height: 100vh; -} - -#sidebar { - width: var(--sidebar-width); - background: var(--secondary-color); - color: #fff; - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - position: fixed; - top: 0; - left: 0; - height: 100vh; - z-index: 1050; - box-shadow: 4px 0 10px rgba(0,0,0,0.1); -} - -#content { - width: 100%; - padding: 40px; - margin-left: var(--sidebar-width); - transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); -} - -/* Sidebar toggled state (desktop) */ -#sidebar.collapsed { - transform: translateX(-100%); -} -#content.expanded { - margin-left: 0; -} - -.sidebar-header { - padding: 30px 25px; - background: #000; - text-align: center; -} - -.sidebar-header h3 { - font-size: 1.1rem; - color: var(--primary-color); - margin: 0; - font-weight: 700; - letter-spacing: 1px; -} - -#sidebar ul.components { - padding: 20px 0; -} - -#sidebar ul li a { - padding: 15px 25px; - display: block; - color: #adb5bd; - text-decoration: none; - transition: 0.3s; - font-size: 0.95rem; -} - -#sidebar ul li a:hover, #sidebar ul li.active > a { - color: #fff; - background: rgba(212, 175, 55, 0.15); - border-left: 4px solid var(--primary-color); -} - -#sidebar ul li a i { - margin-right: 12px; -} - -/* Mobile Nav Bar */ -.mobile-nav { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 60px; - background: var(--secondary-color); - display: none; - align-items: center; - justify-content: space-between; - padding: 0 15px; - z-index: 1040; - box-shadow: 0 2px 10px rgba(0,0,0,0.2); -} - -.mobile-logo-text { - color: var(--primary-color); - font-weight: bold; - font-size: 1rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-width: 200px; -} - -#sidebarCollapseMobile { +.navbar-brand { + font-weight: 800; + color: var(--primary-color) !important; font-size: 1.5rem; } -/* Overlay */ -#overlay { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - background: rgba(0,0,0,0.5); - z-index: 1045; - display: none; - backdrop-filter: blur(2px); +.hero-section { + padding: 120px 0 80px; + background: radial-gradient(circle at top right, #e0f2fe 0%, transparent 40%); } -/* Floating TG Button */ -.tg-float { - position: fixed; - right: 20px; - bottom: 90px; - z-index: 1001; +.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(--secondary-color); + border: none; + padding: 0.75rem 1.5rem; + font-weight: 600; + border-radius: var(--radius); +} + +.btn-primary:hover { + background-color: #2563eb; +} + +.section-title { + font-weight: 800; + font-size: 2.25rem; + margin-bottom: 3rem; text-align: center; } -.tg-btn { +.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%; +} + +.service-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); +} + +.service-icon { width: 50px; height: 50px; - background-color: #0088cc; - color: white; - border-radius: 50%; + background: #eff6ff; + color: var(--secondary-color); display: flex; align-items: center; justify-content: center; - font-size: 24px; - box-shadow: 0 4px 15px rgba(0,0,0,0.3); - text-decoration: none; - animation: pulse-tg 2s infinite; + border-radius: 12px; + margin-bottom: 1.5rem; + font-size: 1.5rem; } -.tg-btn:hover { - color: #fff; -} - -.tg-text { - display: block; - font-size: 10px; - margin-top: 5px; - background: rgba(0,0,0,0.7); - color: #fff; - padding: 2px 6px; - border-radius: 10px; -} - -@keyframes pulse-tg { - 0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.7); } - 70% { box-shadow: 0 0 0 12px rgba(0, 136, 204, 0); } - 100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); } -} - -/* Back to Top */ -#back-to-top { - position: fixed; - bottom: 20px; - right: 20px; - display: none; - z-index: 1001; - width: 40px; - height: 40px; -} - -/* Content Cards */ -.content-card { - border: none; - border-radius: 15px; - box-shadow: 0 5px 20px rgba(0,0,0,0.05); - margin-bottom: 20px; - overflow: hidden; -} - -.card-header { - background: #fff; - border-bottom: 1px solid #f0f0f0; - font-weight: 700; - padding: 15px 20px; - font-size: 1rem; -} - -.card-body { - padding: 20px; -} - -.text-content { - font-size: 1.05rem; - line-height: 1.7; - color: #444; -} - -.step-badge { +.contact-section { background: var(--primary-color); - color: #fff; - padding: 4px 12px; - border-radius: 20px; - font-size: 0.75rem; - vertical-align: middle; - margin-left: 10px; + color: white; + padding: 80px 0; } -/* Example Sections */ -.example-box { - padding: 15px; - border-radius: 10px; - font-size: 0.95rem; +.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); } -.correct-box { - background-color: #f1f8f1; - border-left: 5px solid #28a745; +.form-control { + 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); } -.wrong-box { - background-color: #fff5f5; - border-left: 5px solid #dc3545; +.form-control:focus { + background: rgba(255, 255, 255, 0.1); + border-color: var(--secondary-color); + color: white; + box-shadow: none; } -.explanation-box strong { - color: #666; - font-size: 0.85rem; +.form-label { + font-weight: 500; + margin-bottom: 0.5rem; } footer { padding: 40px 0; - text-align: center; - border-top: 1px solid #eee; - margin-top: 30px; + border-top: 1px solid var(--border-color); + background: var(--surface-color); } -/* Responsive Adjustments */ -@media (max-width: 991px) { - #sidebar { - transform: translateX(-100%); - z-index: 2000; - } - #sidebar.active { - transform: translateX(0); - } - #content { - margin-left: 0; - padding: 85px 12px 20px 12px; - } - .mobile-nav { - display: flex; - } - - .section-title-container { - flex-direction: column; - align-items: flex-start !important; - margin-bottom: 20px !important; - } - - .page-title { - font-size: 1.2rem !important; - font-weight: 800; - line-height: 1.4; - } - - .card-header { - padding: 10px 15px; - font-size: 0.85rem; - } - - .card-body { - padding: 15px; - } - - .text-content { - font-size: 0.9rem; - } - - .watermark-item { - padding: 40px; - font-size: 16px; - } - - .content-card { - border-radius: 10px; - margin-bottom: 15px; - } - - /* Stack columns on mobile */ - .row.g-3 > .col-md-6 { - flex: 0 0 100%; - max-width: 100%; +@media (max-width: 768px) { + .hero-title { + font-size: 2.5rem; } } - -/* Desktop Hover Effects */ -@media (min-width: 992px) { - .content-card { - transition: transform 0.2s; - } - .content-card:hover { - transform: translateY(-3px); - } -} \ No newline at end of file diff --git a/assets/js/main.js b/assets/js/main.js index 4a253f0..6420947 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,84 +1,56 @@ -document.addEventListener('DOMContentLoaded', function () { - const sidebar = document.getElementById('sidebar'); - const content = document.getElementById('content'); - const sidebarCollapse = document.getElementById('sidebarCollapse'); - const sidebarCollapseMobile = document.getElementById('sidebarCollapseMobile'); - const overlay = document.getElementById('overlay'); - const backToTop = document.getElementById('back-to-top'); +document.addEventListener('DOMContentLoaded', function() { + const leadForm = document.getElementById('leadForm'); + const successToast = document.getElementById('successToast'); + const toast = new bootstrap.Toast(successToast); - // Sidebar Toggle for Mobile (Header button) - if (sidebarCollapseMobile) { - sidebarCollapseMobile.addEventListener('click', function () { - toggleMobileSidebar(); - }); - } + if (leadForm) { + leadForm.addEventListener('submit', function(e) { + e.preventDefault(); - // Sidebar Toggle for Desktop (Content button) - if (sidebarCollapse) { - sidebarCollapse.addEventListener('click', function () { - if (window.innerWidth >= 992) { - sidebar.classList.toggle('collapsed'); - content.classList.toggle('expanded'); - // Change icon - const icon = sidebarCollapse.querySelector('i'); - if (sidebar.classList.contains('collapsed')) { - icon.className = 'bi bi-text-indent-right'; + const submitBtn = leadForm.querySelector('button[type="submit"]'); + const originalBtnText = submitBtn.innerHTML; + + // UI State: Loading + submitBtn.disabled = true; + submitBtn.innerHTML = ' 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 { - icon.className = 'bi bi-text-indent-left'; + alert('Error: ' + (data.error || 'Something went wrong')); } - } else { - toggleMobileSidebar(); - } - }); - } - - function toggleMobileSidebar() { - sidebar.classList.toggle('active'); - if (sidebar.classList.contains('active')) { - overlay.style.display = 'block'; - document.body.style.overflow = 'hidden'; // Prevent scroll - } else { - overlay.style.display = 'none'; - document.body.style.overflow = 'auto'; - } - } - - // Close sidebar when clicking overlay - if (overlay) { - overlay.addEventListener('click', function () { - sidebar.classList.remove('active'); - overlay.style.display = 'none'; - document.body.style.overflow = 'auto'; - }); - } - - // Back to Top functionality - window.addEventListener('scroll', function () { - if (window.scrollY > 300) { - backToTop.style.display = 'block'; - } else { - backToTop.style.display = 'none'; - } - }); - - if (backToTop) { - backToTop.addEventListener('click', function () { - window.scrollTo({ - top: 0, - behavior: 'smooth' + }) + .catch(error => { + console.error('Error:', error); + alert('An error occurred while sending your message.'); + }) + .finally(() => { + // UI State: Reset + submitBtn.disabled = false; + submitBtn.innerHTML = originalBtnText; }); }); } - // Resize handler to clean up states - window.addEventListener('resize', function() { - if (window.innerWidth >= 992) { - sidebar.classList.remove('active'); - if (overlay) overlay.style.display = 'none'; - document.body.style.overflow = 'auto'; - } else { - sidebar.classList.remove('collapsed'); - content.classList.remove('expanded'); - } + // Smooth scrolling for anchor links + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + const target = document.querySelector(this.getAttribute('href')); + if (target) { + target.scrollIntoView({ + behavior: 'smooth' + }); + } + }); }); -}); +}); \ No newline at end of file diff --git a/index.php b/index.php index 68683a6..63c569d 100644 --- a/index.php +++ b/index.php @@ -1,213 +1,213 @@ query("SELECT setting_key, setting_value FROM settings"); -while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { - $settings[$row['setting_key']] = $row['setting_value']; -} - -$site_title = $settings['site_title'] ?? '财神组聊天框架'; -$tg_link = $settings['tg_link'] ?? 'https://t.me/zhangshihao818'; -$footer_copy = $settings['footer_copy'] ?? '© 2026 财神组聊天框架构造. 内部资料,翻版必究。'; -$watermark_text = $settings['watermark_text'] ?? '财神组专用字体'; -$site_logo = $settings['site_logo'] ?? 'assets/pasted-20260207-134833-7329dc42.jpg'; - -// Get current day from URL -$current_day = isset($_GET['day']) ? (int)$_GET['day'] : 1; -if ($current_day < 1 || $current_day > 7) $current_day = 1; - -// Fetch step data -$stmt = $pdo->prepare("SELECT * FROM steps WHERE day_number = ?"); -$stmt->execute([$current_day]); -$step = $stmt->fetch(PDO::FETCH_ASSOC); - -if (!$step) { - $step = [ - 'day_number' => $current_day, - 'title' => "第{$current_day}天:步骤加载中", - 'what_to_chat' => '暂无内容', - 'how_to_chat' => '暂无内容', - 'why_to_chat' => '暂无内容', - 'correct_example' => '暂无内容', - 'wrong_example' => '暂无内容', - 'correct_explanation' => '暂无内容', - 'wrong_explanation' => '暂无内容', - 'image_url' => '' - ]; -} +$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.'; ?> - + - <?php echo htmlspecialchars($site_title); ?> - + <?php echo htmlspecialchars($project_name); ?> + + + + + + + + + - -
-
- - - + +
- - - - -
- - - - 联系客服 -
- - - - -
- - - - -
-
-
-

Day

- - -
- -
-
-
-
聊什么 (Content)
-
-
-
-
- -
-
为什么要这样聊 (Reasoning)
-
-
-
-
- -
-
-
-
正确做法
-
-
- 示例:
-
-
-
- 解释:
-

-
-
-
-
-
-
-
错误做法
-
-
- 示例:
-
-
-
- 解释:
-

-
-
-
-
-
+ +
+
+

Our Expertise

+
+
+
+
+

Social Strategy

+

Comprehensive planning to align your social presence with your business goals and target audience.

+
+
+
+
+

Content Creation

+

High-quality visuals and compelling copy that stop the scroll and drive engagement.

+
+
+
+
+
+

Paid Ads (ROI Focus)

+

Targeted ad campaigns on Meta, TikTok, and LinkedIn designed to convert followers into customers.

+
+
+
+
+
-
-
-
怎么去聊 (Technique)
-
-
-
+ +
+
+
+
+

Real Results for Real Brands

+

We don't just chase likes; we chase business outcomes. Our case studies show consistent growth in ROI and brand authority.

+
    +
  • 250% average increase in organic reach
  • +
  • 4x ROAS on paid social campaigns
  • +
  • Premium content tailored to each platform
  • +
+
+
+
+
+ Teamwork
- -
-
聊天示例图
-
- - Example - -
-
- 示例图片后续上传 -
- -
+
+ Analysis
+
+
+
-
-

-
+ +
+
+
+
+
+

Ready to Scale?

+

Fill out the form below and we'll get back to you with a custom strategy within 24 hours.

+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+ + + +
+

© . All rights reserved.

+
+
+ + +
+
- -
- - + \ No newline at end of file diff --git a/save_lead.php b/save_lead.php new file mode 100644 index 0000000..c6697e7 --- /dev/null +++ b/save_lead.php @@ -0,0 +1,43 @@ + 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()]); +} +