289 lines
14 KiB
PHP
289 lines
14 KiB
PHP
<?php
|
|
session_start();
|
|
$message_sent = null;
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['form_submitted'])) {
|
|
require_once __DIR__ . '/mail/MailService.php';
|
|
|
|
$name = filter_var(trim($_POST['name']), FILTER_SANITIZE_STRING);
|
|
$email = filter_var(trim($_POST['email']), FILTER_SANITIZE_EMAIL);
|
|
$message_text = filter_var(trim($_POST['message']), FILTER_SANITIZE_STRING);
|
|
|
|
if (filter_var($email, FILTER_VALIDATE_EMAIL) && !empty($name) && !empty($message_text)) {
|
|
$to = getenv('MAIL_TO') ?: 'support@yourdomain.com'; // Fallback recipient
|
|
$subject = 'New Lead from Nimbus Landing Page';
|
|
|
|
$res = MailService::sendContactMessage($name, $email, $message_text, $to, $subject);
|
|
|
|
if (!empty($res['success'])) {
|
|
$_SESSION['message_sent'] = 'success';
|
|
} else {
|
|
$_SESSION['message_sent'] = 'error';
|
|
// Log the detailed error
|
|
$log_message = date('[Y-m-d H:i:s]') . ' Mailer Error: ' . ($res['error'] ?? 'Unknown error') . PHP_EOL;
|
|
file_put_contents('mail_log.txt', $log_message, FILE_APPEND);
|
|
}
|
|
} else {
|
|
$_SESSION['message_sent'] = 'validation_error';
|
|
}
|
|
|
|
// Redirect to avoid form resubmission
|
|
header("Location: " . $_SERVER['PHP_SELF'] . "#contact");
|
|
exit();
|
|
}
|
|
|
|
if (isset($_SESSION['message_sent'])) {
|
|
$message_sent = $_SESSION['message_sent'];
|
|
unset($_SESSION['message_sent']);
|
|
}
|
|
?>
|
|
<?php require_once 'templates/header.php'; ?>
|
|
|
|
<!-- Hero -->
|
|
<section class="hero-section text-center py-5">
|
|
<div class="container py-5">
|
|
<h1 class="display-3 fw-bold">Your Cloud, Simplified</h1>
|
|
<p class="lead mb-5">Nimbus is the single pane of glass for your entire cloud infrastructure. Monitor, optimize, and automate with ease.</p>
|
|
<a href="#contact" class="btn btn-primary btn-lg">Start Your Free Trial</a>
|
|
<a href="#features" class="btn btn-outline-secondary btn-lg">Explore Features</a>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Social Proof -->
|
|
<section class="py-5">
|
|
<div class="container text-center">
|
|
<h6 class="text-muted mb-4">TRUSTED BY LEADING COMPANIES WORLDWIDE</h6>
|
|
<div class="d-flex flex-wrap justify-content-center align-items-center">
|
|
<i class="bi bi-cloud-haze2 fs-1 text-muted mx-4"></i>
|
|
<i class="bi bi-bar-chart-line fs-1 text-muted mx-4"></i>
|
|
<i class="bi bi-shield-lock fs-1 text-muted mx-4"></i>
|
|
<i class="bi bi-hdd-stack fs-1 text-muted mx-4"></i>
|
|
<i class="bi bi-globe2 fs-1 text-muted mx-4"></i>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Features -->
|
|
<section id="features" class="py-5">
|
|
<div class="container">
|
|
<div class="text-center mb-5">
|
|
<h2>Core Features</h2>
|
|
<p class="lead">Everything you need in one platform.</p>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-4 mb-4">
|
|
<div class="feature-card text-center p-4 h-100">
|
|
<i class="bi bi-graph-up-arrow section-icon mb-3"></i>
|
|
<h4>Unified Monitoring</h4>
|
|
<p>Get a bird's-eye view of your entire infrastructure in one place.</p>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-4">
|
|
<div class="feature-card text-center p-4 h-100">
|
|
<i class="bi bi-piggy-bank section-icon mb-3"></i>
|
|
<h4>Cost Optimization</h4>
|
|
<p>Identify and eliminate wasted cloud spend with smart recommendations.</p>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-4">
|
|
<div class="feature-card text-center p-4 h-100">
|
|
<i class="bi bi-shield-check section-icon mb-3"></i>
|
|
<h4>Automated Security</h4>
|
|
<p>Proactively secure your cloud environment against threats.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Product Screenshot -->
|
|
<section class="py-5">
|
|
<div class="container">
|
|
<div class="text-center mb-5">
|
|
<h2>See Nimbus in Action</h2>
|
|
</div>
|
|
<img src="https://picsum.photos/seed/nimbus-dashboard/1200/800" class="img-fluid rounded shadow" alt="A mock screenshot of the Nimbus dashboard showing key performance metrics.">
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Testimonials -->
|
|
<section id="testimonials" class="py-5">
|
|
<div class="container">
|
|
<div class="text-center mb-5">
|
|
<h2>What Our Customers Say</h2>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-4 mb-4">
|
|
<div class="feature-card p-4 h-100">
|
|
<p class="fst-italic">"Nimbus has been a game-changer for us. We've saved over 30% on our cloud bills."</p>
|
|
<div class="d-flex align-items-center mt-4">
|
|
<img src="https://picsum.photos/seed/avatar1/96/96" class="rounded-circle me-3" alt="Avatar of a satisfied Nimbus customer.">
|
|
<div>
|
|
<h6 class="m-0">Jane Doe</h6>
|
|
<small class="text-muted">CTO, TechCorp</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-4">
|
|
<div class="feature-card p-4 h-100">
|
|
<p class="fst-italic">"The unified dashboard is incredibly intuitive. Our team was up and running in minutes."</p>
|
|
<div class="d-flex align-items-center mt-4">
|
|
<img src="https://picsum.photos/seed/avatar2/96/96" class="rounded-circle me-3" alt="Avatar of a satisfied Nimbus customer.">
|
|
<div>
|
|
<h6 class="m-0">John Smith</h6>
|
|
<small class="text-muted">CEO, Innovate LLC</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-4">
|
|
<div class="feature-card p-4 h-100">
|
|
<p class="fst-italic">"I can't imagine managing our infrastructure without Nimbus. It's essential."</p>
|
|
<div class="d-flex align-items-center mt-4">
|
|
<img src="https://picsum.photos/seed/avatar3/96/96" class="rounded-circle me-3" alt="Avatar of a satisfied Nimbus customer.">
|
|
<div>
|
|
<h6 class="m-0">Sam Wilson</h6>
|
|
<small class="text-muted">DevOps Lead, Future Solutions</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Pricing -->
|
|
<section id="pricing" class="py-5">
|
|
<div class="container">
|
|
<div class="text-center mb-5">
|
|
<h2>Simple, Transparent Pricing</h2>
|
|
<div class="form-check form-switch d-inline-block">
|
|
<input class="form-check-input" type="checkbox" id="priceToggle">
|
|
<label class="form-check-label" for="priceToggle">Yearly (Save 20%)</label>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<!-- Pricing Tier 1 -->
|
|
<div class="col-lg-4 mb-4">
|
|
<div class="feature-card text-center p-4 h-100">
|
|
<h4>Starter</h4>
|
|
<h5 class="card-title my-4">
|
|
<span data-monthly="$49" data-yearly="$39">$49</span>/mo
|
|
</h5>
|
|
<ul class="list-unstyled my-4">
|
|
<li>10 Projects</li>
|
|
<li>Basic Analytics</li>
|
|
<li>Email Support</li>
|
|
</ul>
|
|
<button class="btn btn-outline-light">Choose Plan</button>
|
|
</div>
|
|
</div>
|
|
<!-- Pricing Tier 2 -->
|
|
<div class="col-lg-4 mb-4">
|
|
<div class="feature-card text-center p-4 h-100">
|
|
<h4>Pro</h4>
|
|
<h5 class="card-title my-4">
|
|
<span data-monthly="$99" data-yearly="$79">$99</span>/mo
|
|
</h5>
|
|
<ul class="list-unstyled my-4">
|
|
<li>Unlimited Projects</li>
|
|
<li>Advanced Analytics</li>
|
|
<li>Priority Support</li>
|
|
</ul>
|
|
<button class="btn btn-light">Choose Plan</button>
|
|
</div>
|
|
</div>
|
|
<!-- Pricing Tier 3 -->
|
|
<div class="col-lg-4 mb-4">
|
|
<div class="feature-card text-center p-4 h-100">
|
|
<h4>Enterprise</h4>
|
|
<h5 class="card-title my-4">Contact Us</h5>
|
|
<ul class="list-unstyled my-4">
|
|
<li>Dedicated Infrastructure</li>
|
|
<li>Custom Integrations</li>
|
|
<li>24/7 Support</li>
|
|
</ul>
|
|
<button class="btn btn-outline-light">Contact Sales</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- FAQ -->
|
|
<section id="faq" class="py-5">
|
|
<div class="container">
|
|
<div class="text-center mb-5">
|
|
<h2>Frequently Asked Questions</h2>
|
|
</div>
|
|
<div class="accordion" id="faqAccordion">
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header"><button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#faq1">What is Nimbus?</button></h2>
|
|
<div id="faq1" class="accordion-collapse collapse show" data-bs-parent="#faqAccordion">
|
|
<div class="accordion-body">Nimbus is a B2B SaaS platform that helps businesses manage their cloud infrastructure.</div>
|
|
</div>
|
|
</div>
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header"><button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#faq2">What cloud providers do you support?</button></h2>
|
|
<div id="faq2" class="accordion-collapse collapse" data-bs-parent="#faqAccordion">
|
|
<div class="accordion-body">We support AWS, Google Cloud, and Azure.</div>
|
|
</div>
|
|
</div>
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header"><button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#faq3">Can I cancel my subscription?</button></h2>
|
|
<div id="faq3" class="accordion-collapse collapse" data-bs-parent="#faqAccordion">
|
|
<div class="accordion-body">Yes, you can cancel your subscription at any time.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Contact Form -->
|
|
<section id="contact" class="py-5">
|
|
<div class="container">
|
|
<div class="text-center mb-5">
|
|
<h2>Get in Touch</h2>
|
|
<p class="lead">We'd love to hear from you.</p>
|
|
</div>
|
|
<div class="row justify-content-center">
|
|
<div class="col-lg-6">
|
|
<?php if ($message_sent === 'success'): ?>
|
|
<div class="alert alert-success" role="alert">
|
|
<strong>Thank you!</strong> Your message has been sent successfully.
|
|
</div>
|
|
<?php elseif ($message_sent === 'error'): ?>
|
|
<div class="alert alert-danger" role="alert">
|
|
<strong>Error!</strong> There was a problem sending your message. Please try again later.
|
|
</div>
|
|
<?php elseif ($message_sent === 'validation_error'): ?>
|
|
<div class="alert alert-warning" role="alert">
|
|
<strong>Oops!</strong> Please fill out all fields correctly.
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<form id="leadForm" method="POST" action="#contact" novalidate>
|
|
<input type="hidden" name="form_submitted" value="1">
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Name</label>
|
|
<input type="text" class="form-control" id="name" name="name" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="email" class="form-label">Email</label>
|
|
<input type="email" class="form-control" id="email" name="email" required>
|
|
<div class="invalid-feedback">Please provide a valid email.</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="message" class="form-label">Message</label>
|
|
<textarea class="form-control" id="message" name="message" rows="4" required></textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Send Message</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<?php require_once 'templates/footer.php'; ?>
|