<?php 	include_once('../../config.php');   	
	//	include_once(ABS_PATH.'/admin/login_check.php');    
 
			if(isset($_POST['submitP']))
			{     
        			$stmt=$conn->prepare("insert into  UI__PanVeri (panId,custId,Tdate,nm) values(:panId,:custId,:Tdate,:nm)    "); 
                    $stmt->bindValue(':panId',$_POST['pan'], PDO::PARAM_STR); 
                    $stmt->bindValue(':custId', $_POST['userid'], PDO::PARAM_STR); 
                    $stmt->bindValue(':Tdate',date("d-M-Y"), PDO::PARAM_STR);  
                    $stmt->bindValue(':nm', $_POST['nm'] , PDO::PARAM_STR);  
                    $stmt->execute();   
                    $_SESSION['userpanadhar'] = 1;
                    header("Location: panAdhar.php ");  
    				die; 
			}  
			
			
			if(isset($_POST['submitA']))
			{         
        			$stmt=$conn->prepare("insert into   UI__AdharVeri (adh,nm,address,dob,cntry,dist,pin,state,custId,Tdate) values(:adh,:nm,:address,:dob,:cntry,:dist,:pin,:state,:custId,:Tdate)    "); 
                    $stmt->bindValue(':adh',$_POST['adhar'], PDO::PARAM_STR); 
                    $stmt->bindValue(':nm', $_POST['nm'], PDO::PARAM_STR); 
                    $stmt->bindValue(':address',$_POST['address'], PDO::PARAM_STR);  
                    $stmt->bindValue(':dob', $_POST['dob'] , PDO::PARAM_STR);  
                    $stmt->bindValue(':cntry', $_POST['cnt'] , PDO::PARAM_STR);  
                    $stmt->bindValue(':dist', $_POST['dist'] , PDO::PARAM_STR);  
                    $stmt->bindValue(':pin', $_POST['pin'] , PDO::PARAM_STR);  
                    $stmt->bindValue(':state', $_POST['state'] , PDO::PARAM_STR);  
                    $stmt->bindValue(':custId', $_POST['userid'] , PDO::PARAM_STR);  
                    $stmt->bindValue(':Tdate',date("d-M-Y"), PDO::PARAM_STR);  
                    $stmt->execute();    
                    $_SESSION['userpanadhar'] = 1;
                    header("Location: panAdhar.php ");  
    				die; 
			}  
			
include ABS_PATH.'/admin/header.php';	
?>


 <script>
	$(function() {
		$( "#datepicker" ).datepicker(); 
	}); 
  
	$(document).ready(function()
	{   

	
	$("#product_frm").validate({
		
		errorElement:'div',
		rules:{ 
			userid:{
				required:true				 
			} 
			
			
			
		},
		messages:{				
			 
			 city:{
				required:"Enter city name"				 
			} 
		}
	});


	});
 


</script>



<script> 
$(document).ready(function()
{   
  
	
	    var URL = "<?php echo ROOTPATH; ?>";    
        $( "#userid" ).change(function() 
        {      
                   
                     
          $.ajax({	
                type: "POST",
                url: URL+"/ajax/validation.php",
                data: {userDatacheck:1,Data:$("#userid").val()},
                beforeSend: function(){ 
                },
                success: function(data)
                    {        
                        $("#AvailbleId").html("<span style='color:green;'>"+data+" &#x2713</span>");
                        myArray = data.split(","); 
                        $("#panName").val(myArray[0]);
                    }
                });   
        });
        
         $( "#useridA" ).change(function() 
        {      
                
                     
          $.ajax({	
                type: "POST",
                url: URL+"/ajax/validation.php",
                data: {userDatacheck:1,Data:$("#useridA").val()},
                beforeSend: function(){ 
                },
                success: function(data)
                    {        
                        
                        $("#AvailbleIdA").html("<span style='color:green;'>"+data+" &#x2713</span>");
                         myArray = data.split(","); 
                        $("#adharName").val(myArray[0]);
                    }
                });   
        });
 
 
}); 

</script>    

		 
		 <div class="col-md-10">

	  			<div class="row">
	  				<div class="col-md-12">
	  					<div class="content-box-large">
							<div class="panel-heading">
								<div class="panel-title"> <h3><?php if(isset($_SESSION['userpanadhar']))  echo "PAN UPLOADED SUCCEFULLY"; else echo "Pan  Verify" ?> </h3></div>    
								
								<!--div class="panel-options"> 

								   <input type="button"  class="btn btn-warning" name="btnback" id="btnback" value=" Back " onClick="javascript:location.href='funtransfer.php';" />
								  
								</div-->
							  
								 
							</div>
							
							
			  				<div class="panel-body">    
			  					<form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" id="product_frm"> 
							   	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Userid</label>
								    <div class="col-sm-6">
								      <input name="userid"  id="userid" class="form-control"   placeholder="Enter UserId"    required >
								      <span id="AvailbleId"></span>
								    </div>
								 </div>
								 <hr>
								     
								     
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">PAN</label>
								    <div class="col-sm-6">
								      <input name="pan"  type="text" class="form-control"   placeholder="Enter Pan"   required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Name</label>
								    <div class="col-sm-6">
								      <input name="nm" id="panName"  type="text" class="form-control"   placeholder="Enter Name"   required >
								    </div>
								 </div>
								 <hr>
								 
								  <div class="form-group">
										<label for="inputEmail3" class="col-sm-2 control-label">Submit</label>
										<div class="col-sm-6">
										  <input type="submit"    class="btn btn-primary"  name="submitP" value="Submit">
										</div>
								  </div>   
								</form>  
			  				</div>
			  			</div>
			  			
			  			
			  			
			  			
			  			<div class="content-box-large">
							<div class="panel-heading">
								<div class="panel-title"> <h3> </h3></div>    
								<div class="panel-title"> <h3><?php if(isset($_SESSION['userpanadhar']))  echo "ADHAR UPLOADED SUCCEFULLY"; else echo "Adhar  Verify"; ?> </h3></div>    
							 
								 
							</div>
							
							
			  				<div class="panel-body">    
			  					<form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" id="product_frm"> 
							   	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Userid</label>
								    <div class="col-sm-6">
								      <input name="userid"  id="useridA" class="form-control"   placeholder="Enter UserId"    required >
								      <span id="AvailbleIdA"></span>
								    </div>
								 </div>
								 <hr>
								     
								     
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">ADHAR NO</label>
								    <div class="col-sm-6">
								      <input name="adhar"  type="text" class="form-control"   placeholder="Enter Pan"   required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Name</label>
								    <div class="col-sm-6">
								      <input name="nm"  type="text" class="form-control"   id="adharName" placeholder="Enter Pan"  value="NA"  required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Address</label>
								    <div class="col-sm-6">
								      <input name="address"  type="text" class="form-control"   placeholder="Enter Address"  value="NA"  required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">DOB</label>
								    <div class="col-sm-6">
								      <input name="dob"  type="text" class="form-control"   placeholder="Enter DOB"  value="NA"  required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Country</label>
								    <div class="col-sm-6">
								      <input name="cnt"  type="text" class="form-control"   placeholder="Enter Country"  value="NA"  required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Dist</label>
								    <div class="col-sm-6">
								      <input name="dist"  type="text" class="form-control"   placeholder="Enter Dist"  value="NA"  required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">PIN</label>
								    <div class="col-sm-6">
								      <input name="pin"  type="text" class="form-control"   placeholder="Enter pin"  value="NA"  required >
								    </div>
								 </div>
								 <hr>
								 
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">State</label>
								    <div class="col-sm-6">
								      <input name="state"  type="text" class="form-control"   placeholder="Enter state"  value="NA"  required >
								    </div>
								 </div>
								 <hr>   
								       
								 
								  <div class="form-group">
										<label for="inputEmail3" class="col-sm-2 control-label">Submit</label>
										<div class="col-sm-6">
										  <input type="submit"    class="btn btn-primary"  name="submitA" value="Submit">
										</div>
								  </div>   
								</form>  
			  				</div>
			  			</div>
			  			
			  			
	  				</div> 
	  			</div>  


	  		<!--  Page content -->
		  </div>
		</div>
    </div>

<?php  include ABS_PATH.'/admin/footer.php';	
    unset($_SESSION['userpanadhar']);
?>    