<?php
include_once("include/main.inc.php");
date_default_timezone_set('Asia/Kolkata');
$admin_sql = mysqli_query($dbcon, "select * from admin_details");
$admin_res = mysqli_fetch_array($admin_sql);
$referer = $_SERVER['HTTP_REFERER'];
$ip = $_SERVER["REMOTE_ADDR"];

$enq_date = date('Y-m-d H:i:s');

if (isset($_POST['whatsapp_submit'])) {
  $name = $_POST['username'];
  $mobileNumber = $_POST['mobile'];
  $email = 'enquiry@webpulseindia.com';
  if (preg_match("/^[a-zA-Z]+$/", $name) && preg_match("/^[0-9]+$/", $mobileNumber)) {
    if ($name != '' && $mobileNumber != '') {
      $sql_ens = "insert into tbl_enquiry set en_name='$name', en_mobile='$mobileNumber', en_ip='$ip',en_comment='Whatsapp Enquiry', en_url='$referer', en_date='$enq_date'";
      $qry = mysqli_query($dbcon, $sql_ens);
      $to = $admin_res['email'];
      $to2 = 'webpulseindia@gmail.com';

      $subject = utf8_encode('New Leads Via whatsapp ' . $admin_res['subject']);
      $htmlContent =  '<table border="0" width="100%">
            <tbody>
      <tr>
        <td colspan="2">
          <strong>Dear Admin</strong></td>
      </tr>
      <tr>
        <td colspan="2">
          Enquiry Received with following info :</td>
      </tr>
      <tr>
        <td colspan="2">
          &nbsp;</td>
      </tr>
      <tr>
        <td width="26%">
          <strong>Post URL : </strong></td>
        <td>
          <span style="margin-top: 15px;">' . $referer . '</span></td>
      </tr>
       <tr>
        <td width="26%">
          <strong>Name : </strong></td>
        <td>
          <span style="margin-top: 15px;">' . $name . '</span></td>
      </tr>
    
     
     <tr>
        <td width="26%">
          <strong>Contact No : </strong></td>
        <td>
          <span style="margin-top: 15px;">' . $mobileNumber . '</span></td>
      </tr>
    
    </tbody>
           
            </table>';

      $headers = 'From: ' . 'Webpulseindia.com' . ' enquiry@webpulseindia.com' . "\r\n" .
        'Reply-To:  ' . $name . '<' . $email . '>' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();

      if ($to != '') {
        smtp_mailer($to, $email, $name, $subject, $htmlContent);
      }
      if ($to2 != '') {
        smtp_mailer($to2, $email, $name, $subject, $htmlContent);
      }
      if ($to3) {
        smtp_mailer($to3, $email, $name, $subject, $htmlContent);
      }
      // @mail($to, $subject, $htmlContent, $headers);
      // @mail($to2, $subject, $htmlContent, $headers);
      // @mail($to3, $subject, $htmlContent, $headers);

      $resp = [
        'message_response' => 'https://api.whatsapp.com/send?phone=' . $admin_res['whatsapp_no'] . '&text=Hello, I was on Your Website ' . $referer . ' and wanted to Enquire about your Services.',
        'status' => true
      ];
      echo json_encode($resp);
      exit;
    } else {
      $resp = [
        'message_response' => 'All the fields are Mandatory!',
        'status' => false
      ];
      echo json_encode($resp);
      exit;
    }
  } else {
    $resp = [
      'message_response' => 'Name field must contain alphabet and Number field must contain number only',
      'status' => false
    ];
    echo json_encode($resp);
    exit;
  }
}
?>

<?php
$mobileNumber = "";
if (isset($_POST['submit-side'])) {
  $name = !empty($_POST['names']) ? $_POST['names'] : '';
  $email = !empty($_POST['emails']) ? $_POST['emails'] : '';
  $mobileNumber = (!empty($_POST['mobiles'])) ? $_POST['mobiles'] : '';
  $location = !empty($_POST['locations']) ? $_POST['locations'] : '';
  $message = !empty($_POST['messages']) ? $_POST['messages'] : '';
  if (strpos($message, '#') !== false || strpos($message, '%') !== false || strpos($message, '@') !== false || strpos($message, '&') !== false || strpos($message, '~') !== false || strpos($message, 'https') !== false || strpos($message, 'http') !== false || strpos($message, 'www') !== false || strpos($message, '?') !== false) {
    $resp = [
      'message_response' => 'URL(s) and special characters are not allowed!',
      'status' => false
    ];
    echo json_encode($resp);
    exit;
  } else {

    if ($name != '' && $email != '' && $mobileNumber != '' && $location != '' && $message != '' && $ip != '') {

      //$qry=mysql_query($sql_ens);	
      //reCAPTCHA validation
      if (isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])) {

        $secret = SECRET_KEY;
        //get verify response data
        $data = array('secret' => $secret, 'response' => $_POST['g-recaptcha-response']);
        $verify = curl_init();
        curl_setopt($verify, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
        curl_setopt($verify, CURLOPT_POST, true);
        curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
        curl_setopt($verify, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($verify); //var_dump($response);
        $response = json_decode($response);

        if (!$response->success) {
          $resp = [
            'message_response' => 'Robot verification failed, please try again.',
            'status' => false
          ];
          echo json_encode($resp);
          exit;
        }

        if ($response->success) {

          $sql_ens = "insert into tbl_enquiry set en_name='$name', en_email='$email', en_mobile='$mobileNumber', en_country='$location', en_comment='$message', en_url='$referer', en_ip='$ip', en_date='$enq_date'";
          $qry = mysqli_query($dbcon, $sql_ens);

          $subject = utf8_encode($admin_res['subject']);
          $htmlContent =  '<table border="0" width="100%">
        <tbody>
  <tr>
    <td colspan="2">
      <strong>Dear Admin</strong></td>
  </tr>
  <tr>
    <td colspan="2">
      Enquiry Received with following info :</td>
  </tr>
  <tr>
    <td colspan="2">
      &nbsp;</td>
  </tr>
  <tr>
    <td width="26%">
      <strong>Post URL : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $referer . '</span></td>
  </tr>
   <tr>
    <td width="26%">
      <strong>Name : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $name . '</span></td>
  </tr>
  <tr>
    <td width="26%">
      <strong>Email Id : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $email . '</span></td>
  </tr>

  <tr>
    <td width="26%">
      <strong>Contact No : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $mobileNumber . '</span></td>
  </tr>
  <tr>
    <td>
      <strong>Location : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $location . '</span></td>
  </tr>
  <tr>
    <td>
      <strong>Message : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $message . '</span></td>
  </tr>
</tbody>
       
        </table>';

          $to = $admin_res['email'];
          $to2 = $admin_res['cc'];
          $to3 = 'webpulseindia@gmail.com';
          // $to3 = 'vicky.wpsranchi@gmail.com';

          $headers = 'From: ' . 'Webpulseindia.com' . ' enquiry@webpulseindia.com' . "\r\n" .
            'Reply-To:  ' . $name . '<' . $email . '>' . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
          if ($to != '') {
            smtp_mailer($to, $email, $name, $subject, $htmlContent);
          }
          if ($to2 != '') {
            smtp_mailer($to2, $email, $name, $subject, $htmlContent);
          }
          if ($to3) {
            smtp_mailer($to3, $email, $name, $subject, $htmlContent);
          }



          //   @mail($to, $subject, $htmlContent, $headers);
          //   @mail($to2, $subject, $htmlContent, $headers);
          //   @mail($to3, $subject, $htmlContent, $headers);
          $resp = [
            'message_response' => 'Thank you for your enquiry. Our team will contact you soon.',
            'status' => true
          ];
          echo json_encode($resp);
          exit;
        }
      } else {
        $resp = [
          'message_response' => 'Please click on the reCAPTCHA box.',
          'status' => false
        ];
        echo json_encode($resp);
        exit;
      }
    } else {
      $resp = [
        'message_response' => 'All the fields are Mandatory!',
        'status' => false
      ];
      echo json_encode($resp);
      exit;
    }
  }
}
?>
<?php if (isset($_POST['submit-enquiry'])) { ?>
  <script type="text/javascript">
    setTimeout(function() {
      $('#myModal').modal('show');
    }, 300);
  </script>
<?php } ?>

<?php
$mobileNumber = "";

if (isset($_POST['submit-cat'])) {
  $name = !empty($_POST['qname']) ? $_POST['qname'] : '';
  $email = !empty($_POST['qemail']) ? $_POST['qemail'] : '';
  $mobile = !empty($_POST['qmobile']) ? $_POST['qmobile'] : '';
  $location = !empty($_POST['qlocation']) ? $_POST['qlocation'] : '';
  $quantity = !empty($_POST['quantity']) ? $_POST['quantity'] : '';
  $message = !empty($_POST['qmessage']) ? $_POST['qmessage'] : '';
  if (strpos($message, '#') !== false || strpos($message, '%') !== false || strpos($message, '@') !== false || strpos($message, '&') !== false || strpos($message, '~') !== false || strpos($message, 'https') !== false || strpos($message, 'http') !== false || strpos($message, 'www') !== false || strpos($message, '?') !== false || strpos($quantity, '#') !== false || strpos($quantity, '%') !== false || strpos($quantity, '@') !== false || strpos($quantity, '&') !== false || strpos($quantity, '~') !== false || strpos($quantity, 'https') !== false || strpos($quantity, 'http') !== false || strpos($quantity, 'www') !== false || strpos($quantity, '?') !== false) {

    $resp = [
      'message_response' => 'URL(s) and special characters are not allowed!',
      'status' => false
    ];
    echo json_encode($resp);
    exit;
  } else {
    if ($name != '' && $email != '' && $mobile != '' && $location != '' && $message != '' && $ip != '' && $quantity != '') {

      //reCAPTCHA validation
      if (isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])) {
        $secret = SECRET_KEY;
        //get verify response data
        $data = array('secret' => $secret, 'response' => $_POST['g-recaptcha-response']);
        $verify = curl_init();
        curl_setopt($verify, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
        curl_setopt($verify, CURLOPT_POST, true);
        curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
        curl_setopt($verify, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($verify); //var_dump($response);
        $response = json_decode($response);
        if (!$response->success) {
          $resp = [
            'message_response' => 'Robot verification failed, please try again.',
            'status' => false
          ];
          echo json_encode($resp);
          exit;
        }
        if ($response->success) {
          $sql_ens = "insert into tbl_enquiry set en_name='$name', en_email='$email', en_mobile='$mobile', en_country='$location', en_comment='$message', en_url='$referer', en_quantity='$quantity', en_date='$enq_date'";
          $qry = mysqli_query($dbcon, $sql_ens);
          $subject = utf8_encode($admin_res['subject']);
          $htmlContent =  '<table border="0" width="100%">
        <tbody>
  <tr>
    <td colspan="2">
      <strong>Dear Admin</strong></td>
  </tr>
  <tr>
    <td colspan="2">
      Enquiry Received with following info :</td>
  </tr>
  <tr>
    <td colspan="2">
      &nbsp;</td>
  </tr>
  <tr>
    <td width="26%">
      <strong>Post URL : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $referer . '</span></td>
  </tr>
   <tr>
    <td width="26%">
      <strong>Name : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $name . '</span></td>
  </tr>
  <tr>
    <td width="26%">
      <strong>Email Id : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $email . '</span></td>
  </tr>

  <tr>
    <td width="26%">
      <strong>Contact No : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $mobile . '</span></td>
  </tr>
  <tr>
    <td>
      <strong>Location : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $location . '</span></td>
  </tr>

  <tr>
    <td>
      <strong>Quantity : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $quantity . '</span></td>
  </tr>
  <tr>
    <td>
      <strong>Message : </strong></td>
    <td>
      <span style="margin-top: 15px;">' . $message . '</span></td>
  </tr>
</tbody>
       
        </table>';
          $to = $admin_res['email'];
          $to2 = $admin_res['cc'];
          $to3 = 'webpulseindia@gmail.com';
    

          $headers = 'From: ' . 'Webpulseindia.com' . ' enquiry@webpulseindia.com' . "\r\n" .
            'Reply-To:  ' . $name . '<' . $email . '>' . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
          if ($to != '') {
            smtp_mailer($to, $email, $name, $subject, $htmlContent);
          }
          if ($to2 != '') {
            smtp_mailer($to2, $email, $name, $subject, $htmlContent);
          }
          if ($to3) {
            smtp_mailer($to3, $email, $name, $subject, $htmlContent);
          }
          //   @mail($to, $subject, $htmlContent, $headers);
          //   @mail($to2, $subject, $htmlContent, $headers);
          //   @mail($to3, $subject, $htmlContent, $headers);
          $resp = [
            'message_response' => 'Thank you for your enquiry. Our team will contact you soon.',
            'status' => true
          ];
          echo json_encode($resp);
          exit;
        }
      } else {
        $resp = [
          'message_response' => 'Please click on the reCAPTCHA box.',
          'status' => false
        ];
        echo json_encode($resp);
        exit;
      }
    } else {
      $resp = [
        'message_response' => 'All the fields are Mandatory!',
        'status' => false
      ];
      echo json_encode($resp);
      exit;
    }
  }
}

?>

<a id="web-pulse-scroll-up" href="#top" title="Go to Top"><i class="fa-solid fa-angle-up"></i></a>

<div class="mobile_stickybar hidden-lg hidden-md hidden-sm">
  <div class="circlbar"></div>
  <div class="shadowbar"></div>
  <div class="mobile_warpper">
    <ul>
      <li><a href="<?= SITE_URL_PATH; ?>" title="Home"> <i class="fa fa-home"></i> <span>Home</span></a></li>
      <li><a href="<?= SITE_URL_PATH; ?>/about.htm" title="About Us"> <i class="fa fa-user"></i> <span>About
            Us</span></a></li>
      <li><a href="<?= SITE_URL_PATH; ?>/our-products.htm" title="Our Products"><i class="fa fa-th-large"></i>
          <span>Our Products</span></a></li>
      <li><a href="<?= SITE_URL_PATH; ?>/contact.htm" title="Contact Us"> <i class="fa fa-envelope"></i>
          <span>Contact</span></a></li>
      <li><a href="tel:<?= $admin_res['phone']; ?>" title="Call Us"> <i class="fa fa-phone"></i> <span>Call
            Us</span> </a></li>
    </ul>
  </div>
</div>

<a class="enquiry" href="#" title="Send Enquiry" data-bs-toggle="modal" data-bs-target="#email"><i
    class="fas fa-envelope"></i><strong>Send Enquiry</strong>
</a>

<div class="modal fade" id="email" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog dialogg modal-sm">
    <div class="modal-content">
      <div class="modal-header">
        <div class="modal-title">Quick Enquiry</div>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <p class="send_p">If you have a urgent requirement please fill the form.</p>
        <form id="contact-form" name="contact-form1" method="post">
          <div class="alert alert-danger quick-error-message d-none"></div>
          <div class="alert alert-success quick-success-message d-none"></div>
          <div class="row">
            <div class="col-sm-12 col-lg-12 col-md-12 col-xl-12 col-xxl-12">
              <div class="form-group">
                <input placeholder="Full Name *" onkeyup="validateOnlyTextField(this)" class="form-control" type="text" tabindex="1"
                  name="names" id="names" value="<?php echo !empty($name) ? $name : ''; ?>"
                  required="" pattern="[a-z A-Z]+">
              </div>
            </div>
            <div class="col-sm-12 col-lg-12 col-md-12 col-xl-12 col-xxl-12">
              <div class="form-group">
                <input placeholder="Email ID *" class="form-control" type="email" tabindex="2"
                  name="emails" id="emails" value="<?php echo !empty($email) ? $email : ''; ?>"
                  required="">
              </div>
            </div>
            <div class="col-sm-12 col-lg-12 col-md-12 col-xl-12 col-xxl-12">
              <div class="form-group mb-3">
              <input type="hidden" class="countryName countryName" name="countryName" value="">
                <input placeholder="Phone Number *" class="form-control telePhone mobile" type="tel" maxlength="12"
                  minlength="10" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
                  oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');"
                  tabindex="3" name="mobiles" id="mobiles"
                  value="<?php echo (!empty($mobileNumber)) ? $mobileNumber : ''; ?>" required="">
              </div>
            </div>
            <div class="col-sm-12 col-lg-12 col-md-12 col-xl-12 col-xxl-12">
              <div class="form-group">
                <input placeholder="Location*" class="form-control" type="text" tabindex="4"
                  name="locations" onkeypress="return ValidateAlpha(event)"
                  value="<?php echo !empty($location) ? $location : ''; ?>" required=""
                  pattern="[a-z A-Z]+">
              </div>
            </div>
            <div class="col-sm-12 col-lg-12 col-md-12 col-xl-12 col-xxl-12">
              <div class="form-group">
                <textarea placeholder="Type your Message Here...." class="form-control" required=""
                  tabindex="5" name="messages"
                  id="messages"><?php echo !empty($message) ? $message : ''; ?></textarea>
              </div>
            </div>

            <div class="col-sm-12 col-lg-12 col-md-12 col-xl-12 col-xxl-12">
              <div class="form-group" style="margin-bottom: 0;">
                <div tabindex="6" class="g-recaptcha"
                  data-sitekey="<?= SITE_KEY; ?>"></div>
              </div>
            </div>
            <div class="col-sm-12 col-lg-12 col-md-12 col-xl-12 col-xxl-12">
              <div class="form-group">
                <button tabindex="7" class="modal_btn" type="submit" name="submit-side" value="Submit"
                  data-submit="...Sending">Submit</button>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<a class="whatapp_btn" href="#" title="Whatsapp Now" data-bs-toggle="modal" data-bs-target="#exampleModal">
  <i class="fa-brands fa-whatsapp"></i></a>
<div class="modal fade" id="exampleModal" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
        <div class="modal-title">Message on WhatsApp</div>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <form method="post" id="whatsapp_form">
          <div class="alert alert-danger whats-error-message d-none"></div>
          <div class="alert alert-success whats-success-message d-none"></div>
          <div class="row">
            <div class="col-lg-12">
              <div class="form-group">
                <input tabindex="1" class="form-control" type="text" name="username" id="username"
                  onkeyup="validateOnlyTextField(this)" placeholder="Your Name*" value="" required>
              </div>
            </div>
            <div class="col-lg-12">
              <div class="form-group mb-3">
              <input type="hidden" class="countryName countryName" name="countryName" value="">
                <input tabindex="2" class="form-control telePhone mobile" type="tel" placeholder="Your Mobile Number*"
                  name="mobile" id="mobile" value=""
                  onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
                  oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');"
                  minlength="10" maxlength="12" required>
              </div>
            </div>
            <div class="col-lg-12">
              <button tabindex="3" class="modal_btn" type="submit" name="whatsapp_submit" value="Submit"
                data-submit="...Sending">Submit</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<div class="modal fade" id="productID" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <div class="modal-title">Get A Quote</div>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <div class="row">
          <div class="col-lg-6 col-md-6">
            <div class="product_popup">
              <div class="product_popup_image">
                <img class="img-responsive catImg"
                  src="<?= SITE_URL_PATH; ?>/images/logo.png" alt="Gumboots"
                  title="Gumboots">
              </div>

            </div>
          </div>
          <div class="col-lg-6 col-md-6">
            <form name="contact-form" method="post" id="product_pop_form">

              <div class="alert alert-warning EmessageBoxBottom d-none"></div>
              <div class="alert alert-success SmessageBoxBottom d-none"></div>
              <div class="form-group">
                <input class="form-control" type="text" placeholder="Full Name*" tabindex="001" value=""
                  onkeyup="validateOnlyTextField(this)" required name="qname">
              </div>
              <div class="form-group">
                <input class="form-control" type="email" value="" tabindex="002" placeholder="Email ID*"
                  required name="qemail">
              </div>
              <div class="form-group mb-3">
              <input type="hidden" class="countryName countryName" name="countryName" value="">
                <input class="form-control telePhone mobile" value="" placeholder="Mobile Number*" type="tel"
                  tabindex="003" name="qmobile" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
                  oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');"
                  maxlength="12" minlength="10" required>
              </div>
              <div class="form-group">
                <input class="form-control" type="text" placeholder="Location *" required=""
                  tabindex="004" name="qlocation" onkeypress="return ValidateAlpha(event)" value="">
              </div>
              <div class="form-group">
                <input class="form-control" type="text" placeholder="Quantity *" required=""
                  tabindex="005" name="quantity" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
                  oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');"
                  maxlength="6" value="">
              </div>
              <div class="form-group">
                <textarea class="form-control" id="text2" name="qmessage" tabindex="105"
                  placeholder="Message*" required></textarea>
              </div>
              <div class="form-group">
                <div class="g-recaptcha" data-sitekey="<?= SITE_KEY; ?>"></div>
              </div>
              <div class="form-group">
                <button tabindex="008" class="modal_btn" type="submit" name="submit-cat" value="Submit"
                  data-submit="...Sending">Submit</button>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.1.3/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.20/jquery.fancybox.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.13/js/intlTelInput-jquery.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.9.0/jquery.validate.min.js"></script>
<script src="<?= SITE_URL_PATH; ?>/js/intlTelInput-jquery.js"></script>
<script src="<?= SITE_URL_PATH; ?>/js/themes.js"></script>
<!--Js file (developer.js) for enquiry forms, Don't remove it.-->
<script src="<?= SITE_URL_PATH; ?>/js/developer.js"></script>
<script>
   $(".telePhone").intlTelInput({
        preferredCountries: ["in", "us"],
        initialCountry: "in",
        separateDialCode: true,
    });
  
$('.iti__country-list li').click(function(){
  $("#code").val($(this).data('dial-code'));
  $(".mobile").val($(this).data('country-code-code'));
  $('.countryName').val($(".iti__country-name", this).text());
  $(".code").val($(this).data('dial-code'));
  $('.countryName').val($(".iti__country-name", this).text());
  $('.countryName1').val($(".iti__country-name", this).text());
})
</script>