<div class="container-fluid">
    <div class="footer">
        <p>Copyright © ClawMaster</p>
    </div>
</div>
</div>
</div>
<!-- end dashboard inner -->
</div>
</div>
</div>
<!-- jQuery -->
<script src="<?=base_url()?>assets/js/jquery.min.js"></script>
<script src="<?=base_url()?>assets/js/popper.min.js"></script>
<script src="<?=base_url()?>assets/js/bootstrap.min.js"></script>
<!-- wow animation -->
<script src="<?=base_url()?>assets/js/animate.js"></script>
<!-- select country -->
<script src="<?=base_url()?>assets/js/bootstrap-select.js"></script>
<!-- owl carousel -->
<script src="<?=base_url()?>assets/js/owl.carousel.js"></script>
<!-- chart js -->
<script src="<?=base_url()?>assets/js/Chart.min.js"></script>
<script src="<?=base_url()?>assets/js/Chart.bundle.min.js"></script>
<script src="<?=base_url()?>assets/js/utils.js"></script>
<script src="<?=base_url()?>assets/js/analyser.js"></script>
<!-- nice scrollbar -->
<script src="<?=base_url()?>assets/js/perfect-scrollbar.min.js"></script>
<script>
var ps = new PerfectScrollbar('#sidebar');
</script>
<!-- fancy box js -->
<script src="<?=base_url()?>assets/js/jquery-3.3.1.min.js"></script>
<script src="<?=base_url()?>assets/js/jquery.fancybox.min.js"></script>
<!-- custom js -->
<script src="<?=base_url()?>assets/js/custom.js"></script>
<!-- calendar file css -->
<script src="<?=base_url()?>assets/js/semantic.min.js"></script>
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.13.4/js/dataTables.bootstrap4.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jszip-2.5.0/dt-1.10.25/b-2.0.0/b-html5-2.0.0/datatables.min.css" />

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/jszip-2.5.0/dt-1.10.25/b-2.0.0/b-html5-2.0.0/datatables.min.js"></script>
<script>
$(document).ready(function() {
    $('#songTable').DataTable({
        dom: 'Bfrtip', // Add the Buttons extension to the DOM
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print' // Add the desired export buttons
        ]
    });
    $('#songTable3').DataTable({
        //
    });
    $('#songTable4').DataTable({
        //
    });
    $('#songTable5').DataTable({
        //
    });
    $('#name-search-box').on('keyup', function() {
        // Get the search value
        var value = $(this).val();

        // Set the search criteria for the Name column
        $('#songTable1').DataTable().columns(3).search(value).draw();
    });
    $('#songTable1').DataTable({
        dom: 'Bfrtip',
        columns: [{
                data: 'Admin Name',
                title: 'Admin Name'
            },
            {
                data: 'Admin Email',
                title: 'Admin Email'
            },
            {
                data: 'Log Action',
                title: 'Log Action'
            },
            {
                data: 'Log Time',
                title: 'Log Time'
            },
            {
                data: 'Log Details',
                title: 'Log Details'
            },


        ],
        // Add the Buttons extension to the DOM
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print' // Add the desired export buttons
        ],
        order: [
            [3, "desc"]
        ], //or asc 
        columnDefs: [{
            "targets": 3,
            "type": "date"
        }],
    });
});
</script>
<script src="<?=base_url()?>assets/plugins/toast/toast.min.js"></script>
<script type="text/javascript">
<?php if ($this->session->flashdata('successmessage')) { ?>
const Toast = Swal.mixin({
    toast: true,
    position: 'top',
    showConfirmButton: false,
    timer: 5000
});
Toast.fire({
    type: 'success',
    title: '<?= $this->session->flashdata('successmessage'); ?>'
});
<?php } else if ($this->session->flashdata('warningmessage')) { ?>
const Toast = Swal.mixin({
    toast: true,
    position: 'top',
    showConfirmButton: false,
    timer: 5000
});
Toast.fire({
    type: 'error',
    title: '<?= $this->session->flashdata('warningmessage'); ?>'
});
<?php } ?>
</script>
<script>
$(function() {
    new Chart(
        document.getElementById("bar-chart").getContext("2d"),
        getChartJs("bar")
    );
});

function getChartJs(type) {
    var config = null;

    if (type === "bar") {
        config = {
            type: "bar",
            data: {
                labels: [
                    "Users",
                    "Locations",
                    "Machines"
                ],
                datasets: [{
                    label: "Total",
                    data: [<?=$users?>, <?=$locations?>, <?=$machines?>],
                    borderColor: "rgba(33, 150, 243, 1)",
                    backgroundColor: ["orange", "lightgreen", "grey"],
                    pointBorderColor: "rgba(33, 150, 243, 1)",
                    pointBackgroundColor: "rgba(255, 255, 255, 1)",
                    pointBorderWidth: 1,
                }, ],
            },
            options: {
                responsive: true,
                legend: false,
            },
        };
    }
    return config;
}
</script>
</body>

</html>