<!DOCTYPE html>
<html lang="en">

<head>
    <?php include('includes/meta.php'); ?>
    <title>Xpress Powder Coating</title>
    <?php include('includes/css.php'); ?>
</head>

<body>

    <?php include('includes/social.php'); ?>
    <!-- ***** Header Area Start ***** -->
    <?php include('layouts/navbar.php'); ?>
    <!-- ***** Header Area End ***** -->

    <!-- ***** Breadcumb Area Start ***** -->
    <div class="fancy-breadcumb-area bg-img bg-overlay" style="background-image: url(img/bg-img/hero-1.jpg);">
        <div class="container h-100">
            <div class="row h-100 align-items-center">
                <div class="col-12">
                    <div class="breadcumb-content text-center">
                        <h2>Contact Us</h2>
                        <p>Get in touch with us for booking and more.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- ***** Breadcumb Area End ***** -->

    <!-- ***** Contact Area Start ***** -->
    <div class="fancy-contact-area section-padding-100">
        <div class="container">
            
            <div class="row">
                <div class="col-12 col-md-6">
                    <!-- Contact Details -->
                    <div class="contact-details-area">
                        <div class="section-heading">
                            <h2>Contact Us</h2>
                            <p>There are many ways to contact us. You may drop us a line, give us a call or send an email, choose what suits you the most.</p>
                        </div>
                        <p>+27 78 075 6172 <br> info@siyaseya.co.za
                        </p>
                        <p>63 Clydesdale Street Crystal Park  Benoni 1505
                        </p>
                        <p>Open hours: 8.00-18.00 Mon-Fri <br> Sunday: Closed</p>
                    </div>
                    <!-- Follow Us -->
                    <div class="follow-us-area">
                        <h2>Follow Us:</h2>
                        <a href="#" class="facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a>
                        <a href="#" class="twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
                        <a href="#" class="google-plus"><i class="fa fa-google-plus" aria-hidden="true"></i></a>
                        <a href="#" class="instagram"><i class="fa fa-instagram" aria-hidden="true"></i></a>
                    </div>
                </div>
                <div class="col-12 col-md-6">
                    <!-- Contact Form -->
                    <div class="contact-form-area">
                        <div class="section-heading">
                            <h2>Get In Touch With Us!</h2>
                            <p>Fill out the form below and send us an email.</p>
                        </div>
                        <?php
				// function __autoload($class){
				// 	require_once "classes/$class.php";
				// }
				spl_autoload_register(function($class) {
					include 'classes/' . $class . '.php';
				});
				
				$emails = new Emailpro();


				if(isset($_POST['send'])){

					$details = [
						"names"      => $_POST['name'],
						"email"      => $_POST['email'],
						"phone"      => $_POST['phone'],
						"subject"    => "New customer mail -".$_POST['name'],
						"message"    => $_POST['message'],
					];

					$res = $emails->sendemail($details);
					if($res){
						?>
						<script>
							Swal.fire(
								'Email Sent!',
								'Thank you for emailing us , we will respond soon!',
								'success'
								)
						</script>
						<?php
					}else{
						?>
						<script>
							Swal.fire(
								'Failed to send email!',
								'Sorry we could not send you email , please try again!',
								'error'
								)
						</script>
						<?php
					}

				}
			?>
                        <div class="contact-form">
                            <form action="contact.php" method="post">
                                <!-- Message Input Area Start -->
                                <div class="contact_input_area">
                                    <div class="row">
                                        <!-- Single Input Area -->
                                        <div class="col-12">
                                            <div class="form-group">
                                                <input type="text" class="form-control" name="name" id="name" placeholder="Name" required>
                                            </div>
                                        </div>
                                        <!-- Single Input Area -->
                                        <div class="col-12">
                                            <div class="form-group">
                                                <input type="email" class="form-control" name="email" id="email" placeholder="Email" required>
                                            </div>
                                        </div>
                                        <!-- Single Input Area -->
                                        <div class="col-12">
                                            <div class="form-group">
                                                <input type="text" class="form-control" name="phone" id="phone" placeholder="Phone number" required>
                                            </div>
                                        </div>
                                        <!-- Single Input Area -->
                                        <div class="col-12">
                                            <div class="form-group">
                                                <textarea name="message" class="form-control" id="message" cols="30" rows="10" placeholder="Messages" required></textarea>
                                            </div>
                                        </div>
                                        <!-- Single Input Area -->
                                        <div class="col-12">
                                            <button type="submit" class="btn fancy-btn fancy-dark bg-transparent" name="send">Send Message</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- ***** Contact Area End ***** -->

   
    <!-- ***** Footer Area Start ***** -->
    <?php include('layouts/footer.php');?>
    <!-- ***** Footer Area End ***** -->

    <?php include('includes/js.php'); ?>
</body>