<?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'];  $vtype=$_REQUEST['vtype'];
	 $cobname=$_REQUEST['cobname'];
	  $status=$_REQUEST['status']; $dealer=$_REQUEST['dealer'];
if(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' order by name asc"); 

}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com!='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' && mfin='$com' order by name asc"); 

}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where hpl='$hpl' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where hpl='$hpl' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where hpl='$hpl' order by name asc");
										$qry4=mysqli_query($conn, "select * from mcustq where hpl='$hpl' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype !='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where bbd='$vtype' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where bbd='$vtype' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where bbd='$vtype' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com!='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where hpl='$hpl' && mfin='$mfin' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where hpl='$hpl' && mfin='$mfin' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where hpl='$hpl' && mfin='$mfin' order by name asc");
							$qry4=mysqli_query($conn, "select * from mcustq where hpl='$hpl' && mfin='$mfin' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype !='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com!='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where bbd='$vtype' && mfin='$mfin' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where bbd='$vtype' && mfin='$mfin' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where bbd='$vtype' && mfin='$mfin' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype !='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com!='None')&&($status!='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where bbd='$vtype' && mfin='$mfin' && status='$status' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where vbbd='$vtype' && mfin='$mfin' && status='$status' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where bbd='$vtype' && mfin='$mfin' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype !='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status!='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where bbd='$vtype' && status='$status' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where bbd='$vtype' && status='$status' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where bbd='$vtype' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype !='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker!='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where bbd='$vtype' &&  broker='$broker' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where bbd='$vtype' &&  broker='$broker' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where bbd='$vtype' &&  broker='$broker' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype !='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer!='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where bbd='$vtype' &&  dealer='$dealer' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from mcustw where bbd='$vtype' &&  dealer='$dealer' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where bbd='$vtype' &&  dealer='$dealer' order by name asc");
}

elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' order by name asc");
	$qry2=mysqli_query($conn, "select * from mcustw where area LIKE '%$area%' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where area LIKE '%$area%' order by name asc");
										$qry4=mysqli_query($conn, "select * from mcustq where area LIKE '%$area%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where pno LIKE '%$pno%' order by name asc");
	$qry2=mysqli_query($conn, "select * from mcustw where pno LIKE '%$pno%' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where pno LIKE '%$pno%' order by name asc");
						$qry4=mysqli_query($conn, "select * from mcustq where pno LIKE '%$pno%' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
	$qry2=mysqli_query($conn, "select * from mcustw where area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
						$qry3=mysqli_query($conn, "select * from mcustm where area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vname LIKE '%$vname%' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' && vname LIKE '%$vname%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where vname LIKE '%$vname%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where sch LIKE '%$broker%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($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)&&($vtype =='None')&&($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)&&($vtype =='None')&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where vno LIKE '%$vno%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where hpl='$hpl' && mfin='$com' order by name asc");
	echo "ldjkhgdigh";
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where pno LIKE '%$pno%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && name LIKE '%$name%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vname LIKE '%$vname%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' && vname LIKE '%$vname%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where sch LIKE '%$broker%' && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com =='None')&&($status!='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
 $sql=mysqli_query($conn, "select * from mcust where sch LIKE '%$broker%' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com!='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where vname LIKE '%$vname%'  && mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($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)&&($vtype =='None')&&($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)&&($vtype =='None')&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where vno LIKE '%$vno%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where hpl='$hpl' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com!='None')&&($status!='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where vname LIKE '%$vname%'  && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status!='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where vname LIKE '%$vname%' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where pno LIKE '%$pno%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && name LIKE '%$name%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vname LIKE '%$vname%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vno LIKE '%$vno%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status =='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vno LIKE '%$vno%' && mfin='$com' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com =='None')&&($status =='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vno LIKE '%$vno%' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno !=NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com =='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vno LIKE '%$vno%' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' && vname LIKE '%$vname%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where broker LIKE '%$broker%' && mfin='$com' && status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($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)&&($vtype =='None')&&($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)&&($vtype =='None')&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where vno LIKE '%$vno%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl !=NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where hpl='$hpl' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' &&  status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno !=NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where pno LIKE '%$pno%' &&  status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && name LIKE '%$name%' &&  status='$status' order by name asc");
}
elseif(($area !=NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where area LIKE '%$area%' && vname LIKE '%$vname%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name !=NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname!='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where name LIKE '%$name%' && vname LIKE '%$vname%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer!='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where dealer LIKE '%$dealer%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer!='None')&&($com!='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where dealer LIKE '%$dealer%' &&  status='$status' &&  mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer!='None')&&($com=='None')&&($status =='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where dealer LIKE '%$dealer%' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker !='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where broker LIKE '%$broker%' &&  status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($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)&&($vtype =='None')&&($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)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
	$sql=mysqli_query($conn, "select * from mcust where status='$status' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
		$sql=mysqli_query($conn, "select * from mcust where mfin='$com' order by name asc");
		$qry2=mysqli_query($conn, "select * from mcustw where mfin='$com' order by name asc");
		$qry3=mysqli_query($conn, "select * from mcustm where mfin='$com' order by name asc");
}
elseif(($area ==NULL)&&($name ==NULL)&&($hpl ==NULL)&&($vtype =='None')&&($vno ==NULL)&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com !='None')&&($status !='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL))
{
		$sql=mysqli_query($conn, "select * from mcust where mfin='$com' && status='$status' order by name 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>Hpl</th>
						<th>Name</th>
					<th>F.Name</th>
				
						<th>-</th>
						<th>Phone No</th>
						<th>Fin</th>
							<th>Image</th>
						<th>Attachment </th>		
						
					</tr></thead><tbody>
					<?php $tottt = 0; $tottti = 0;
					while($row=mysqli_fetch_array($sql))
						{
							$mfin2 = $row['mfin'];
							$model = $row['model'];
				
					?>
					
				<tr>
			
						<td><b><?php echo $row['hpl'];?></b></td>
						<td><b><?php echo $row['name']; ?></br><?php echo $row['sch']; ?></b></td>	
						<td><b><?php echo $row['fname'];?></b></td>
					
						
						
				
						
		
				
					<td>
<a href="register11s.php?hpl=<?php echo $row['id'];?>&mfin2=<?php echo $row['mfin'];?>" ><button class="btn btn-success">Make Loan</button></a>&nbsp;&nbsp;


	</td>


						<td><b><?php echo $row['pno'];?></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'];
						?></br><?php echo $row['v1']; ?> <?php echo $row['v2']; ?>...</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 if($row['upp1'] != $ff){ ?><a href="user/<?php echo $row['upp1']; ?>" target="_blank"><i class="fa fa-paperclip" aria-hidden="true">1</i></a> &nbsp;&nbsp;&nbsp; <?php } ?>
<?php if($row['upp2'] != $ff){ ?><a href="user/<?php echo $row['upp2']; ?>" target="_blank"><i class="fa fa-paperclip" aria-hidden="true">2</i></a> &nbsp;&nbsp;&nbsp; <?php } ?>
<?php if($row['upp3'] != $ff){ ?><a href="user/<?php echo $row['upp3']; ?>" target="_blank"><i class="fa fa-paperclip" aria-hidden="true">3</i></a> &nbsp;&nbsp;&nbsp; <?php } ?>
<?php if($row['upp4'] != $ff){ ?><a href="user/<?php echo $row['upp4']; ?>" target="_blank"><i class="fa fa-paperclip" aria-hidden="true">4</i></a> &nbsp;&nbsp;&nbsp; <?php } ?>
<?php if($row['upp5'] != $ff){ ?><a href="user/<?php echo $row['upp5']; ?>" target="_blank"><i class="fa fa-paperclip" aria-hidden="true">5</i></a> &nbsp;&nbsp;&nbsp; <?php } ?></b></td>
						
					</tr>
					<?php
						}
		?>
</tfoot>				</table>
					
 
</div>
</div></div>
</div></div></div> <?php include "layouts/footert.php"; ?> </body></html>