</div>

<!-- Footer -->
<footer>
    <div class="container my-auto">
        <div class="copyright text-center my-auto">
            <span>Copyright &copy; Broiler Medic</span>
        </div>
    </div>
</footer>
<!-- End of Footer -->

</div>
<!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
</a>

<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Apakah anda yakin ingin keluar?</h5>
                <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">Silahkan klik logout untuk melanjutkan</div>
            <div class="modal-footer">
                <button class="btn btn-secondary" type="button" data-dismiss="modal">Batalkan</button>
                <a class="btn btn-primary" href="<?php echo base_url(); ?>dashboard/logout">Logout</a>
            </div>
        </div>
    </div>
</div>

<!-- Bootstrap core JavaScript-->
<script src="<?php echo base_url(); ?>assets/vendor/jquery/jquery.min.js"></script>
<script src="<?php echo base_url(); ?>assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Core plugin JavaScript-->
<script src="<?php echo base_url(); ?>assets/vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->
<script src="<?php echo base_url(); ?>assets/js/sb-admin-2.min.js"></script>

<script src="<?php echo base_url(); ?>assets/vendor/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url(); ?>assets/vendor/datatables/dataTables.bootstrap4.min.js"></script>
<script src="<?php echo base_url(); ?>assets/js/demo/datatables-demo.js"></script>

<!-- Page level plugins -->
<script src="<?php echo base_url(); ?>assets/vendor/chart.js/Chart.min.js"></script>

<!-- Page level custom scripts -->
<script src="<?php echo base_url(); ?>assets/js/demo/chart-area-demo.js"></script>
<!-- <script src="<?php echo base_url(); ?>assets/js/demo/chart-pie-demo.js"><  /script> -->

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.2.2/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.2.2/js/buttons.html5.min.js"></script>
<script>
    try {
        $('#datatable2').DataTable({
            dom: 'Bfrtip',
            buttons: [{
                text: 'Download Excel',
                extend: 'excel',
                title: null,
                exportOptions: {
                    columns: ':visible:not(.exclude-export)'
                }
            }, ],
        });
        $('.buttons-excel').hide();
        $('#exportData').on('click', function() {
            $('.buttons-excel').click();
        });
    } catch (error) {

    }
</script>

<script src="<?php echo base_url(); ?>aset/js/owl.carousel.js"></script>
<?php if ($datasets) { ?>
    <?php foreach ($datasets as $k => $d) { ?>
        <script type="text/javascript">
            $(document).ready(function() {
                var arcolor = new Array('#ffffff', '#cc66ff', '#019AFF', '#00CBFD', '#00FEFE', '#A4F804', '#FFFC00', '#FDCD01', '#FD9A01', '#FB6700');
                setColor();
                $('.pilihkondisi').on('change', 'tr td select#sl<?php echo $k; ?>', function() {
                    setColor();
                });

                function setColor() {
                    var selectedItem = $('tr td select#sl<?php echo $k; ?> :selected');
                    var color = arcolor[selectedItem.data("id")];
                    $('tr td select#sl<?php echo $k; ?>.opsikondisi').css('background-color', color);
                    $('tr td select#sl<?php echo $k; ?>.opsikondisi').css('color', '#000');
                }
            });
        </script>
    <?php } ?>
<?php } ?>

</body>

</html>