<?php include "layouts/menu.php"; ?>
<?php $hpl=$_REQUEST['hpl'];?>
<script>
	function autocomplet() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#did').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: 'ajax_refresh.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#country_list_id').show();
				$('#country_list_id').html(data);
			}
		});
	} else {
		$('#country_list_id').hide();
	}
}
function set_item(item) {
	// change input value
	$('#did').val(item);
	// hide proposition list
	$('#country_list_id').hide();
}
	</script>
	 <script>
	function autocomp() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#didn').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: 'ajax_sname.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#dname').show();
				$('#dname').html(data);
			}
		});
	} else {
		$('#dname').hide();
	}
}

// set_item : this function will be executed when we select an item
function set_itemm(item) {
	// change input value
	$('#didn').val(item);
	// hide proposition list
	$('#dname').hide();
}
	</script>
 <script>
	function autocomplett() {
	var min_length = 0; // min caracters to display the autocomplete
	var keyword = $('#zxcvb').val();
	if (keyword.length >= min_length) {
		$.ajax({
			url: 'ajax_refreshq.php',
			type: 'POST',
			data: {keyword:keyword},
			success:function(data){
				$('#qwertyu').show();
				$('#qwertyu').html(data);
			}
		});
	} else {
		$('#qwertyu').hide();
	}
}
// set_item : this function will be executed when we select an item
function set_itemmm(item) {
	// change input value
	$('#zxcvb').val(item);
	// hide proposition list
	$('#qwertyu').hide();
}
	</script>
  <!--  page-wrapper -->
         <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header  alert alert-info">Customer Of Vehicle Loan Details</h1>
                </div>
                <!--end page header -->
            </div>
			 	 
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Customer Details
                        </div>
                        <div class="panel-body">
                            <div class="row">
  

  
                    <?php
		
						$qry=mysqli_query($conn, "select * from customerdetails where mfin='$mfin' &&  vno='$hpl'");
						$n=mysqli_num_rows($qry);
						if($n==0)
						{
							echo "Nothing To Display";
						}
						else
					{ 
						?></p>
					<table class="table table-striped" table class="table" border="0" align="center" cellspacing="0" cellpadding="10" >
					<col width="100px">
						<tr class="danger" style="color:purple;">
						<th>Hpl</th>
						<th>Name</th>
						<th>User Image</th>
						<th>Vehicle No</th>
						<th>Phone No</th>
						<th>H.P Amount</th>
						<th>H.P Date</th>
						<th>Status</th>
						<th>Edit</th>
						<th>More Details</th>
					</tr>
					<?php 

				while($row=mysqli_fetch_array($qry))
  { 
$x = $row['hpl'];
						if($n==0)
						{
							$x++;
						}
						else
					{
?>				<tr class="warning">
					<col width="100px">
						<td><?php echo $row['hpl'];?></td>
						<td><?php echo $row['name']; ?></td>
						<td><img src="user/<?php echo $row['uimg'];?>" width="90" height="90"/></td>
						<td><?php echo $row['vno'];?></td>
						<td><?php echo $row['pno'];?></td>
						<td><?php echo $row['hpamount'];?></td><td><?php echo $row['hpdate'];?></td>
						<?php $hpl = $row['hpl'];
				$qry12=mysqli_query($conn, "select * from net where mfin='$mfin' &&  hpl=$hpl");
				$n5=mysqli_num_rows($qry12); 
					$qry122=mysqli_query($conn, "select * from sizzing where mfin='$mfin' &&  hpl=$hpl");
				$n55=mysqli_num_rows($qry122); 
	if($n5 != 0) {
						?>
				<td><button class="btn btn-block"><b>Closed</b></button></td> <?php }  elseif($n55 != 0) { ?>
				
				<td><button class="btn btn-danger"><b>Sizzied</b></button></td> <?php } else {?>
				<td><button class="btn btn-success"><b>Active</b></button></td> <?php }?>
						
				<td><a href="udelete22.php?hpl=<?php echo $row['hpl'];?>&name=<?php echo $row['name'];?>">Edit</a></td>
				<td><a href="udelete.php?hpl=<?php echo $row['hpl'];?>&name=<?php echo $row['name'];?>">More Info</a></td>
					</tr>
					<?php
						$x++;}}
					}
				
					?>
					</table>
					
</div>
</div></div>
</div></div></div> <?php include "layouts/footer.php"; ?></body></html>
