<?php ob_start(); session_start(); ?>
	<!DOCTYPE html>
	<html>
	<?php include "../layouts/db_connect.php"; ?>
	<?php
	
if(isset($_SESSION['code'])) {
	  $code = $_SESSION['code'];
	  $scode = $_SESSION['code'];
	   
		$staff = $_SESSION['name'];
		 $postt = $_SESSION['postt'];
		  $mfin222 = $_SESSION['mfin222'];
	} 
	?>
		<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		
		<!-- Meta, title, CSS, favicons, etc. -->
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="X-UA-Compatible" content="chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1">
			<link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<style>

table, th, td {
    border: 1px solid black;
}
#customers {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

#customers td, #customers th {
    border: 1px solid #ddd;
    padding: 8px;
}

#customers tr:nth-child(even){background-color: #f2f2f2;}

#customers tr:hover {background-color: #ddd;}

#customers th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: #4CAF50;
    color: white;
}
</style>
<title>INFOSSEL SOFT SOLUTIONS </title> </head>
<body>
<?php
			  
  $idd=$_REQUEST['id'];
	$sql=mysqli_query($conn, "select * from pending where id=$idd");
$row2=mysqli_fetch_array($sql);
$n = mysqli_num_rows($sql);
	$hpl =$row2['hpl'];
	$mfin3 = $row2['mfin'];
	$mfin4 =  $row2['mfin'];
 ?>
    <!--  page-wrapper -->
         <div class="right_col" role="main">

            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
  <div class="panel panel-default">
<td><h3><center><font face="Courier New" color="red">Pending</font></h3>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="udelete5.php?id=<?php echo $idd; ?>" data-toggle="tooltip" title="With Photo!"><i class="fa fa-camera fa-2x" style="color:blue;"  aria-hidden="true"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="udeletec.php?id=<?php echo $idd; ?>" data-toggle="tooltip" title="Closing Amt"><i class="fa fa-close fa-2x" style="color:black;"  aria-hidden="true"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="udeletef8.php?id=<?php echo $row2['hpl'];?>&mfin2=<?php echo $row2['mfin']; ?>"  data-toggle="tooltip" title="Full View!"><i class="fa fa-feed fa-2x" style="color:red;" aria-hidden="true"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php $ff = $row2['lat']; if($ff>0) { ?>	<a href="https://www.google.com/maps/?q=<?php echo $row2['lat'];?>,<?php echo $row2['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> 
   <div class="panel-body">
                            <div class="row">
							 <div class="col-lg-6">
<table id="customers">
<thead>
<tr>

<th><b><?php echo $row2['fname']; ?> : <?php echo $row2['hpl']; ?></b></th>

</tr></thead><tbody>

<tr><td><b><font size="2">
 <?php
$sql22 = mysqli_query($conn, "select * from addr where hpl='$hpl' && mfin='$mfin4' order by id asc");
$row3 = mysqli_fetch_array($sql22);
$nn = mysqli_num_rows($sql22);
$iddf = $row3['id'];

if($nn>0) {

$iddf = $row3['id'];
for($i=1;$i<7;$i++){
	$iddf++;
$sql223 = mysqli_query($conn, "select * from addr where id='$iddf'");
$row33 = mysqli_fetch_array($sql223);
	?>
<b><font size="2" color="blue"><?php echo $row33['addr']; ?></font></b></br>
<?php } }  

$sql22 = mysqli_query($conn, "select * from addr where hpl='$hpl' && mfin='$mfin4' order by id asc");
$row3 = mysqli_fetch_array($sql22);
$nn = mysqli_num_rows($sql22);
$iddf = $row3['id'];

if($nn>0) {
?>
<b><font size="2" color="black">Work Address : </font></b></br>
<?php
$iddf = $row3['id'];
for($i=1;$i<7;$i++){
	$iddf++;
$sql223 = mysqli_query($conn, "select * from addr where id='$iddf' order by id asc");
$row33 = mysqli_fetch_array($sql223);
	?>
<b><font size="2" color="blue"><?php echo $row33['oadd']; ?></font></b></br>
<?php } }  ?>
<b><font size="4" color="red"><a href="#<?php echo $row2['pno']; ?>">Phone : <?php echo $row2['pno']; ?></a> </font>  </b></br>
<font size="3" color="blue">Phone Office : <?php echo $row2['pnooffice']; ?></br>
Phone Resi :  <?php echo $row2['pnoresi']; ?></font></b></br>
</td></tr>

<tr>
<td><b><font size="2">Area : <?php echo $row2['area']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Profession   : <?php echo $row2['profession']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Response Date   : <?php echo $row2['rdate']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Remarks   : <?php echo $row2['remarks']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Party Aadhar   : <?php echo $row2['gi1']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Co=Obgnt Aadhar   : <?php echo $row2['bi1']; ?></font></b></td>
</tr>
<th><b>Co-Obligant : <?php echo $row2['cobname']; ?></b></th>
<tr><td><b><font size="2">
 <?php
$sql22 = mysqli_query($conn, "select * from addr where hpl='$hpl' && mfin='$mfin4' order by id asc");
$row3 = mysqli_fetch_array($sql22);
$nn = mysqli_num_rows($sql22);
if($nn>0) {
$iddf = $row3['id'];
for($i=1;$i<7;$i++){
	$iddf++;
$sql22 = mysqli_query($conn, "select * from addr where id='$iddf'");
$row3 = mysqli_fetch_array($sql22);
	?>
<b><font size="2" color="red"><?php echo $row3['co']; ?></font></b></br>
<?php } } ?>

</td></tr>

<th><b>Vehicle : <?php echo $row2['vno']; ?></b></th>
<tr>
<td><b><font size="2">Vehicle : <?php echo $row2['vname']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Model : <?php echo $row2['model']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Color  : <?php echo $row2['color']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Engine No  : <?php echo $row2['eno']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Chasis No   : <?php echo $row2['cno']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Broker   : <?php echo $row2['bname']; ?></font></b></td>
</tr>


<th><b>Loan : <?php echo $row2['hpl']; ?> - <?php echo $row2['fname']; ?></b></th>

<tr>
<td><b><font size="2">Loan Date   : <?php echo $row2['hpdate']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Loan Amount   : <?php echo $row2['hpamt']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Due Amt   : <?php echo $row2['dueamt']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Total Dues  : <?php echo $row2['duemnt']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Paid Dues  : <?php echo $row2['paymnt']; ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Pend Dues  : <?php echo $row2['pendmnt']; ?></font></b></td>
</tr>
<?php $a1 = $row2['penamt'];
$a2 = $row2['defamt'];
$a3 = $row2['hlbal'];
$tot  = $a1 - $a2 - $a3;
if($tot < 0) {
$tot = 0;	
}
?>
<tr>
<td><b><font size="2">Pend Amt  : <?php echo round($tot,0); ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Def Amount  : <?php echo round($row2['defamt'],0); ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">HL Amt  : <?php echo round($row2['hlbal'],0); ?></font></b></td>
</tr>

<tr>
<td><b><font size="2">Total Pend  : <?php echo round($row2['penamt'],0); ?></font></b></td>
</tr>
<tr>
<td><b><font size="2">Last Paid  : <?php echo $row2['lddate']; ?></font></b></td>
  </tr> 


</tbody>

</table>

<a href="https://senthoormotorfinance.in/col/geo2.php?hpl=<?php echo $hpl; ?>&mfin=<?php echo $mfin; ?>">Add Geo Location</a>
</div>

</div></div>
</div></div></div></div></div></div> </body></html>
