<?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
			  
  $hpl=$_REQUEST['hpl'];
  $vno=$_REQUEST['vno'];
  $vname=$_REQUEST['vname'];
  $area=$_REQUEST['area'];
  $name=$_REQUEST['name'];
  $gid=$_REQUEST['gid'];
   $broker=$_REQUEST['brk'];
   $com=$_REQUEST['com'];
    $pno=$_REQUEST['pno'];
	 $cobname=$_REQUEST['cobname'];
	  $status=$_REQUEST['status']; $dealer=$_REQUEST['dealer'];
	     if(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vno LIKE '%$vno%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where hpl='$hpl' order by name asc"); echo "-------";
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where pno LIKE '%$pno%' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vname LIKE '%$vname%' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' && vname LIKE '%$vname%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vname LIKE '%$vname%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where broker LIKE '%$broker%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid !=NULL))
{
	header("location:0fgid.php?gid=$gid");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname !=NULL)&&($broker=='None')&&($gid ==NULL))
{
	header("location:0fcoo.php?coo=$cobname");
}

elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vno LIKE '%$vno%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where hpl='$hpl' && mfin='$com' order by name asc");
	echo "ldjkhgdigh";
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where pno LIKE '%$pno%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && name LIKE '%$name%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vname LIKE '%$vname%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' && vname LIKE '%$vname%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where broker LIKE '%$broker%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com!='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vname LIKE '%$vname%'  && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid !=NULL))
{
	header("location:0fgid.php?gid=$gid");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname !=NULL)&&($broker=='None')&&($gid ==NULL))
{
	header("location:0fcoo.php?coo=$cobname");
}

elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vno LIKE '%$vno%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where hpl='$hpl' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com!='None')&&($status!='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vname LIKE '%$vname%'  && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status!='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vname LIKE '%$vname%' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where pno LIKE '%$pno%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && name LIKE '%$name%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vname LIKE '%$vname%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vno LIKE '%$vno%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status =='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vno LIKE '%$vno%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com =='None')&&($status =='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vno LIKE '%$vno%' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com =='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vno LIKE '%$vno%' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' && vname LIKE '%$vname%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where broker LIKE '%$broker%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid !=NULL))
{
	header("location:0fgid.php?gid=$gid");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname !=NULL)&&($broker=='None')&&($gid ==NULL))
{
	header("location:0fcoo.php?coo=$cobname");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where vno LIKE '%$vno%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where hpl='$hpl' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' &&  status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where pno LIKE '%$pno%' &&  status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && name LIKE '%$name%' &&  status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where area LIKE '%$area%' && vname LIKE '%$vname%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where name LIKE '%$name%' && vname LIKE '%$vname%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer!='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where dealer LIKE '%$dealer%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer!='None')&&($com!='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where dealer LIKE '%$dealer%' &&  status='$status' &&  mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer!='None')&&($com=='None')&&($status =='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where dealer LIKE '%$dealer%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where broker LIKE '%$broker%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid !=NULL))
{
	header("location:0fgid.php?gid=$gid");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname !=NULL)&&($broker=='None')&&($gid ==NULL))
{
	header("location:0fcoo.php?coo=$cobname");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from customerdetails where status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
		$sql=mysqli_query($conn, "select * from customerdetails where mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
		$sql=mysqli_query($conn, "select * from customerdetails where mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com =='None')&&($status =='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
		$sql=mysqli_query($conn, "select * from customerdetails");
}
else {
	header("location:all2.php");
}



$n = mysqli_num_rows($sql);
 
						if($n==0)
						{
						echo "Nothing To Display";
						}
						else
					        { 
						?></p>
					<div class="table-responsive">
  <table id="datatable-buttons" id="datatable-buttons" class="table table-striped table-bordered">
					<thead>
						<tr>
				<th>Hpl</th>
						<th>Name</th><th>Fin</th>
						
						<th>-</th>
						<th>Status</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>
						
						
						<td>
<a href="monregisterf2.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="moneditled.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="monfullsettle2.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="monclone.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="monudelete.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>
		<td>
		<?php $sts = $row['status']; if($sts == 'Active') { ?>
		<button class="btn btn-success"><b>Active</b></button></td>  <?php } else { ?>
		<button class="btn btn-warning"><b><?php echo $row['status'];?></b></button></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
						}
					}
				
					?>
				</tbody>	</table>
					
 
</div>
</div></div>
</div></div></div> <?php include "layouts/footert.php"; ?> </body></html>