<?php include 'header.php';?>
   <?php   
$domain=$_SERVER['SERVER_NAME']; 
// echo $domain;die;
$curPageName = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1); 
 $curPageName1 = ucfirst(substr($curPageName,0,-4));
?>
  
		<!-- Start Page Banner Area -->
		<div class="page-banner-area bg-color-161001 overflow-hidden">
			<div class="container-fluid p-0">
				<div class="row">
					<div class="col-lg-6">
						<div class="page-banner-content" data-cues="slideInUp">
							<h1>Contact Us</h1>
							
							<div class="page-banner-title">
								<h2>Contact Us</h2>
								<ul class="ps-0 mb-0 list-unstyled">
									<li>
										<a href="index.php">Home</a>
									</li>
									<li>
										<span>Contact Us</span>
									</li>
								</ul>
							</div>
						</div>
					</div>

					<div class="col-lg-6">
						<div class="page-banner-img object-fit-cover h-100">
							<img class="object-fit-cover h-100" src="assets/images/page-banner/banner-img-4.png" alt="banner-img-4">
						</div> 
					</div>
				</div>
			</div>
		</div>
		<!-- End Page Banner Area -->

		<!-- Start Contact Us Area -->
		<div class="contact-us-area ptb-150">
			<div class="container">
				<div class="row ">
					<div class="col-lg-6">
						<form class="contact-form" id="myForm" method="post">
							<h2 class="mb-4">Get in touch</h2>
							<div class="row">
							    <div id="check1"></div>
								
								<div class="col-lg-6">
									<div class="form-group mb-30">
										<input type="text" name="name" id="name" class="form-control" placeholder="Your name">
									</div> 
								</div>
								<div class="col-lg-6">
									<div class="form-group mb-30">
										<input type="text" name="phone" id="phone" class="form-control" placeholder="Phone">
									</div>
								</div>
								
								 <input type="hidden" name="url" id="url" value="<?php echo $curPageName; ?>" class="form-control required" placeholder="url...">

<input type="hidden" name="domain" id="domain" value="<?php echo $domain; ?>" class="form-control required" placeholder="domain...">

<input type="hidden" name="project_unique_code" id="project_unique_code" value="" class="form-control required">
								
									<div class="col-lg-6">
									<div class="form-group mb-30">
										<!--<input type="text" class="form-control" placeholder="Services"> -->
										<select class="form-control" id="service" name="service">
										    <option value="">Services</option>
										     <option value="Car Wash Services">Car Wash Services</option> 
										     <option value="Foam car wash">Foam car wash</option>
										     <option value="Interior Cleaning">Interior Cleaning</option> 
										     <option value="Ceramic Coating">Ceramic Coating</option>
										     <option value="Elastomer Membrane Coating">Elastomer Membrane Coating</option> 
										     <option value="Protection Film (PPF)">Protection Film (PPF)</option>
										     <option value="3M Ceramic Coating">3M Ceramic Coating</option> 
										     <option value="Sonax Ceramic Coating">Sonax Ceramic Coating</option>
										     <option value="Titan Elastomer Membrane Coating">Titan Elastomer Membrane Coating</option> 
										     <option value="Hypershield PPF">Hypershield PPF</option>
										     <option value="Proteq PPF">Proteq PPF</option> 
										     <option value="Llumar PPF">Llumar PPF</option>
										</select>
									</div>
								</div>
								
									<div class="col-lg-6">
									<div class="form-group mb-30">
										<input type="text" name="vname" id="vname" class="form-control" placeholder="Vehicle Name">
									</div>
								</div>
									<div class="col-lg-6">
									<div class="form-group mb-30">
										<input type="text" name="vnumber" id="vnumber" class="form-control" placeholder="Registered vehicle number">
									</div>
								</div>
									<div class="col-lg-6">
									<div class="form-group mb-30">
										<input type="datetime-local" name="date" id="date"class="form-control" placeholder="Time Slot" list="browsers">
										<!--<datalist id="browsers">-->
          <!--                                  <option value="9am- 11am">-->
          <!--                                  </option><option value="12am-2pm">-->
          <!--                                  </option><option value="2pm-4pm">-->
          <!--                                  </option><option value="4pm-6pm">-->
          <!--                                </option>-->
          <!--                                </datalist>-->
									</div>
								</div>
									<div class="col-lg-12">
									<div class="form-group mb-30">
										<input type="text" name="address" id="address"class="form-control" placeholder="Address- Location" >
										
									</div>
								</div>
								<div class="col-lg-12">
									<div class="form-group mb-30">
										<textarea class="form-control" name="message" id="message" placeholder="Your comment here..." cols="20" rows="2"></textarea>
									</div>
								</div>
								<!--<div class="col-lg-12">-->
								<!--	<div class="form-group mb-30">-->
								<!--		<div class="form-check">-->
								<!--			<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">-->
								<!--			<label class="form-check-label" for="flexCheckDefault">-->
								<!--				Save my name, email, and website in this browser for the next time I contact.-->
								<!--			</label>-->
								<!--		</div>-->
								<!--	</div>-->
								<!--</div>-->
								<div class="col-lg-12">
									<div class="form-group">
										<button type="submit" id="btn_submit" class="default-btn w-100 d-block">Send Your Message</button>
									</div>
								</div>
							</div>
						</form>
					</div>
					<div class="col-lg-6">
						<div class="contact-us-content ms-122">
							<h4>Contact With Us</h4>
							<p class="detail">Get in touch with us today for personalized assistance and support</p>
							
							<ul class="ps-0 list-unstyled mb-0">
								<li class="d-flex align-items-center">
									<i class="ri-mail-line"></i>
									<a href="mailto:getautotherapy@gmail.com"><span >getautotherapy@gmail.com</span></a>
								</li>
							
								<li class="d-flex align-items-center">
									<i class="ri-phone-line"></i>
									<a href="tel:+91 7030911966">+91 7030911966</a>
								</li>
								<li class="d-flex align-items-center">
									<i class="ri-user-location-fill"></i>
								<span>Shop No.12, Auto Therapy, Sai Shrushti, Right Canal Rd, Serene Meadows, Anandvalli, Nashik, Maharashtra 422013</span>
								</li>
									<li class="d-flex align-items-center">
									<i class="ri-time-line"></i>
									<span>Mon-sat (09:00AM-07PM)</span>
								</li>
							</ul>
						</div>
					</div>
				</div>

				<div class="row pt-150 align-items-center">
				
						<div class="col-lg-6">
						<div class="contac-map">
							<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3749.009347776195!2d73.73367345970041!3d20.008122376032595!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3bdded958dfc2bad%3A0x539dd38a7a0f45e9!2sAutoTherapy-Car%20Wash%20%26%20Detailing%20Studio!5e0!3m2!1sen!2sin!4v1709275157290!5m2!1sen!2sin" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
						</div>
					</div>

					<div class="col-lg-6">
						<div class="contact-img ms-122">
							<img src="assets/images/contact-img.jpg" alt="contact-img">
						</div>
					</div>
				</div>
			</div>
		</div>
	
	
		<!-- End Appointment Area -->
		<?php include 'footer.php';?>


 <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
    var $j = jQuery.noConflict();

    $j(document).ready(function() {
        $j('#myForm').submit(function(e) {
            e.preventDefault();

            var name = $j('#name').val();
            var phone = $j('#phone').val();
            var service = $j('#service').val();
            var vname = $j('#vname').val();
            var vnumber = $j('#vnumber').val();
            var date = $j('#date').val();
            var address = $j('#address').val();
            var message = $j('#message').val();
            var error = false;

            var nameRegex = /^[a-zA-Z\s]*$/;
            var emailRegex = /\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.in)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2}))$)\b/gi;
            var mobileRegex = /\d{10}/;

            function showError(message) {
                $j('#check1').html(message).css("color", "red");
            }

            if (!name.match(nameRegex) || name === "") {
                showError('** Please Enter your Name **');
                $j("#name").focus();
                return false;
            }

           
            if (!phone.match(mobileRegex) || phone === "") {
                showError('** Please Enter Your Phone No **');
                $j("#phone").focus();
                return false;
            }

             if (service === "") {
                            showError('** Please select Your service **');
                            $j("#service").focus();
                            return false;
                        }
            
             if (vname === "") {
                            showError('** Please Enter Your Vehicle Name **');
                            $j("#vname").focus();
                            return false;
                        }
            
             if (vnumber === "") {
                            showError('** Please Enter Your Vehicle Number **');
                            $j("#vnumber").focus();
                            return false;
                        }
            
             if (date === "") {
                            showError('** Please Select Your Date **');
                            $j("#date").focus();
                            return false;
                        }
             if (address === "") {
                            showError('** Please Enter Your address **');
                            $j("#address").focus();
                            return false;
                        }

            if (message === "") {
                showError('** Please Enter Your Message **');
                $j("#message").focus();
                return false;
            }

            $j('#btn_submit').attr({'disabled': 'true', 'value': 'Sending...'});
            var form = $j('#myForm')[0];
            var formData = new FormData(form);

            $j.ajax({
                url: "contact_valid.php",
                type: "POST",
                data: formData,
                contentType: false,
                cache: false,
                processData: false,
                success: function(data) {
                    if (data === 'sent') {
                        $j('#btn_submit').removeAttr('disabled').attr('value', 'Sent');
                        showError('**Thank You For Contacting Us,We Will Contact You Soon.. **');
                        //   echo "<p style='color: green;'>Thank you for contacting us! We will contact you soon.</p>";
                        $j("#myForm").get(0).reset();
                    } else {
                        $j('#btn_submit').removeAttr('disabled').attr('value', 'Retry');
                        showError(data);
                    }
                }
            });
            return false;
        });
    });
</script>
