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

<!-- Footer -->
<footer class="sticky-footer bg-white">
    <div class="container my-auto">
        <div class="copyright text-center my-auto">
            <span>Copyright &copy; NearFeast App</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">Ready to Leave?</h5>
                <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
            <div class="modal-footer">
                <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
                <a class="btn btn-primary" href="login.html">Logout</a>
            </div>
        </div>
    </div>
</div>


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

<script src="<?=base_url()?>assets/theme/vendor/datatables/jquery.dataTables.min.js"></script>
<script src="<?=base_url()?>assets/theme/vendor/datatables/dataTables.bootstrap4.min.js"></script>
<script src="<?=base_url()?>assets/theme/js/demo/datatables-demo.js"></script>
<script src="<?=base_url()?>assets/plugins/toast/toast.min.js"></script>
<script src="<?=base_url()?>assets/js/Chart.min.js"></script>
<script src="<?=base_url()?>assets/js/Chart.bundle.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 } ?>
 var table = $("#dataTableevent").DataTable({
    // Add your DataTable options here
      order: [[0, 'desc']],
    // Define column options
    columnDefs: [
      {
        // Hide the first column (index 0)
        targets: 0,
        visible: false
      }
    ]
  });

  // Set the first column to sort in descending order by default
 // table.order([0, 'desc']).draw();
</script>
<script>
$(function() {
    new Chart(
        document.getElementById("line_chart").getContext("2d"),
        getChartJs("line")
    );
});

function getChartJs(type) {
    var config = null;

    if (type === "line") {
        config = {
            type: "line",
            data: {
                labels: [
                    <?=$labelStr?>
                ],
                datasets: [{
                    label: "People Rating Trends",
                    data: [<?=$dataStr?>],
                    borderColor: "rgba(33, 150, 243, 1)",
                    backgroundColor: "rgba(33, 150, 243, 0.2)",
                    pointBorderColor: "rgba(33, 150, 243, 1)",
                    pointBackgroundColor: "rgba(255, 255, 255, 1)",
                    pointBorderWidth: 1,
                }, ],
            },
            options: {
                responsive: true,
                legend: false,
            },
        };
    }
    return config;
}
</script>
<script>
$(function() {
    new Chart(
        document.getElementById("line_chart2").getContext("2d"),
        getChartJs2("line")
    );
});

function getChartJs2(type) {
    var config = null;

    if (type === "line") {
        config = {
            type: "line",
            data: {
                labels: [
                    <?=$labelStr2?>
                ],
                datasets: [{
                    label: "Reservation Statistics",
                    data: [<?=$dataStr2?>],
                    borderColor: "rgba(33, 150, 243, 1)",
                    backgroundColor: "rgba(33, 150, 243, 0.2)",
                    pointBorderColor: "rgba(33, 150, 243, 1)",
                    pointBackgroundColor: "rgba(255, 255, 255, 1)",
                    pointBorderWidth: 1,
                }, ],
            },
            options: {
                responsive: true,
                legend: false,
            },
        };
    }
    return config;
}
</script>
<script>
$(function() {
    new Chart(
        document.getElementById("line_chart3").getContext("2d"),
        getChartJs3("line")
    );
});

function getChartJs3(type) {
    var config = null;

    if (type === "line") {
        config = {
            type: "line",
            data: {
                labels: [
                    <?=$labelStr2?>
                ],
                datasets: [{
                    label: "Marketing Effectiveness",
                    data: [<?=$dataStr2?>],
                    borderColor: "rgba(33, 150, 243, 1)",
                    backgroundColor: "rgba(33, 150, 243, 0.2)",
                    pointBorderColor: "rgba(33, 150, 243, 1)",
                    pointBackgroundColor: "rgba(255, 255, 255, 1)",
                    pointBorderWidth: 1,
                }, ],
            },
            options: {
                responsive: true,
                legend: false,
            },
        };
    }
    return config;
}
</script>
</body>

</html>