<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header  alert alert-info">Customers Paid Vehicle Loan</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">
                             Details
                        </div>
                        <div class="panel-body">
                            <div class="row">  
   <div class="alert alert-info">Customer Details</div>  
                    <?php
						$qry=mysqli_query($conn, "select * from user");
						$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>Receipt No</th>
						<th>Name</th>
						<th>Vehicle No</th>
						<th>Due Date</th>
						<th>Pay Date</th>
						<th>Due Amount</th>
						<th>Pay Amount</th>
						<th>Balance</th>
						<th>Status</th>
						<th>Edit</th>
						<th>Delete</th>
					</tr>
					<?php 
$qry=mysqli_query($conn, "select * from user order by fid desc");
				$n=mysqli_num_rows($qry);
				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['roll'];?></td>
						<td><?php echo $row['name']; ?></td>
						<td><?php echo $row['vno'];?></td>
						<td><?php echo $row['duedate'];?></td>
						<td><?php echo $row['paydate'];?></td>
						<td><?php echo $row['dueamount'];?></td>
						<td><?php echo $row['urname'];?></td>
						<td><?php echo $row['bal'];?></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">Closed</button></td> <?php }  elseif($n55 != 0) { ?>
				<td><button class="btn btn-danger">sizzied</button></td> <?php } else {?>
				<td><button class="btn btn-info">Active</button></td> <?php }?>
									<td><a href="editdue.php?fid=<?php echo $row['fid'];?>&hpl=<?php echo $row['hpl']?>">Edit</a></td>
									

					<td><a href="deletedue.php?fid=<?php echo $row['fid'];?>" onclick="return confirm('Are you sure WANT TO DELETE?');">Delete</a></td>
					</tr>
					<?php
						$x++;}}
					}
				
					?>
					</table>
					
</div>
</div></div>
</div></div></div> <?php include "layouts/footer.php"; ?></body></html>
