<table class="table table-sm table-bordered">
    <thead>
        <th width="35px">#</th>
        <th width="150px">Kode LPBJ</th>
        <th>Requestor</th>
        <th>SPV</th>
        <th>MGR</th>
        <th>DIR</th>
        <th width="100px">OPTION</th>
    </thead>
    <tbody>
        <?php
        $i = 1;
        foreach ($data as $d) {
            echo "<tr>";
            echo "<td>" . $i . "</td>";
            echo "<td>" . $d['kd_lpbj'] . "</td>";
            echo "<td>" . $d['req_by'] . "<br><i>" . $d['tanggal_lpbj'] . " | " . $d['jam_lpbj'] . "</i></td>";
            echo "<td>" . $d['spv'] . "</td>";
            echo "<td>" . $d['mgr'] . "</td>";
            echo "<td>" . $d['dir'] . "</td>";
            echo "<td><button class='btn btn-warning btn-sm' onclick='preview_lpbj(\"" . $d['kd_lpbj'] . "\",\"" . $d['cr_id'] . "\")'>Preview</button></td>";
            /*
            echo "<td>";
            if ($d['sts_lpbj'] == 2) {
                echo "<button class='btn btn-warning btn-sm' onclick='preview_lpbj(\"" . $d['kd_lpbj'] . "\",\"" . $d['cr_id'] . "\")'>Preview</button>";
            }
            if ($d['sts_lpbj'] == 1) {
                echo "<button class='btn btn-primary btn-sm' onclick='view_lpbj(\"" . $d['kd_lpbj'] . "\")'>Preview</button>";
            }
            echo "</td>";
            */
            echo "</tr>";
            $i++;
        }
        ?>
    </tbody>
</table>