<table class="table table-sm table-bordered">
    <thead>
        <tr>
            <th scope="col" width="35px">#</th>
            <th scope="col">IP</th>
            <th scope="col">Aplikasi</th>
            <th scope="col">Status IP</th>
            <th scope="col">Status Aktif</th>
            <th scope="col">Hapus</th>
        </tr>
    </thead>
    <tbody>
        <?php
        $i = 1;
        foreach ($result as $r) {
            echo "<tr>";
            echo "<td>" . $i . "</td>";
            echo "<td>" . $r['strIPv4'] . "</td>";
            echo "<td>" . $r['strNmApp'] . "</td>";
            echo "<td>" . $r['stsIP'] . "</td>";
            echo "<td>" . $r['stsAktif'] . "</td>";
            echo "<td><button type='button' onclick='hapusip(" . $r['ID'] . ",\"" . $r['strIPv4'] . "\")' class='btn btn-danger btn-sm'><i class='bi bi-trash'></i></button></td>";
            echo "</tr>";
            $i++;
        }
        ?>
    </tbody>
    <tfoot>
        <tr>
            <th colspan="2" scope="col">IP</th>
            <th scope="col">Aplikasi</th>
            <th scope="col">Status IP</th>
            <th scope="col">Status Aktif</th>
            <th scope="col">Hapus</th>
        </tr>
        <tr>
            <th colspan="2"><input type="text" id="ip" class="form-control"></th>
            <th><input type="text" id="aplikasi" class="form-control"></th>
            <th><select class="form-control" id="jenis">
                    <option value="1">Public</option>
                    <option value="2">Private</option>
                </select></th>
            <th><select class="form-control" id="sts">
                    <option value="1">Online</option>
                    <option value="0">Offline</option>
                </select></th>
            <th><button class="btn btn-primary" onclick="simpanip()" type="button">Simpan</button></th>
        </tr>
    </tfoot>
</table>