<?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 customerdetails where vno LIKE '%$vno%' order by name asc");
		$qry2=mysqli_query($conn, "select * from customerdetailsw where vno LIKE '%$vno%' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where 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 customerdetails where hpl='$hpl' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where hpl='$hpl' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where hpl='$hpl' order by name asc");
										$qry4=mysqli_query($conn, "select * from customerdetailsq 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 customerdetails where bbd='$vtype' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where bbd='$vtype' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails where hpl='$hpl' && mfin='$mfin' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where hpl='$hpl' && mfin='$mfin' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where hpl='$hpl' && mfin='$mfin' order by name asc");
							$qry4=mysqli_query($conn, "select * from customerdetailsq 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 customerdetails where bbd='$vtype' && mfin='$mfin' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where bbd='$vtype' && mfin='$mfin' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails where bbd='$vtype' && mfin='$mfin' && status='$status' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where vbbd='$vtype' && mfin='$mfin' && status='$status' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails where bbd='$vtype' && status='$status' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where bbd='$vtype' && status='$status' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails where bbd='$vtype' &&  broker='$broker' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where bbd='$vtype' &&  broker='$broker' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails where bbd='$vtype' &&  dealer='$dealer' order by name asc"); 
	$qry2=mysqli_query($conn, "select * from customerdetailsw where bbd='$vtype' &&  dealer='$dealer' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails where name LIKE '%$name%' order by name asc");
	$qry2=mysqli_query($conn, "select * from customerdetailsw where name LIKE '%$name%' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where name LIKE '%$name%' order by name asc");
						$qry4=mysqli_query($conn, "select * from customerdetailsq 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 customerdetails where area LIKE '%$area%' order by name asc");
	$qry2=mysqli_query($conn, "select * from customerdetailsw where area LIKE '%$area%' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where area LIKE '%$area%' order by name asc");
										$qry4=mysqli_query($conn, "select * from customerdetailsq 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 customerdetails where pno LIKE '%$pno%' order by name asc");
	$qry2=mysqli_query($conn, "select * from customerdetailsw where pno LIKE '%$pno%' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm where pno LIKE '%$pno%' order by name asc");
						$qry4=mysqli_query($conn, "select * from customerdetailsq 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 customerdetails where area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
	$qry2=mysqli_query($conn, "select * from customerdetailsw where area LIKE '%$area%' && name LIKE '%$name%' order by name asc");
						$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails 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 customerdetails where mfin='$com' order by name asc");
		$qry2=mysqli_query($conn, "select * from customerdetailsw where mfin='$com' order by name asc");
		$qry3=mysqli_query($conn, "select * from customerdetailsm 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 customerdetails 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>Fin</th>
						<th>Image</th>
				
						<th>Status</th>
						<th>-</th>
						<th>Phone No</th>
						<th>L.Amount</th>					<th>Int.Recvd</th>
						<th>L.Date</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 $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 } ?>
						
		<?php $hpl = $row['hpl'];
						$n10 = $row['duemnt']; $n11 = 0; ?>
						
					<?php		$ss = $row['status'];
	if($ss == 'Closed') {
			if($model == '2') {				?>
				<td><button class="btn btn-warning"><b>Closed</b></button></td>
	<td>
	<?php  if($postt == 'MD') { ?> 
<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; <?php } ?>
<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-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="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>	    
<?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="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>
				<?php }
				elseif($ss == 'Action') { 
				
				
				?>
				
				<td><button class="btn btn-danger"><b>Action</b></button></td>
			<td>
<a href="monregisterf22.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="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="monreloan2.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="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>
				<?php } else {
					if($model == '2') {
					?>
				<td><button class="btn btn-success"><b>Active-EMI</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;
	<?php  if($postt == 'MD') { ?> 
<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;	<?php } ?>
<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="Map Home!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
		
			<?php $ff2 = $row['latw']; if($ff2>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['latw'];?>,<?php echo $row['langw'];?>"  data-toggle="tooltip" title="Google Map !" title="Map Work!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:green;" aria-hidden="true"></i></a> <?php } ?>
			
	</td>
					<?php } else{ ?>

<td><button class="btn btn-success"><b>Active</b></button>
				
				</td> 
				
					<td>
<a href="monregisterf22.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;
	<?php  if($postt == 'MD') { ?> 
<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;
<?php } ?>
<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="monreloan2.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="monreloan5.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="Map Home!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
		
			<?php $ff2 = $row['latw']; if($ff2>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['latw'];?>,<?php echo $row['langw'];?>"  data-toggle="tooltip" title="Google Map !" title="Map Work!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:green;" aria-hidden="true"></i></a> <?php } ?>
			
	</td>


					<?php }		}?>
				
				
						<td><b><?php echo $row['pno'];?></b></td>
						<td><b><?php  $tottt = $tottt + $row['hpamount'];  echo $row['hpamount'];?></b></td>
						<td><b><?php  $hpl = $row['hpl']; $mfin3 = $row['mfin'];
$hppass=mysqli_query($conn, "select sum(rno) from user where mfin='$mfin3' && hpl='$hpl'");
$hppass1 = mysqli_fetch_array($hppass);
$hppass111 = $hppass1[0];

$hppass2=mysqli_query($conn, "select sum(amt) from net where mfin='$mfin3' && hpl='$hpl'");
$hppass22 = mysqli_fetch_array($hppass2);
$hppass222 = $hppass22[0];
$intr = $hppass111 + $hppass222;
						$tottti = $tottti + $intr; echo $intr;?></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 $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><a href="mobm.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" data-toggle="tooltip" title="Receipt!"><button class="btn btn-warning"><b>Daily 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-print fa-2x"  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="Map Home!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
		
			<?php $ff2 = $row['latw']; if($ff2>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['latw'];?>,<?php echo $row['langw'];?>"  data-toggle="tooltip" title="Google Map !" title="Map Work!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:green;" 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 $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><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-print fa-2x"  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="Map Home!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
		
			<?php $ff2 = $row['latw']; if($ff2>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['latw'];?>,<?php echo $row['langw'];?>"  data-toggle="tooltip" title="Google Map !" title="Map Work!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:green;" 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($qry4))
						{
							$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><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="mobq.php?hpl=<?php echo $row['hpl'];?>&mfin2=<?php echo $row['mfin'];?>" ><i class="fa fa-print fa-2x"  style="color:green;" aria-hidden="true"></i></a>&nbsp;&nbsp;


<a href="editledq.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="reloan5q.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="udeleteq.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="Map Home!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:purple;" aria-hidden="true"></i></a> <?php } ?>
		
			<?php $ff2 = $row['latw']; if($ff2>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row['latw'];?>,<?php echo $row['langw'];?>"  data-toggle="tooltip" title="Google Map !" title="Map Work!" target="_blank"><i class="fa fa-map-marker fa-2x" style="color:green;" aria-hidden="true"></i></a> <?php } ?>
	</td>
	
		
			
			<td><b><?php echo $row['pno'];?></b></td>
						<td><b><?php $tottt = $tottt + $row['hpamount']; echo $row['hpamount'];?></b></td>
						<td><b><?php
$hppass=mysqli_query($conn, "select sum(rno) from user where mfin='$mfin3' && paydate2 between '$fdate' and '$tdate'");
$hppass1 = mysqli_fetch_array($hppass);
$hppass111 = $hppass1[0];

$hppass2=mysqli_query($conn, "select sum(amt) from net where mfin='$mfin3' && paydate2 between '$fdate' and '$tdate'");
$hppass22 = mysqli_fetch_array($hppass2);
$hppass222 = $hppass22[0];
$intr = $hppass111 + $hppass222;
						$tottti = $tottti + $intr; echo $intr;?></b></td>
						<td><b><?php echo $row['hpdate'];?></b></td>
						
					</tr>
					<?php
						} 
						
						
						
					?>
				</tbody>

<tfoot>
	<tr>
				
						<td><b></b></td>
						<td><b></b></td>	
						
				<td><b></b></td>
								<td><b></b></td>
					
						
						
					
					
		
			
				<td></td>
					<td>
</td>
	
		
			
			<td><b>Total</b></td>
						<td><b><?php echo $tottt;?></b></td><td><b><?php echo $tottti;?></b></td><td><b></b></td>
						
					</tr>
</tfoot>				</table>
					
 
</div>
</div></div>
</div></div></div> <?php include "layouts/footert.php"; ?> </body></html>