<?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')&&($pno ==NULL)&&($vname=='None')&&($dealer=='None')&&($com=='None')&&($status=='None')&&($cobname ==NULL)&&($broker=='None')&&($gid ==NULL)&&($vno !=NULL))
{
	$sql=mysqli_query($conn, "select * from entry where bname='$scode' &&  vno LIKE '%$vno%' order by name asc");
		$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  vno LIKE '%$vno%' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  hpl='$hpl' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  hpl='$hpl' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  bbd='$vtype' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  bbd='$vtype' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  bbd='$vtype' && mfin='$mfin' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  bbd='$vtype' && mfin='$mfin' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  bbd='$vtype' && mfin='$mfin' && status='$status' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  vbbd='$vtype' && mfin='$mfin' && status='$status' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  bbd='$vtype' && status='$status' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  bbd='$vtype' && status='$status' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  bbd='$vtype' &&  broker='$broker' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  bbd='$vtype' &&  broker='$broker' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  bbd='$vtype' &&  dealer='$dealer' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  bbd='$vtype' &&  dealer='$dealer' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  name LIKE '%$name%' order by name asc");
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  name LIKE '%$name%' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  area LIKE '%$area%' order by name asc");
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  area LIKE '%$area%' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  pno LIKE '%$pno%' order by name asc");
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  pno LIKE '%$pno%' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
	$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
						$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  broker 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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  broker 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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  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 entry where bname='$scode' &&  mfin='$com' order by name asc");
		$qry2=mysqli_query($conn, "select * from entryw where bname='$scode' &&  mfin='$com' order by name asc");
		$qry3=mysqli_query($conn, "select * from entrym where bname='$scode' &&  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 entry where bname='$scode' &&  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>S.No</th>
						<th>Loan No</th>
						<th>Name</th>
					<th>Salary/Income</th>	
				
					
						<th>Bank</th>
						
						<th>Referance</th>
						<th>Phone No</th>
						<th>Loan Amount</th>
						<th>Date</th> <th>App</th><th>Status</th>
							<th>Education</th>
							<th>Area</th><th>Market Via</th><th>Holding</th>
							<th>Remarks</th>
							<th>Phone Home</th>
							<th>Phone Office</th>
							<th>Address</th>
							<th>Office Address</th>
							<th>Job</th>
							<th>Age</th>
								<th>Created By</th>
								<th>Create Date</th>
								
					</tr></thead><tbody>
					<?php 
					while($row=mysqli_fetch_array($sql))
						{
							$mfin2 = $row['mfin'];
					?>
					
				<tr>
			<td><?php echo $fff;?></td>
						<td><?php echo $row['hpl'];?></td>
						<td><?php echo $row['name']; ?></td><td><?php echo $row['vname'];?></td>	
						
					
					
						<td><?php echo $row['vno'];?></td>
						
	
					<td><?php echo $row['bname'];?></td>
						<td><?php echo $row['pno'];?></td>
						<td><?php echo $row['loanr'];?></td>
						<td><?php echo $row['hpdate'];?></td>
						<td>
						<a href="editpl.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="eviewapp.php?idd=<?php echo $row['hpl'];?>"><i class="fa fa-exchange  fa-2x" aria-hidden="true"></i></a></td>
						<?php $sts = $row['status'];
						if($sts == 'Active') { ?>
						<td><button class="btn btn-info">Active</button></td> <?php } elseif($sts == 'app') { ?>
						<td><button class="btn btn-warning">Not Verified</button></td> <?php } elseif($sts == 'ver') { ?>
						<td><button class="btn btn-success">Verified</button></td> <?php } ?>
						<td><?php echo $row['cobpno'];?></td>
						<td><?php echo $row['area'];?></td>	<td><?php echo $row['profession'];?></td> 
						<td><?php echo $row['model'];?></td>
						<td><?php echo $row['remarks'];?></td>
						
						
						<td><?php echo $row['pnoresi'];?></td>
						<td><?php echo $row['pnooffice'];?></td>
						<td><?php echo $row['address'];?></br><?php echo $row['address1'];?></br><?php echo $row['address2'];?></td>
						<td><?php echo $row['oaddress'];?></br><?php echo $row['oaddress1'];?></br><?php echo $row['oaddress2'];?></td>
						<td><?php echo $row['cobname'];?></td>
						<td><?php echo $row['hname'];?></td>
						
						<td><?php echo $row['scode'];?></td>
	<td><?php echo $row['createdate'];?></td>
	
					</tr>
					<?php
						}
			

?>
					
						
						
						
						
						
				</tbody>	</table>
					
 
</div>
</div></div>
</div></div></div> <?php include "layouts/footert.php"; ?> </body></html>