<?php
	$filename = 'Customer Tracking  Report'. date('Y_m_d_h_i_s') .".xls";
	header("Content-type: application/octet-stream");
	header("Content-Disposition: attachment; filename=\"$filename\"");
	header("Content-Type: application/xls");
?>
<div class="">
                                    <div><b>Searched Results</b></div>
                                    
                                    <?php if($customer_name_hidden!=""){?>
                                    <div class="form-group">  
                                        <label class="col-sm-5 control-label" for="form-field-2" ><?php echo 'Customer name:';?> <?php echo $customer_name_hidden;?></label>
                                    </div>
                                    <?php }
                                     if($dispenser_name_hidden!=""){?>
                                    <div class="form-group">  
                                        <label class="col-sm-5 control-label" for="form-field-2" ><?php echo 'Dispenser Name:';?> <?php echo $dispenser_name_hidden;?></label>
                                    </div>
                                  <?php } ?>
                                  
                                     
                                     
</div> 
                                <br>
                                <br> 
 <div class="col-xs-12">

      <section class="panel panel-default">
        <header class="panel-heading bg-info lt font-bold">List of Customer Tracking Reports
     
    </header>
        <div class="panel-body bs-example form-horizontal">
          <div class="table-responsive">
            <table id="example" class="table table-bordered" cellspacing="0" width="100%">
              <thead>
        <tr>
          <th>Sr No</th>
          <th>Tracking Number</th>
          <th>Currently Possessed By</th>
          <th>First Installation Date</th>
                         
        </tr> 
      </thead>
      <tbody>  
       <?php 
       $srno=1;
       $count=count($result_customer_report);  
       foreach ($result_customer_report as  $value) {
         $tracking_number=$value['tracking_number'];
         $customer_name=$value['customer_name'];
         $installation_date=$value['installation_date'];
         $product_name=$value['product_name'];
       ?>     
        <tr>
          <td style="text-align: center;"><?php echo $srno; ?></td>
          <td style="text-align: center;"><?php echo $tracking_number;?></td>
          <td style="text-align: center;"><?php echo $customer_name;?></td>  
          <td style="text-align: center;"><?php echo $installation_date;?></td>
          <td style="text-align: center;"><?php echo $product_name;?></td>
        </tr> 
        <?php 
         $srno=$srno+1;
       }
        ?>
        </tbody>
            </table>
          </div>
        </div>
      </section>
	</div>
