35298-vm/index.php
Flatlogic Bot c8018254dd V5
2025-10-28 08:22:29 +00:00

253 lines
10 KiB
PHP

<?php
// mail/MailService.php is required for the contact form.
require_once __DIR__ . '/mail/MailService.php';
// Handle Contact Form Submission
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// This is an AJAX request
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
header('Content-Type: application/json');
$name = filter_var(trim($_POST["name"]), FILTER_SANITIZE_STRING);
$email = filter_var(trim($_POST["email"]), FILTER_VALIDATE_EMAIL);
$message = filter_var(trim($_POST["message"]), FILTER_SANITIZE_STRING);
$subject = "New Contact Form Message from $name";
if (empty($name) || empty($email) || empty($message)) {
echo json_encode(['success' => false, 'error' => 'Please fill in all fields.']);
exit;
}
// Use the MailService to send the email.
// The recipient is configured in mail/config.php or .env
$result = MailService::sendContactMessage($name, $email, $message, null, $subject);
if ($result['success']) {
echo json_encode(['success' => true]);
} else {
// In a real app, you would log the detailed error.
// error_log("MailService Error: " . $result['error']);
echo json_encode(['success' => false, 'error' => 'Sorry, we could not send your message at this time.']);
}
exit;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Darex</title>
<meta name="description" content="Built with Flatlogic Generator">
<meta name="keywords" content="darex, innovative solutions, web development, mobile apps, ui/ux design, cloud services, data analytics, custom software, flatlogic generator">
<!-- Social Media Meta Tags -->
<meta property="og:title" content="Darex">
<meta property="og:description" content="Built with Flatlogic Generator">
<meta property="og:image" content="https://flatlogic-blog-pictures.s3.us-east-1.amazonaws.com/misc/defult-thumbnail.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://flatlogic-blog-pictures.s3.us-east-1.amazonaws.com/misc/defult-thumbnail.png">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
<!-- Template Main CSS File -->
<link href="assets/css/custom.css?v=<?php echo time(); ?>" rel="stylesheet">
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="header fixed-top d-flex align-items-center">
<div class="container d-flex align-items-center justify-content-between">
<div class="logo">
<h1 class="text-light"><a href="index.php"><span>Darex</span></a></h1>
</div>
<nav id="navbar" class="navbar">
<ul>
<li><a class="nav-link scrollto active" href="#hero">Home</a></li>
<li><a class="nav-link scrollto" href="#about">About</a></li>
<li><a class="nav-link scrollto" href="#services">Services</a></li>
<li><a class="nav-link scrollto" href="#contact">Contact</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->
</div>
</header><!-- End Header -->
<!-- ======= Hero Section ======= -->
<section id="hero" class="hero d-flex align-items-center">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h1 data-aos="fade-up">Innovative Solutions for a Digital World</h1>
<h2 data-aos="fade-up" data-aos-delay="100">We are a team of talented designers making websites with Bootstrap</h2>
<a href="#about" class="btn-get-started scrollto" data-aos="fade-up" data-aos-delay="200">Get Started</a>
</div>
</div>
</div>
</section><!-- End Hero -->
<main id="main">
<!-- ======= About Section ======= -->
<section id="about" class="about">
<div class="container">
<div class="section-title">
<h2>About Us</h2>
<p>We are a forward-thinking technology company dedicated to crafting elegant and effective solutions. Our passion is turning complex problems into beautiful, intuitive digital experiences.</p>
</div>
<div class="row content">
<div class="col-lg-6">
<p>
At Darex, we believe in the power of technology to transform businesses. We specialize in creating custom software that meets the unique needs of our clients.
</p>
<ul>
<li><i class="bi bi-check-circle"></i> Custom web and mobile application development.</li>
<li><i class="bi bi-check-circle"></i> User-centric UI/UX design and branding.</li>
<li><i class="bi bi-check-circle"></i> Scalable cloud architecture and deployment.</li>
</ul>
</div>
<div class="col-lg-6 pt-4 pt-lg-0">
<p>
Our team of experts works collaboratively to deliver high-quality products that drive growth and efficiency. We are committed to excellence and long-term partnerships with our clients.
</p>
<a href="#contact" class="btn btn-primary">Contact Us</a>
</div>
</div>
</div>
</section><!-- End About Section -->
<!-- ======= Services Section ======= -->
<section id="services" class="services bg-light">
<div class="container">
<div class="section-title">
<h2>Our Services</h2>
<p>We offer a wide range of services to help your business succeed in the digital age.</p>
</div>
<div class="row">
<div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div class="icon-box w-100">
<div class="icon"><i class="bi bi-briefcase"></i></div>
<h4 class="title"><a href="">Web Development</a></h4>
<p class="description">Creating powerful, fast, and scalable web applications tailored to your business needs.</p>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div class="icon-box w-100">
<div class="icon"><i class="bi bi-card-checklist"></i></div>
<h4 class="title"><a href="">UI/UX Design</a></h4>
<p class="description">Designing intuitive and beautiful user interfaces that provide an exceptional user experience.</p>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div class="icon-box w-100">
<div class="icon"><i class="bi bi-bar-chart"></i></div>
<h4 class="title"><a href="">Data Analytics</a></h4>
<p class="description">Turning your data into actionable insights to drive business growth and strategy.</p>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex align-items-stretch mb-5 mb-lg-0">
<div class="icon-box w-100">
<div class="icon"><i class="bi bi-binoculars"></i></div>
<h4 class="title"><a href="">Cloud Solutions</a></h4>
<p class="description">Leveraging the power of the cloud for scalable, secure, and reliable infrastructure.</p>
</div>
</div>
</div>
</div>
</section><!-- End Services Section -->
<!-- ======= Contact Section ======= -->
<section id="contact" class="contact">
<div class="container">
<div class="section-title">
<h2>Contact Us</h2>
<p>Have a question or want to work with us? Drop us a line.</p>
</div>
<div class="row">
<div class="col-lg-12 mt-5 mt-lg-0 d-flex align-items-stretch">
<form action="index.php" method="post" role="form" class="php-email-form w-100">
<div class="row">
<div class="form-group col-md-6">
<label for="name">Your Name</label>
<input type="text" name="name" class="form-control" id="name" required>
</div>
<div class="form-group col-md-6">
<label for="name">Your Email</label>
<input type="email" class="form-control" name="email" id="email" required>
</div>
</div>
<div class="form-group">
<label for="name">Message</label>
<textarea class="form-control" name="message" rows="10" required></textarea>
</div>
<div class="my-3">
<div class="loading">Loading</div>
<div class="error-message"></div>
<div class="sent-message">Your message has been sent. Thank you!</div>
</div>
<div class="text-center"><button type="submit">Send Message</button></div>
</form>
</div>
</div>
</div>
</section><!-- End Contact Section -->
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer" class="footer">
<div class="container">
<div class="copyright">
&copy; Copyright <strong><span>Darex</span></strong>. All Rights Reserved
</div>
<div class="credits">
Built with <a href="https://flatlogic.com/">Flatlogic Generator</a>
</div>
</div>
</footer><!-- End Footer -->
<!-- Toast Container -->
<div id="toast-container" class="toast-container"></div>
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<!-- Vendor JS Files -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- Template Main JS File -->
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>