125 lines
4.4 KiB
PHP
125 lines
4.4 KiB
PHP
<?php
|
||
/**
|
||
* File: contact.php
|
||
* Version: 1.3
|
||
* Path: /resources/views/partials/contact.php
|
||
* Purpose: Renders the contact form with inline error feedback and optional newsletter signup.
|
||
* Project: Wizdom Networks Website
|
||
*/
|
||
?>
|
||
|
||
<!-- ======= Contact Section ======= -->
|
||
<section id="contact" class="contact section">
|
||
<div class="container section-title" data-aos="fade-up">
|
||
<h2>Contact</h2>
|
||
<p>Let’s connect. Reach out with questions, ideas, or project inquiries — we’ll respond quickly.</p>
|
||
</div>
|
||
|
||
<div class="container" data-aos="fade-up" data-aos-delay="100">
|
||
<div class="row gy-4">
|
||
|
||
<!-- Contact Info -->
|
||
<div class="col-lg-5">
|
||
<div class="info-wrap">
|
||
|
||
<div class="info-item d-flex" data-aos="fade-up" data-aos-delay="200">
|
||
<i class="bi bi-geo-alt flex-shrink-0"></i>
|
||
<div>
|
||
<h3>Address</h3>
|
||
<p>Mississauga, Ontario<br>Canada</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-item d-flex" data-aos="fade-up" data-aos-delay="300">
|
||
<i class="bi bi-telephone flex-shrink-0"></i>
|
||
<div>
|
||
<h3>Call Us</h3>
|
||
<p>416-USE-WISE<br>(416-873-9473)</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-item d-flex" data-aos="fade-up" data-aos-delay="400">
|
||
<i class="bi bi-envelope flex-shrink-0"></i>
|
||
<div>
|
||
<h3>Email Us</h3>
|
||
<p>concierge@wizdom.ca</p>
|
||
</div>
|
||
</div>
|
||
|
||
<iframe src="https://maps.google.com/maps?q=Mississauga&t=&z=13&ie=UTF8&iwloc=&output=embed"
|
||
frameborder="0"
|
||
style="border:0; width: 100%; height: 270px;"
|
||
allowfullscreen=""
|
||
loading="lazy"
|
||
referrerpolicy="no-referrer-when-downgrade"></iframe>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Contact Form -->
|
||
<div class="col-lg-7">
|
||
<form action="/contact" method="post" class="php-email-form" data-aos="fade-up" data-aos-delay="200">
|
||
<div class="row gy-4">
|
||
|
||
<!-- Inline error message -->
|
||
<?php if (!empty($_SESSION['contact_error'])): ?>
|
||
<div class="col-12">
|
||
<div class="alert alert-danger">
|
||
<?= htmlspecialchars($_SESSION['contact_error']) ?>
|
||
</div>
|
||
</div>
|
||
<?php unset($_SESSION['contact_error']); ?>
|
||
<?php endif; ?>
|
||
|
||
<div class="col-md-6">
|
||
<label for="first-name" class="pb-2">First Name</label>
|
||
<input type="text" name="first_name" id="first-name" class="form-control" required>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<label for="last-name" class="pb-2">Last Name</label>
|
||
<input type="text" name="last_name" id="last-name" class="form-control" required>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<label for="email" class="pb-2">Email</label>
|
||
<input type="email" name="email" id="email" class="form-control" required>
|
||
</div>
|
||
|
||
<div class="col-md-6">
|
||
<label for="phone" class="pb-2">Phone</label>
|
||
<input type="tel" name="phone" id="phone" class="form-control">
|
||
</div>
|
||
|
||
<div class="col-md-12">
|
||
<label for="subject" class="pb-2">Subject</label>
|
||
<input type="text" name="subject" id="subject" class="form-control" required>
|
||
</div>
|
||
|
||
<div class="col-md-12">
|
||
<label for="message" class="pb-2">Message</label>
|
||
<textarea name="message" id="message" rows="10" class="form-control" required></textarea>
|
||
</div>
|
||
|
||
<div class="col-md-12 form-check mt-3">
|
||
<input class="form-check-input" type="checkbox" name="subscribe_newsletter" id="subscribe-newsletter">
|
||
<label class="form-check-label" for="subscribe-newsletter">
|
||
Sign me up for the Wizdom Networks newsletter
|
||
</label>
|
||
</div>
|
||
|
||
<div class="col-md-12 text-center">
|
||
<div class="loading">Loading</div>
|
||
<div class="error-message"></div>
|
||
<div class="sent-message">Your message has been sent. Thank you!</div>
|
||
<button type="submit">Send Message</button>
|
||
</div>
|
||
|
||
</div>
|
||
</form>
|
||
</div><!-- End Form Column -->
|
||
|
||
</div>
|
||
</div>
|
||
</section><!-- End Contact Section -->
|