<!DOCTYPE html>
<html>
<head>
<style>
    
table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  table-layout: auto;
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 1px;
  
}

tr:nth-child(even) {
  background-color: #dddddd;
}
span{
  text-align:center;
  line-height:1.6;
  font-weight:bold;
}
.my-table td,
.my-table th {
  border: none;
  position: relative;
}

.my-table tr:nth-child(even) {
  background-color: white;
}

</style>
</head>
<body>

<div class="reportsummary">
    <div id="logo_div"></div>
    <div class="row">
        <h2 style="text-align:center"><b>Overall Report</b></h2>
        <br>
        
<br>
        
        
        
<div class="my-table">
        <table >
        <tr>
    <td><B>From Date : </B></td><td><B><?php echo date('d/m/Y H:i:s',strtotime($fdate));  ?></B></td>
    </tr>
    <tr>
    <td><B>To Date : </B></td><td><B><?php echo date('d/m/Y H:i:s',strtotime($tdate));  ?></B></td>
    </tr>
    <tr>
    <td><B>Books Type : </B><B><?php echo $books_typ;  ?></B></td></tr>
        </table>
                </div>
    </div>
    <?php 	if(count($report)){ ?>
      <?php  if($books_typ == 'No_of_Books'){ ?>
    <h3 style="text-align:center"><b>Total Records : <?php echo count($report); ?></b></h3><br>
                  <table class="display table" style="width: 100%; cellspacing: 10px;border-collapse:collapse;" border="1" cellpadding="10">
    
                    <thead>
                    <tr>
                    <th>Sl No</th>
                  <th>Itemid</th>
				  <th>Title</th>
				  <th>Author</th>
				  <th>Call No</th>				 
          <th>Datetime</th>
                    </tr>
                    </thead>
                    <tbody>
                        <?php $i=1; foreach($report as $row){ ?>
                     <tr>
                     <td><?php echo $i;?></td>
                   <td><?php echo $row->barcode;?></td>
                   <td><?php echo $row->title;?></td>
                   <td><?php echo $row->author;?></td>
                   <td><?php echo $row->itemcallnumber;?></td>
                   <td><?php echo date("d/m/Y H:i:s",strtotime($row->timestamp));?></td>
                    </tr>
                    
                    <?php $i++; } ?>
                    </tbody>
                    <?php }elseif($books_typ == 'Books_Mapped' || $books_typ == 'Books_Not_Mapped'|| $books_typ == 'Duplicate_Books' || $books_typ == 'Others'){?>
                        <h3 style="text-align:center"><b>Total Records : <?php echo count($report); ?></b></h3><br>
                  <table class="display table" style="width: 100%; cellspacing: 10px;border-collapse:collapse;" border="1" cellpadding="10">
    
                    <thead>
                    <tr>
                    <th>Sl No</th>
                  <th>Itemid</th>
				  <th>Uid</th>
				  <th>Title</th>
				  <th>Author</th>
				  <th>Call No</th>				 
          <th>Datetime</th>
                    </tr>
                    </thead>
                    <tbody>
                        <?php $i=1; foreach($report as $row){ ?>
                     <tr>
                     <td><?php echo $i;?></td>
                   <td><?php echo $row->barcode;?></td>
                   <td><?php echo $row->uid;?></td>
                   <td><?php echo $row->title;?></td>
                   <td><?php echo $row->author;?></td>
                   <td><?php echo $row->itemcallnumber;?></td>
                   <td><?php echo date("d/m/Y H:i:s",strtotime($row->datetime));?></td>
                    </tr>
                    
                    <?php $i++; } ?>
                    </tbody>
                    <?php }?>
                    
                    


</table>
<?php }
 else{   
echo "<h2 style='text-align:center'> No Record Founds</h2>";	 
 }

?>

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





