<?php
session_start();
require_once '../config.php';
load('middleware', 'user');
if(!isset($_SESSION['user'])) {
    header('location:' . base_url('auth/login'));
}

include_once '../layouts/header.php'; ?>
<div class="row mb-5">
        <div class="col-12">
            <div class="card bg-dark shadow">
                <div class="card-header">
                    <h4 class="card-title">Aktifitas Login</h4>     
                </div>
                <div class="card-body card-dashboard">
                    <div class="table-responsive">
                        <table class="table table-striped table-dark table-bordered table-hover dataTable no-footer"  id="tabl3">
                            <thead>
                                <tr>
                                    <th>Waktu</th>
                                    <th>IP Address</th>
                                    <th>Device</th>
                                </tr>
                            </thead>
                            <tbody>
                            <td colspan="4" class="text-center">Loading data from server...</td>
                            </tbody>		
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
$(document).ready(function() {
    $('#tabl3').dataTable({
        "ordering": false,
        "processing": false,
        "serverSide": true,
        "ajax": "<?= base_url(); ?>/ajax/class/aktifitas_login.php",
        "keys": !0,
        "language": {
            "emptyTable": "No data in table",
            "info": "Showing _START_ to _END_ of _TOTAL_ data",
            "infoEmpty": "",
            "infoFiltered": "",
            "infoPostFix": "",
            "thousands": ".",
            "lengthMenu": "Show _MENU_ data",
            "loadingRecords": "Waiting...",
            "processing": "Processing...",
            "search": "Search:",
            "searchPlaceholder": "",
            "zeroRecords": "Data not found",
            "aria": {"sortAscending": ": activate to sort column ascending","sortDescending": ": activate to sort column descending"}
        }
    });
});
</script>
<?php include_once '../layouts/footer.php'; ?>