<?php include "layouts/menu.php"; ?>
    <?php $hpl=$_REQUEST['hpl']; $mfin2=$_REQUEST['mfin2'];
	?>
	<?php $area=$_REQUEST['area']; ?>
<script src=
        "https://code.jquery.com/jquery-3.2.1.min.js">
    </script>

 <script> 
function add() 
{ 
var	a1=Number(document.getElementById("post1").value);
var	a2=Number(document.getElementById("post2").value);
var	a3=Number(document.getElementById("post3").value);
var	a4=Number(document.getElementById("post4").value);
var	a5=Number(document.getElementById("post5").value);
var	a6=Number(document.getElementById("post6").value);
var	a7=Number(document.getElementById("post7").value);
var	a8=Number(document.getElementById("post8").value);
var	a9=Number(document.getElementById("post9").value);
var	a10=Number(document.getElementById("post10").value);
var	a11=Number(document.getElementById("post11").value);
var	a12=Number(document.getElementById("post12").value);
var	a13=Number(document.getElementById("post13").value);
var	a14=Number(document.getElementById("post14").value);
var	a15=Number(document.getElementById("post15").value);
var	a16=Number(document.getElementById("post16").value);
var	a17=Number(document.getElementById("post17").value);
var	a18=Number(document.getElementById("post18").value);
var	a19=Number(document.getElementById("post19").value);
var	a20=Number(document.getElementById("post20").value);
var a21 = ((a1 * 1)+(a2 * 1)+(a3 * 1)+(a4 * 1)+(a5 * 1)+(a6 * 1)+(a7 * 1)+(a8 * 1)+(a9 * 1)+(a10 * 1)+(a11 * 1)+(a12 * 1)+(a13 * 1)+(a14 * 1)+(a15 * 1)+(a16 * 1)+(a17 * 1)+(a18 * 1)+(a19 * 1)+(a20 * 1));
document.getElementById("tottt").value =(a21*1); 

} 
</script>
<script> 
function nnow() 
{ 
var x = document.getElementById("qx").value; 
var y = document.getElementById("jkjk").value; 
document.getElementById("ax").value =parseInt((x*1)+(y*1)); 

} 
</script>
 <script> 
function sum() 
{ 
var z = document.getElementById("tot").value; 
var q = document.getElementById("payment").value; 
document.getElementById("balance").value =((z*1)-(q*1));  
} 
</script>
<script> 
function asal() 
{ 
var z = document.getElementById("asa").value; 
var q = document.getElementById("jkjk").value; 
document.getElementById("asa").value =((z*1)*(q*1)); 
var x = document.getElementById("rno").value; 
var y = document.getElementById("jkjk").value; 
document.getElementById("rno").value =((x*1)*(y*1));

var xx = document.getElementById("qx").value; 
var yy = document.getElementById("jkjk").value; 
document.getElementById("ax").value =parseInt((xx*1)+(yy*1)); 

} 
</script>
<script> 
function iasal() 
{ 
var z = document.getElementById("rno").value; 
var q = document.getElementById("jkjk").value; 
document.getElementById("rno").value =((z*1)*(q*1));  
} 
</script>

<script> 
function add01() 
{ 
var a = document.getElementById("paymnt").value; 
var b = document.getElementById("dueamount").value; 
document.getElementById("dueamt").value =((a*1)*(b*1)); 

var c = document.getElementById("paymnt").value; 
var d = document.getElementById("dueamt").value; 
var e = document.getElementById("hloan").value; 
var f = document.getElementById("fine").value; 

document.getElementById("urname").value =((d*1)+(e*1)+(f*1)); 
 
} 
</script>
<script> 
function add03() 
{ 
var a = document.getElementById("paymnt").value; 
var b = document.getElementById("dueamount").value; 
var x = document.getElementById("dueamt").value; 
var y = ((x*1)/(b*1)); 
document.getElementById("paymnt").value = Math.floor(y); 

var d = document.getElementById("dueamt").value; 
var e = document.getElementById("hloan").value; 
var f = document.getElementById("fine").value; 

document.getElementById("urname").value =((d*1)+(e*1)+(f*1)); 
 
} 
</script>

<script> 
function add02() 
{ 

var d = document.getElementById("dueamt").value; 
var e = document.getElementById("hloan").value; 
var f = document.getElementById("fine").value; 

document.getElementById("urname").value =((d*1)+(e*1)+(f*1)); 
 
} 
</script>
<script>
// register jQuery extension
$(document).ready(function() {
  $(window).keydown(function(event){
    if(event.keyCode == 13) {
      event.preventDefault();
      return false;
    }
  });
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl1").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers1(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl2").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers2(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl3").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers3(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});


$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl4").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers4(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl5").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers5(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl6").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers6(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl7").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers7(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl8").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers8(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl9").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers9(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl10").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers10(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});

$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl11").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers11(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl12").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers12(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl13").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers13(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl14").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers14(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl15").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers15(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl16").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers16(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl17").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers17(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl18").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers18(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl19").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers19(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
$(function() { // wait until to DOM is ready
var searchTimeout; //Timer to wait a little before fetching the data
$("#hpl20").keyup(function() {
    searchKey = this.value;

    clearTimeout(searchTimeout);

    searchTimeout = setTimeout(function() {
        getUsers20(searchKey);    
    }, 400); //If the key isn't pressed 400 ms, we fetch the data
});
});
function getUsers(searchKey) {
    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name").val(data.userData.name);
                $("#vno").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   
	//$("#name").val(data.name);
	//$("#vno").val(data.vno);
//var d = document.getElementById("hpl").value; 
//document.getElementById("name").value =(d*1);	
}

function getUsers1(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name1").val(data.userData.name);
                $("#vno1").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers2(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name2").val(data.userData.name);
                $("#vno2").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers3(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name3").val(data.userData.name);
                $("#vno3").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers4(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name4").val(data.userData.name);
                $("#vno4").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers5(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name5").val(data.userData.name);
                $("#vno5").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers6(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name6").val(data.userData.name);
                $("#vno6").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers7(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name7").val(data.userData.name);
                $("#vno7").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers8(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name8").val(data.userData.name);
                $("#vno8").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers9(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name9").val(data.userData.name);
                $("#vno9").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers10(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name10").val(data.userData.name);
                $("#vno10").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}

function getUsers11(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name11").val(data.userData.name);
                $("#vno11").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers12(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name12").val(data.userData.name);
                $("#vno12").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers13(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name13").val(data.userData.name);
                $("#vno13").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers14(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name14").val(data.userData.name);
                $("#vno14").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers15(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name15").val(data.userData.name);
                $("#vno15").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers16(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name16").val(data.userData.name);
                $("#vno16").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers17(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name17").val(data.userData.name);
                $("#vno17").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers18(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name18").val(data.userData.name);
                $("#vno18").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers19(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name19").val(data.userData.name);
                $("#vno19").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
function getUsers20(searchKey) {

    $.ajax({
        url: 'getUser.php',
        type: 'POST',
        dataType: 'json',
        data: {value: searchKey},
        success: function(data) {
            if(data.status) {
                $("#name20").val(data.userData.name);
                $("#vno20").val(data.userData.vno);
            } else {
                // Some code to run when nothing is found
            }   
        }
    });   

}
	</script>
  <!--  page-wrapper -->
         <div class="right_col" role="main">
         
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                           CREATE HAND LOAN
                        </div>
                        <div class="panel-body">
                            <div class="row">
  <div class="col-xs-12 col-md-12"> 
    <?php
	$sqlq = mysqli_query($conn, "select * from hloan where mfin='$mfin' order by id DESC");
	$rowq = mysqli_fetch_array($sqlq);
					  $ono = $rowq['id'];
					  $ono=$ono+1;
					  $qwerty=$ono;
					  ?>
    <form name="form1" id="testSuiteConfigurationform" name="testSuiteConfigurationform" class="form-horizontal" method="post" action="" enctype="multipart/form-data">
<div class="col-md-12">
<div class="form-group">
<label for="inputPassword3" class="col-sm-1 control-label">Date</label>
<div class="col-sm-3">

     <input type="text" class="form-control"   id="inputPassword3" name="date" value="<?php echo date("d-m-Y");?>" placeholder=""  required>  
</div>


<label for="inputPassword3" class="col-sm-1 control-label">S.No</label>
<div class="col-sm-3">

     <input type="text" class="form-control"   id="inputPassword3" name="bill_no" value="<?php echo $qwerty;?>" placeholder=""  required>  
</div>



<label for="inputPassword3" class="col-sm-1 control-label">Type</label>
<div class="col-sm-3">

     <select type="text" class="form-control"   id="inputPassword3" name="typp" value="" placeholder=""  required>  
 <option>Select </option>
<option>BANK CHARGES</option>
<option>CHEQUE RETURN</option>
<option>Cheque Return Service Charges</option>
<option>DEBIT CARD/ CREDIT CARD CHARGES</option>
<option>INSURANCE</option>
<option>OTHER EXPENSES</option>
<option>OTHERS</option>
<option>POSTAGE EXPENSES</option>
<option>REG POST</option>
<option>RTO CHARGES</option>
<option>TAX PAID</option>
</select>
</div>
</div> 



</div>

<div class="col-md-12">
<div class="form-group">
<div class="col-sm-1">
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="inputPassword3" readonly name="sdgfesgh" value="HPL" placeholder=""  >  
</div>
<div class="col-sm-3">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #645458;"   id="inputPassword3" readonly name="sdfghfsh" value="Name" placeholder=""  >  
</div>
<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #645458;"   id="inputPassword3" readonly name="fhhhhh" value="VEH.NO" placeholder=""  >  
</div>

<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #342347;"   id="inputPassword3" readonly name="fhfdhth" value="ACT AMT" placeholder=""  >  
</div>
<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #567456;"   id="inputPassword3" readonly name="rfhfdhh" value="POST AMT" placeholder=""  >  
</div>
<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #f96363;"   id="inputPassword3" readonly name="rfhfdhh" value="REMARK" placeholder=""  >  
</div>
</div>

<?php $i = 1;

while($i<21) { 
 ?>
<div class="form-group">
<div class="col-sm-1">
<?php if($i == 1){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers1(this)) placeholder=""  >  
<?php }
elseif($i == 2){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers2(this)) placeholder=""  >  
<?php }	
elseif($i == 3){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers3(this)) placeholder=""  >  
<?php }		
elseif($i == 4){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers4(this)) placeholder=""  >  
<?php }	
elseif($i == 5){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers5(this)) placeholder=""  >  
<?php }	
elseif($i == 6){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers6(this)) placeholder=""  >  
<?php }	
elseif($i == 7){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers7(this)) placeholder=""  >  
<?php }	
elseif($i == 8){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers8(this)) placeholder=""  >  
<?php }	
elseif($i == 9){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers9(this)) placeholder=""  >  
<?php }	
elseif($i == 10){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers10(this)) placeholder=""  >  
<?php }
elseif($i == 11){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers11(this)) placeholder=""  >  
<?php }	
elseif($i == 12){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers12(this)) placeholder=""  >  
<?php }	
elseif($i == 13){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers13(this)) placeholder=""  >  
<?php }	
elseif($i == 14){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers14(this)) placeholder=""  >  
<?php }	
elseif($i == 15){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers15(this)) placeholder=""  >  
<?php }	
elseif($i == 16){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers16(this)) placeholder=""  >  
<?php }	
elseif($i == 17){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers17(this)) placeholder=""  >  
<?php }	
elseif($i == 18){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers18(this)) placeholder=""  >  
<?php }	
elseif($i == 19){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers19(this)) placeholder=""  >  
<?php }	
elseif($i == 20){ ?>
<input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;" id="hpl<?php echo $i; ?>" name="hpl[<?php echo $i; ?>]" value="" onkeyup(getUsers20(this)) placeholder=""  >  
<?php }	?>	
</div>
<div class="col-sm-3">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #645458;"   id="name<?php echo $i; ?>" name="name[<?php echo $i; ?>]" value="" placeholder=""  >  
</div>
<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #645458;"   id="vno<?php echo $i; ?>" name="vno[<?php echo $i; ?>]" value="" placeholder=""  >  
</div>

<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #342347;"   id="inputPassword3" name="act[<?php echo $i; ?>]" value="" placeholder=""  >  
</div>
<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #567456;"   id="post<?php echo $i; ?>" name="post[<?php echo $i; ?>]" onkeyup="add()" value="" placeholder=""  >  
</div>
<div class="col-sm-2">

     <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #f96363;"   id="totalRetryCount" name="remark[<?php echo $i; ?>]"  value="" placeholder=""  >  
</div>
</div>
<?php $i++; } ?>



 <input type="hidden" class="form-control"   id="inputPassword3" name="ii" value="<?php echo $i; ?>" placeholder=""  >  
  Total
  <input type="text" class="form-control" STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #f96363;"   id="tottt" name="tottt"  value="" placeholder=""  >  

      <button type="submit" class="btn btn-warning btn-block" name="s1">Save & Print</button>  </div>
       <div>
	<?php
							if(isset($_POST['s1']))
							{
								extract($_POST);
						$paydate2 = date('Y-m-d', strtotime($date));	
						$name = $_POST['name'];
						$vno = $_POST['vno'];
						$hpl = $_POST['hpl'];
							$act = $_POST['act'];
						$post = $_POST['post'];
						$remark = $_POST['remark'];
						//$name = $_POST['name'];
$j = 0;
$ff = NULL;
while($j<21) {
	$j++;
$hplq = $hpl[$j];
$nameq = $name[$j];
	$vnoq = $vno[$j];
$actq = $act[$j];
	$postq = $post[$j];
	$remarkq = $remark[$j];
	$customerq = "None";
	//$db->query("insert into hloan (mfin,scode,date,date2,type,hpl,name,agent,actamt,actamt2,postamt,postamt2,remarks) 
//values('$mfin','$scode','$mysqldate','$mysqldate','$typp','$hpl','$name','$customer','$pamt','$pamt','$amt','$amt','$rmark')");	
if($postq > 0){
$insert=mysqli_query($conn, "insert into hloan(id,mfin,scode,date,date2,type,hpl,name,agent,actamt,actamt2,postamt,postamt2,remarks,mode)
values('$bill_no','$mfin','$scode','$paydate2','$paydate2','$typp','$hplq','$nameq','$customer','$actq','$actq','$postq','$postq','$remarkq','Cash A/c')");
	//echo "Registered Successfully";
	//echo $j;
}
}
							}
?>
	  </div>
</form>
					
</div>
</div></div>
</div></div></div> <?php include "layouts/footer.php"; ?> </body></html>