<?php
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename= laporan_cancel_loading.xls");
header("Content-Transfer-Encoding: binary ");
?>
<!doctype html>
<html lang="en">

<head>
    <h1>Cancel loading report</h1>
</head>

<body>
    <table border="1" rules="all">
        <thead>
            <th>#</th>
            <th>Tgl</th>
            <th>No LOT</th>
            <th>NO POL</th>
            <th>NO SJ</th>
            <th>Cancel By</th>
        </thead>
        <tbody>
            <?php
            $i = 1;
            foreach ($data as $dt) {
                echo "<tr>";
                echo "<td>" . $i . "</td>";
                echo "<td>" . $dt['tgl'] . "</td>";
                echo "<td>" . $dt['no_lot'] . "</td>";
                echo "<td>" . $dt['no_pol'] . "</td>";
                echo "<td>" . $dt['no_sj'] . "</td>";
                echo "<td>" . $dt['cancel_by'] . "</td>";
                echo "</tr>";
                $i++;
            }
            ?>
        </tbody>
    </table>
</body>

</html>