<div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-3 col-lg-pull-9 col-md-pull-9 order-xxl-first order-xl-first order-lg-first order-md-first order-sm-first order-last">
         <div class="left_sidebar">
          <div class="left_title">Our Products</div>
           <ul>
<?php
$sql=mysqli_query($dbcon,"select * from category_tbl where parentID='1'");
while($res=mysqli_fetch_array($sql))
{
?>
<li><a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($res['catName']);?>.htm" title="<?php echo $res['displayName']; ?> Manufacturers in Haryana"><?php echo $res['displayName']; ?></a>

<?php 
if($res['catName']==$cat_res4[catName] || $res['catName']==$cat_res3[catName] || $res['catName']==$cat_res2[catName] || $res['catName']==$catn)
{
$catID=$res['catID'];
$sql_sub=mysqli_query($dbcon,"select * from category_tbl where parentID='$catID'");
if(mysqli_num_rows($sql_sub) > 0)
{
?>

<ul>
<?php
 while($subres=mysqli_fetch_array($sql_sub))
 {
 $catIDs=$subres['catID'];
 $sql_subsub=mysqli_query($dbcon,"select * from category_tbl where parentID='$catIDs'");
 if(mysqli_num_rows($sql_subsub) > 0)
 {
 ?>
<li><a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subres['catName']);?>.htm" title="<?php echo $subres['displayName']; ?> Manufacturers in Haryana"><?php echo $subres['displayName']; ?></a>
<ul>
<?php
 while($subsubres=mysqli_fetch_array($sql_subsub))
 {
 $catIDss=$subsubres['catID'];
 $sql_final=mysqli_query($dbcon,"select * from category_tbl where parentID='$catIDss'");
 if(mysqli_num_rows($sql_final) > 0)
 {
 ?>
<li>
<a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subsubres['catName']);?>.htm" title="<?php echo $subsubres['displayName']; ?> Manufacturers in Haryana"><?php echo $subsubres['displayName']; ?></a>
<ul>
<?php
while($finalres=mysqli_fetch_array($sql_final))
{
?>
<li>
<a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($finalres['catName']);?>.htm" title="<?php echo $finalres['displayName']; ?> Manufacturers in Haryana"><?php echo $finalres['displayName']; ?></a>
</li>
<?php 
 }
 ?>
</ul>
</li>
<?php 
 }
else
{
?>
<li>
<a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subsubres['catName']);?>.htm" title="<?php echo $subsubres['displayName']; ?> Manufacturers in Haryana"><?php echo $subsubres['displayName']; ?></a>
</li>
<?php
}
}
?>
</ul>
</li>
<?php
}
else
{
?>
<li>
<a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($subres['catName']);?>.htm" title="<?php echo $subres['displayName']; ?> Manufacturers in Haryana"><?php echo $subres['displayName']; ?></a>
</li>
<?php
}
}
?>
</ul>

<?php
}
}
?>
    </li>
<?php 
}
?>
</ul>  
  </div>
  <div id="sticky-anchor"></div>
<div class="left_sidebar" id="sidebar">
     <?php
    include_once ("include/main.inc.php"); 
    $admin_sql=mysql_query($dbcon,"select * from admin_details");
    $admin_res=mysql_fetch_array($admin_sql);
    $referer = $_SERVER['HTTP_REFERER'];
    $ip=$_SERVER['REMOTE_ADDR'];
    $mobileNumber = "";
    if (isset($_POST['submit-side']))
    {
        $name = !empty($_POST['names'])?$_POST['names']:'';
        $email = !empty($_POST['emails'])?$_POST['emails']:'';
        $mobileNumber = (!empty($_POST['mobiles']))?$_POST['mobiles']:'';
        $locations = !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){
      $errMsgs ='URL(s) and special characters are not allowed!';
  } else { 
            
            if($name != '' && $email != '' && $mobileNumber != '' && $locations != '' && $message != '' && $ip != '' ){

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

                   $secret = '6Ld_T_sdAAAAABDPce5lEgKlKyuBFD1fxFGluR1-';
		//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) {
            $errMsgs = 'Please click on the reCAPTCHA box.';
        }	
        
        if($response->success) {

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

            $subject = utf8_encode('WebpulseGujarat.com '.' - '. $admin_res['subject']);
            $htmlContent = "
            Customer Details:

            Url: ".$referer."

            Name: ".$name."

            Email: ".$email."

            Mobile: ".$mobileNumber."

            Location:".$locations."

            Message: ".$message."
            ";
            
           /* $to = $admin_res['email'];
            $to2 = $admin_res['cc'];
            $to3 = 'webpulseGujarat@gmail.com'; */  
            $to3 = 'webpul.webprogrammer102@gmail.com';
            $headers = 'From: '.'WebpulseGujarat.com'.' enquiry@webpulseGujarat.com' . "\r\n" .
            'Reply-To:  '.$name.'<'.$email.'>' . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
            @mail($to,$subject,$htmlContent,$headers);
            @mail($to2,$subject,$htmlContent,$headers);
            @mail($to3,$subject,$htmlContent,$headers);
            $succMsg = 'Thank you for your enquiry. Our team will contact you soon.';
$name = '';
$email = '';
$mobileNumber = '';
$locations = '';
$message = '';    

 }  
} else { $errMsgs ='Robot verification failed, please try again.';}
} else { $errMsgs ='All the fields are Mandatory!';}
  
}
}
?>
    
        <div class="left_title">Quick Contact</div>
        <form name="contact-form" method="post" class="quick_form">
             <script src="https://www.google.com/recaptcha/api.js" async defer></script>
             <?php if(!empty($errMsgs)): ?><div class="alert alert-warning EmessageBox1"><?php echo $errMsgs; ?></div><?php endif; ?>
<?php if(!empty($succMsg)): ?><div class="alert alert-success SmessageBox1"><?php echo $succMsg; ?></div><?php endif; ?>
          <div class="form-group">
           <input placeholder="Full Name *" class="form-control" type="text" tabindex="1" name="names" id="names" value="<?php echo !empty($name)?$name:''; ?>" required="" pattern="[a-z A-Z]+" onkeypress="return ValidateAlpha(event)">
          </div>

          <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 class="form-group">
            <input placeholder="Phone Number *" class="form-control" type="tel" maxlength="10" minlength="10" tabindex="3" name="mobiles" id="mobiles" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" value="<?php echo (!empty($mobileNumber))?$mobileNumber:''; ?>" required="">
          </div>
                        <div class="form-group">
                <input placeholder="Location*" class="form-control" type="text" tabindex="4" name="locations" value="<?php echo !empty($locations)?$locations:''; ?>" required="" pattern="[a-z A-Z]+" onkeypress="return ValidateAlpha(event)">
              </div>
                        <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 class="form-group" style="margin-bottom: 0;">
       <div tabindex="6" class="g-recaptcha" data-sitekey="6Ld_T_sdAAAAAJYYygzCQ9I068mGeRCu_Boz7ecO"></div>
          </div>
          <div class="form-group" style="margin-bottom: 0;"></div>
            <div class="form-group">
            <button class="modal_btn" type="submit" name="submit-side" id="contact-submit" value="Submit">Submit</button>
          </div>
        </form>
        </div>

          </div>