<?php 
	include_once("../view/header-footer/InnerHeader.php");   
	include_once("leftMenu.php");   
?>    
<script> 
$(document).ready(function()
{   
 
        
        jQuery.validator.addMethod("lettersonly", function(value, element) 
        {
            return this.optional(element) || /^[a-z0-9\_\s]+$/i.test(value); 
        }, "Use alphanumaric & _ only"); 
        
        $( "#cuurentId" ).change(function() 
        {
               
              $.ajax({	
                    type: "POST",
                    url: URL+"/ajax/validation.php",
                    data: {TopUpDatacheck:1,Data:$(this).val()},
                    beforeSend: function(){ 
                    },
                    success: function(data)
                        {   
                            if(data==1)
                                 $("#AvailbleId").html("<span style='color:green;'>Valid Id  &#x2713</span>");
                            else  if(data==3) {
                                $("#cuurentId").val('');
                                 $("#AvailbleId").html("<span style='color:red;'>Invalid</span>"); 
                            }
                            else  if(data==2) {
                                $("#cuurentId").val('');
                                 $("#AvailbleId").html("<span style='color:red;'>Not Available X</span>");      
                            }
                        }
                    });
               
             
        });
        
        
         $( "#TopPin" ).change(function() 
        {
               
              $.ajax({	
                    type: "POST",
                    url: URL+"/ajax/validation.php",
                    data: {CheckDataPin:1,Data:$(this).val()},
                    beforeSend: function(){ 
                    },
                    success: function(data)
                        {    
                            var Data = JSON.parse(data);  
                            if(Data['Status']==1) 
                            {
                                 $("#MPINDetails").html("<span style='color:green;'>Valid PIN  Of Rs "+Data['Data']+" Rs &#x2713 </span>");
                                 
                                 var newStr = Data['Data'].replace(',','')
                                 $("#TpMt").val(parseInt(newStr));  
                            }
                            else    {
                                 $("#MPINDetails").html("<span style='color:red;'>Invalid PIN</span>");      
                                 $("#TopPin").val('');
                            }
                        }
                    });
               
             
        });
        
      
        
 

	$("#_frm").validate({
		
		errorElement:'div',
		rules:{ 
		 
			TopPin:{
				required:true   	
			} ,
			cuurentId:{
				required:true,
				lettersonly:true
			} 
		},
		messages:{ 
		    
			TopPin:{
				required:"Enter PIN" 
			},
			cuurentId:{
				required:"Ener Top Up User ID " 
			} 
			 
		}
	}); 
});  
</script>        
 
<div class="page-wrapper">
<div class="page-content"><style>
 button.close {
    float: right;
}   
    
#proceed {
  display: none;
} 

      
</style>
<div class="user_content">
<div class="container">
<div class="row pt-2 pb-2">
<div class="col-sm-12">
<ol class="breadcrumb ml-3 mr-3">
<li class="breadcrumb-item"><a href="https://atlanticworld.info/user/dashboard">Home /</a></li>
<li class="breadcrumb-item active" aria-current="page">Edit-Account &nbsp;&nbsp;</li> 
<li style="color:green;font-style:bold"> <?php if(isset($_SESSION['Regis']))  echo $_SESSION['Regis'];?></li>
</ol>
</div>
</div>
<div class="user_main_card mb-3 ">
<div class="user_card_body user_content_page ">
<h5 class="user_card_title filter_title"><i class="fa fa-user-circle" aria-hidden="true"></i>USER DETAIL</h5>
</div>
<div class="user_card_body user_content_page ">
<form id="_frm" method="post" enctype="multipart/form-data">
<div class="user_form_row user_form_content">
<div class="row">
    
    
 
<div class="col-lg-12 mb-3">
<label class="label_user_title">Name</label>
<div class="input-group ">
<input   name="Fname"  class="form-control"  value="<?php echo $FResult->nm;?>" placeholder="Enter Full Name" <?php if($FResult->Bname!='') echo "readonly";?> >
</div>
</div>
 
<div class="col-lg-12 mb-3">
<label class="label_user_title">Email</label>
<div class="input-group ">
<input    name="Email"  class="form-control"  value="<?php echo $FResult->eml;?>"  placeholder="Enter Eamil" <?php if($FResult->Bname!='') echo "readonly";?>>
</div>
</div>
<div class="col-lg-12 mb-3">
<label class="label_user_title">Mobile</label>
<div class="input-group ">
<input   name="Phone"   class="form-control" value="<?php echo $FResult->phm;?>"  placeholder="Enter Phone" <?php if($FResult->Bname!='') echo "readonly";?>>
</div>
</div>
 
 


<div class="col-lg-12 mb-3">
<label class="label_user_title">Account Holder Name</label>
<div class="input-group ">
<input    type="AccHoldernumber"   class="form-control"  name="AccHoldernumber"  value="<?php echo $FResult->accHolderNm;?>" <?php if($FResult->Bname!='') echo "readonly";?>    placeholder="Enter Bank Account Holder Name" >
</div>
</div>
 
<div class="col-lg-12 mb-3">
<label class="label_user_title">Bank Account Number</label>
<div class="input-group ">
<input    type="number"   class="form-control"  name="Bnumber"  value="<?php echo $FResult->Bnumber;?>"   <?php if($FResult->Bname!='') echo "readonly";?>  placeholder="Enter Bank Account Number" >
</div>
</div>

<div class="col-lg-12 mb-3">
<label class="label_user_title">Bank Name</label>
<div class="input-group ">
<input      class="form-control"  name="Bname"  value="<?php echo $FResult->Bname;?>"    <?php if($FResult->Bname!='') echo "readonly";?> placeholder="Enter Bank Account Name" >
</div>
</div>



<div class="col-lg-12 mb-3">
<label class="label_user_title">Bank Account IFSC</label>
<div class="input-group ">
<input    class="form-control"  name="Bifsc"   value="<?php echo $FResult->Bifsc;?>"   <?php if($FResult->Bname!='') echo "readonly";?>   placeholder="Enter Bank Account Name" >
</div>
</div>


<div class="col-lg-12 mb-3">
<label class="label_user_title">Bank Branch</label>
<div class="input-group ">
<input   class="form-control"  name="Bbranch"   value="<?php echo $FResult->Bbranch;?>" <?php if($FResult->Bname!='') echo "readonly";?>   placeholder="Enter Bank Branch" >
</div>
</div>


<div class="col-lg-12 mb-3">
<label class="label_user_title">UPI-1</label>
<div class="input-group ">
<input   class="form-control"  name="UPI"   value="<?php echo $FResult->UPI;?>"    placeholder="Enter UPI-1" >
</div>
</div>


<div class="col-lg-12 mb-3">
<label class="label_user_title">UPI-2</label>
<div class="input-group ">
<input   class="form-control"  name="UPI2"   value="<?php echo $FResult->UPI2;?>"   placeholder="Enter UPI-2" >
</div>
</div>


<div class="col-lg-12 mb-3">
<label class="label_user_title">UPI-3</label>
<div class="input-group ">
<input   class="form-control"  name="UPI3"   value="<?php echo $FResult->UPI3;?>"   placeholder="Enter UPI-3" >
</div>
</div>


<div class="col-lg-12 mb-3">
<label class="label_user_title">UPI-4</label>
<div class="input-group ">
<input   class="form-control"  name="UPI2"   value="<?php echo $FResult->UPI4;?>"   placeholder="Enter UPI-4" >
</div>
</div>

<div class="col-lg-12 mb-3">
<label class="label_user_title">UPI-5</label>
<div class="input-group ">
<input   class="form-control"  name="UPI2"   value="<?php echo $FResult->UPI5;?>"   placeholder="Enter UPI-5" >
</div>
</div>




<!--div class="col-lg-12 mb-3">
<label class="label_user_title">Passbook</label>
<div class="input-group ">
<input  type="file" class="form-control" <?php if($FResult->Bname!='') echo "readonly";?>  name="payment_slip" >
</div>
</div-->
 
 
 
</div>
</div>
<div class="user_form_row_data user_form_content ">
<div class="user_submit_button mb-2 mt-2">
    <?php 
        if($FResult->Bname=='') 
    { 
    ?>
        <input type="submit" name="submit" value="Update" id="" class="user_btn_button">
    <?php } ?>    
</div>
</div>
</form>
<div class="col-lg-12 mb-3">
<div class="data_save">
  
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<script>

var timeleft = 30;
    var downloadTimer = setInterval(function(){
    timeleft--;
    document.getElementById("countdowntimer").textContent = timeleft;
    if(timeleft <= 0)
        clearInterval(downloadTimer);
        
    },1000);
    
     $(document).ready(function() {
  setTimeout(function() {
    $("#proceed").show();
  }, 30000);
});  
</script>
</div> 
<?php 
    unset($_SESSION['Regis']);
	include_once("../view/header-footer/footer.php");    
?> 