<?php include "layouts/menu.php"; ?> <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">
                          Customer Details
                        </div>
                        <div class="panel-body">
                            <div class="row">
<?php
			  
  $ref=$_REQUEST['ref'];
  $tc=$_REQUEST['tc'];
  $vp=$_REQUEST['vp'];
  $doo=$_REQUEST['doo'];
 
	     if(($ref !=NULL)&&($tc ==NULL)&&($vp ==NULL)&&($doo ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where idate='$ref' order by hpl asc");
		$qry2=mysqli_query($conn, "select * from customerdetailsw where idate='$ref' order by hpl asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where idate='$ref' order by hpl asc");
}
elseif(($ref ==NULL)&&($tc !=NULL)&&($vp ==NULL)&&($doo ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where uname='$tc' order by hpl asc");
		$qry2=mysqli_query($conn, "select * from customerdetailsw where uname='$tc' order by hpl asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where uname='$tc' order by hpl asc");
}
elseif(($ref ==NULL)&&($tc ==NULL)&&($vp !=NULL)&&($doo ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where pwd='$vp' order by hpl asc");
		$qry2=mysqli_query($conn, "select * from customerdetailsw where pwd='$vp' order by hpl asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where pwd='$vp' order by hpl asc");
}
elseif(($ref ==NULL)&&($tc ==NULL)&&($vp ==NULL)&&($doo !=NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where doo='$doo' order by hpl asc");
		$qry2=mysqli_query($conn, "select * from customerdetailsw where doo='$doo' order by hpl asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where doo='$doo' order by hpl asc");
}

else {
	header("location:all2.php");
}



$n = mysqli_num_rows($sql);
 
						?></p>
					<div class="table-responsive">
  <table id="datatable-buttons" id="datatable-buttons" class="table table-striped table-bordered">
					<thead>
						<tr>
					<th>Loan No</th>
						<th>Name</th><th>Fin</th>
						<th>User Image</th>
						<th>Vehicle No</th>
						<th>Status</th>
						<th>-</th>
						<th>Phone No</th>
						<th>H.P Amount</th>
						<th>H.P Date</th>
						
					</tr></thead><tbody>
					<?php 
					while($row=mysqli_fetch_array($sql))
						{
							$mfin2 = $row['mfin'];
					?>
					
				<tr>
			
						<td><b><?php echo $row['hpl'];?></b></td>
						<td><b><?php echo $row['name']; ?></b></td>	
						
						<td><b><?php $fin = $row['mfin']; 
						$sql44 = mysqli_query($conn, "select * from mfin where name='$fin'");
						$row44 = mysqli_fetch_array($sql44);
						echo $row44['name2'];
						?></b></td>
						
						
					<?php $dddd = $row['uimg']; if($dddd!= NULL) { ?>	<td><img src="user/<?php echo $row['uimg'];?>" width="40" height="40"/></td> <?php } else { ?>
					<td><img src="111.png" width="40" height="40"/></td> <?php } ?>
						<td><b><?php echo $row['vno'];?></br><?php echo $row['vname'];?></b></td>
		<?php $hpl = $row['hpl'];
						$n10 = $row['duemnt']; $n11 = 0; ?>
						
					<?php		$ss = $row['status'];
	if($ss == 'Closed') {
						?>
				<td><button class="btn btn-warning"><b>Closed</b></button></td>
	<td>
<a href="editled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="reloan5.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="udelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
				<?php }
elseif($ss == 'Reloan') { ?>
				
				<td><button class="btn btn-warning"><b>Closed-R</b></button></td> 
	<td>
<a href="editled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="reloan5.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="udelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
				<?php }
				elseif($ss == 'Sized') { ?>
				
				<td><button class="btn btn-danger"><b>Seized</b></button></td>
			<td>
<a href="registerf2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><i class="fa fa-print fa-2x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="editled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="fullsettle2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Full Settlement!"><i class="fa fa-close fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;	
<a href="reloan2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Reloan!"><i class="fa fa-random fa-2x" style="color:Maroon;"  aria-hidden="true"></i></a>&nbsp;&nbsp;		
<a href="reloan5.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;			

<a href="udelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
				<?php } else {?>
				<td><button class="btn btn-success"><b>Active</b></button>
				<div class="progress progress_sm">
                              <div class="progress-bar bg-green" role="progressbar" data-transitiongoal="60"></div>
                            </div>
                            <small>60% Complete</small>
				</td> 
				
					<td>
<a href="registerf2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><i class="fa fa-print fa-2x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="editled.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="fullsettle2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Full Settlement!"><i class="fa fa-close fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;	
<a href="reloan2.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Reloan!"><i class="fa fa-random fa-2x" style="color:Maroon;"  aria-hidden="true"></i></a>&nbsp;&nbsp;	
<a href="reloan5.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;			

<a href="udelete.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:navi;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
				<?php }?>
				
				
						<td><b><?php echo $row['pno'];?></b></td>
						<td><b><?php echo $row['hpamount'];?></b></td><td><b><?php echo $row['hpdate'];?></b></td>
						
					</tr>
					<?php
						}
			


					while($row=mysqli_fetch_array($qry3))
						{
							$mfin2 = $row['mfin'];
					?>
					
				<tr>
				
						<td><b><?php echo $row['hpl'];?></b></td>
						<td><b><?php echo $row['name']; ?></b></td>	
						
						<td><b><?php echo $row['mfin']; ?></b></td>	
								<?php $dddd = $row['uimg']; if($dddd!= NULL) { ?>	<td><img src="user/<?php echo $row['uimg'];?>" width="40" height="40"/></td> <?php } else { ?>
					<td><img src="111.png" width="40" height="40"/></td> <?php } ?>
						<td><b><?php echo $row['vno']; ?></b></td>	
					<td><a href="mobm.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><button class="btn btn-danger"><b>10 Days Col</b></a></button>			
				</td> 	
					
		
			
				
					<td>
					<a href="mobm.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><i class="fa fa-mobile fa-5x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;

<a href="editledm.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="reloan5m.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;			
<a href="udeletem.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:blue;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
	
		
				
					
			<td><b><?php echo $row['pno'];?></b></td>
						<td><b><?php echo $row['hpamount'];?></b></td>
						<td><b><?php echo $row['hpdate'];?></b></td>
						
					</tr>
					<?php
						} ?>
					
						
						
						
						
						<?php 
					while($row=mysqli_fetch_array($qry2))
						{
							$mfin2 = $row['mfin'];
					?>
					
				<tr>
				
						<td><b><?php echo $row['hpl'];?></b></td>
						<td><b><?php echo $row['name']; ?></b></td>	
						
					<td><b><?php echo $row['mfin']; ?></b></td>	
								<?php $dddd = $row['uimg']; if($dddd!= NULL) { ?>	<td><img src="user/<?php echo $row['uimg'];?>" width="40" height="40"/></td> <?php } else { ?>
					<td><img src="111.png" width="40" height="40"/></td> <?php } ?>
						<td><b><?php echo $row['vno']; ?></b></td>
						
						
					
					
		
			
				<td><a href="mobw.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><button class="btn btn-info"><b>Weekly Col</b></a></button>			
				</td>
					<td>
<a href="mobw.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" ><i class="fa fa-mobile fa-5x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;


<a href="editledw.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Led Edit!"><i class="fa fa-edit fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;
<a href="reloan5w.php?id=<?php echo $row['id'];?>&mfin=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Clone!"><i class="fa fa-clone fa-2x" style="color:red;"  aria-hidden="true"></i></a>&nbsp;&nbsp;			
<a href="udeletew.php?id=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:blue;" aria-hidden="true"></i></a>
		<?php $ff = $row['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['lat'];?>,<?php echo $row['lang'];?>"  data-toggle="tooltip" title="Google Map !" title="Full View!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
	</td>
	
		
			
			<td><b><?php echo $row['pno'];?></b></td>
						<td><b><?php echo $row['hpamount'];?></b></td><td><b><?php echo $row['hpdate'];?></b></td>
						
					</tr>
					<?php
						} 
						
						
						
					?>
				</tbody>	</table>
					
 
</div>
</div></div>
</div></div></div> <?php include "layouts/footert.php"; ?> </body></html>