
<?php include "header.php"; ?>
        <!-- ***** Breadcrumb Area Start ***** -->
        <section class="section breadcrumb-area overlay-dark d-flex align-items-center">
            <div class="container">
                <div class="row">
                    <div class="col-12">
                        <!-- Breamcrumb Content -->
                        <div class="breadcrumb-content d-flex flex-column align-items-center text-center">
                            <h2 class="text-white text-uppercase mb-3">About Us</h2>
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item"><a class="text-uppercase text-white" href="index.html">Home</a></li>

                                <li class="breadcrumb-item text-white active">About Us</li>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- ***** Breadcrumb Area End ***** -->

        <!-- ***** About Area Start ***** -->
        <section class="section about-area ptb_100">
            <div class="container">
                <div class="row justify-content-between align-items-center">
                    <div class="col-12 col-lg-6">
                        <!-- About Thumb -->
                        <div class="about-thumb text-center">
                            <img src="assets/img/about/about_thumb_1.jpg" alt="">
                        </div>
                    </div>
                    <div class="col-12 col-lg-6">
                        <!-- About Content -->
                        <div class="about-content section-heading text-center text-lg-left pl-md-4 mt-5 mt-lg-0 mb-0">
                            <h2 class="mb-3"><?php print $about_title?></h2>
                            <p><?php print $about_text;?></p>
                            <!-- Counter Area -->

                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- ***** About Area End ***** -->


        <!-- ***** Our Goal Area End ***** -->

        <!-- ***** Team Area Start ***** -->

        <!-- ***** Team Area End ***** -->

        <!--====== Contact Area Start ======-->
        <section id="contact" class="contact-area ptb_100">
            <div class="container">
                <div class="row justify-content-between align-items-center">
                    <div class="col-8 col-lg-12 pt-4 pt-lg-0">
                        <!-- Contact Box -->
                        <div class="contact-box ">
                            <!-- Contact Form -->
                            <?php
$status = "OK"; // Initial status
$msg = "";

if(isset($_POST['save'])){
    $firstName = mysqli_real_escape_string($con, $_POST['firstName']);
    $email = mysqli_real_escape_string($con, $_POST['email']);
    $phone = mysqli_real_escape_string($con, $_POST['phone']);
    $message = mysqli_real_escape_string($con, $_POST['message']);

    if(strlen($firstName) < 5){
        $msg .= "Name must be more than 5 characters long.<br>";
        $status = "NOTOK";
    }
    if(strlen($email) < 10){
        $msg .= "Email must be more than 10 characters long.<br>";
        $status = "NOTOK";
    }
    if(strlen($message) < 10){
        $msg .= "Message must be more than 10 characters long.<br>";
        $status = "NOTOK";
    }
    if(strlen($phone) < 8){
        $msg .= "Phone must be more than 8 characters long.<br>";
        $status = "NOTOK";
    }

    if($status == "OK"){
        $recipient = "admin@ombrellacompany.com";
        $formcontent = "NAME: $firstName \n EMAIL: $email \n PHONE: $phone \n MESSAGE: $message";
        $subject = "New Enquiry from Ombrella Website";
        $mailheader = "From: noreply@Ombrella.com \r\n";
        $result = mail($recipient, $subject, $formcontent);

        if($result){
            $errormsg = "
            <div class='alert alert-success alert-dismissible alert-outline fade show'>
            Enquiry Sent Successfully. We shall get back to you ASAP.
            <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
            </div>";
        }
    } elseif($status !== "OK") {
        $errormsg = "
        <div class='alert alert-danger alert-dismissible alert-outline fade show'>
        $msg <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
        </div>";
    } else {
        $errormsg = "
        <div class='alert alert-danger alert-dismissible alert-outline fade show'>
        Some Technical Glitch Is There. Please Try Again Later Or Ask Admin For Help.
        <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
        </div>";
    }
}
?>

<?php
if($_SERVER['REQUEST_METHOD'] == 'POST')
						{
						print $errormsg;
						}
   ?>

<form action="" method="post" enctype="multipart/form-data">
                                <div class="row">
                                    <div class="col-12">
										<h1 class="mb-3 text-center" style="font-size:38px;">We’d 
								<span class="text-primary" style="font-style: italic; font-family: cursive;"> Love </span>to hear you
							</h1><br><br>
                                        
                                            <div class="form-group">
												<label for="firstName">Your name <span class="" style="color:red; font-size:12px;">(*Required)</span></label>
												<input type="text" id="firstName" name="firstName" class="form-control" placeholder="Enter your first name" required>
											</div>
											
                                        
										<br>
                                        <div class="form-group">
											<label for="email">Email <span class="" style="color:red; font-size:12px;">(*Required)</span> </label>
                                            <input type="email" class="form-control" name="email" placeholder="Email" required="required">
                                        </div>
										<br>
										<br>
                                        <div class="form-group">
											<label for="phone">Phone <span class="" style="color:red; font-size:12px;">(*Required)</span></label>
                                            <input type="text" class="form-control" name="phone" placeholder="Contact Number">
                                        </div><br>
										
                                        <div class="form-group">
											<label for="phone">Message</label>
                                            <textarea class="form-control" name="message" placeholder="Message" required="required"></textarea>
                                        
                                    </div>
                                    </div>
									<br>
                                    
                                    <div class="col-6">
                                        <button type="submit" class="btn btn-bordered active btn-block mt-3" name="save"><span class="text-white"><i class="fas fa-paper-plane"></i></span> Submit</button>
                                    </div>
                                    
                                    
                                </div>
                                
                            </form>
                            <br><br>
                                    <div class="col-6 d-flex align-content-center">
                                        <button class="btn btn-bordered active btn-block mt-3" onclick="openDialer()">
                                            <span class="text-white">
                                                <i class="fas fa-paper-plane"></i>
                                            </span> 
                                            Call us <br><br> 0208 1448 699
                                        </button>
                                    </div>
                               
                            <p class="form-message"></p>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!--====== Contact Area End ======-->

        <!--====== Call To Action Area Start ======-->
        <section class="section cta-area bg-overlay ptb_100">
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-12 col-lg-10">
                        <!-- Section Heading -->
                        <div class="section-heading text-center m-0">
                            <h2 class="text-white"><?php print $enquiry_title; ?></h2>
                            <p class="text-white d-none d-sm-block mt-4"><?php print $enquiry_text; ?></p>
                            <a href="contact" class="btn btn-bordered-white mt-4">Contact Us</a>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!--====== Call To Action Area End ======-->
<?php include "footer.php"; ?>


<script>
    function openDialer() {
        window.location.href = 'tel:02081448699';  // Trigger the dialer with the phone number
    }
</script>
