<?php ob_start(); ?>
<?php include "layouts/db_connect.php"; ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php include "layouts/db_con.php"; ?>  
<head><meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Print Page</title>
<link href="vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<link rel="shortcut icon" href="images/favicon.ico">
		<!-- Font Awesome -->
		<link href="vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
		<!-- NProgress --><script type="text/javascript">
window.onload=function(){self.print();setTimeout("window.close()", 10);}

    window.onfocus = function() { window.close(); }
	 $(function(){ 
   setTimeout(function(){
      $('form').print();
    },100);
});

</script>

<style type="text/css"> 

#table1 
{ 
position:absolute; 
bottom:5%; 
} 
#table2 
{ 
position:absolute; 
bottom:15%; 
} 
#table3 
{ 
position:absolute; 
bottom:30%; 
} 

</style> 
<style type="text/css">
<!--
.style1 {font-size: 15px}
-->
</style>
<style>
p.ex1 {
    border: 1px solid white; 
    padding-top: 5px;
}
</style>

</head>

<body onload="self.print()" onfocus="window.close()">
<div>
    <?php 
$qry234=mysqli_query($conn, "select * from mfin where mfin='$mfin'");
								   $row234 = mysqli_fetch_array($qry234); ?>
<center><h1>RUDRA FINANCE</h1></center>
<center><h3>Daily Collection Report</h3></center>
</div>

<table border="0">
<tr>
<td><font size="3.5"><b>
 </br></br>
NAME : </br>
DATE  :
</b></font> </td>
</tr></table>
<?php
	$hpl=$_REQUEST['hpl'];
		$mfin=$_REQUEST['mfin'];
		
?>
<div class="row col-sm-12 col-lg-12">
    <div class="col-sm-12 col-md-12 col-lg-12">
      <div class="col-sm-4 col-md-4 col-lg-4">
<table border="1"   cellspacing="0" cellspadding="0">
<thead>
<tr>
<th width="5%" color="red"><font size="5px">L.No</font></th>
<th width="5%" color="red"><font size="5px">Name</font></th>
<th  width="7%" color="red"><font size="5px">Amount</font></th>
<th width="7%" color="red"><font size="5px">Paid</font></th>

</tr>
</thead>
<tbody>
  
<?php 

$sql = mysqli_query($conn, "select * from customerdetails where status='Active'");
while($row = mysqli_fetch_array($sql)) { 
$i++;
if($i<=30){

?>
  <tr>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['hpl']; ?></td>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['name']; ?></td>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['total']; ?></td>
<td widtd="5%"></td>

</tr>
<?php } } ?>
</tbody>
</table>
</div>
   <div class="col-sm-4 col-md-4 col-lg-4">
<table border="1"   cellspacing="0" cellspadding="0">
<thead>
<tr>
<th width="5%" color="red"><font size="5px">L.No</font></th>
<th width="5%" color="red"><font size="5px">Name</font></th>
<th  width="7%" color="red"><font size="5px">Amount</font></th>
<th width="7%" color="red"><font size="5px">Paid</font></th>

</tr>
</thead>
<tbody>
  
<?php 

$i = 0;
$sql = mysqli_query($conn, "select * from customerdetails where status='Active'");
while($row = mysqli_fetch_array($sql)) { 
$i++;
if(($i>30) && ($i<=60)){
?>
  <tr>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['hpl']; ?></td>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['name']; ?></td>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['total']; ?></td>
<td widtd="5%"></td>

</tr>
<?php } } ?>
</tbody>
</table>
</div>

 <div class="col-sm-4 col-md-4 col-lg-4">
<table border="1"   cellspacing="0" cellspadding="0">
<thead>
<tr>
<th width="5%" color="red"><font size="5px">L.No</font></th>
<th width="5%" color="red"><font size="5px">Name</font></th>
<th  width="7%" color="red"><font size="5px">Amount</font></th>
<th width="7%" color="red"><font size="5px">Paid</font></th>

</tr>
</thead>
<tbody>
  
<?php 

$i = 0;
$sql = mysqli_query($conn, "select * from customerdetails where status='Active'");
while($row = mysqli_fetch_array($sql)) { 
$i++;
if(($i>60) && ($i<=90)){
?>
  <tr>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['hpl']; ?></td>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['name']; ?></td>
<td widtd="5%">&nbsp; <font size="5px"><?php echo $row['total']; ?></td>
<td widtd="5%"></td>

</tr>
<?php } } ?>
</tbody>
</table>
</div>
 </div>

 </div>
<table border="0">
<tr>
<td><font size="3.5"><b>
</br></br> SIGNATURE </br></br>

</b></font> </td>


</tr>
</table>

</div>
</DIV>
</DIV>

</body>
</html>

