</div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="/src/vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/src/vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="/src/vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <?php if($this->router->fetch_class() == 'dashboard'):?>
        <!--<script src="../src/vendor/raphael/raphael.min.js"></script>
        <script src="../src/vendor/morrisjs/morris.min.js"></script>
        <script src="../src/data/morris-data.js"></script>-->

        <script src="/src/vendor/datatables/js/jquery.dataTables.min.js"></script>
        <script src="/src/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
        <script src="/src/vendor/datatables-responsive/dataTables.responsive.js"></script>
        <script src="/src/js/jquery-ui.min.js"></script>

        <script>
        $(document).ready(function() {
            $('#dataTables-example').DataTable({
                responsive: false,
                aoColumns : [
                    null,
                    null,
                    { "bSortable": false },
                    null,
                    { "bSortable": false },
                    null,
                    { "bSortable": false }
                ]
            });

            $( "#fromDate" ).datepicker({dateFormat: "dd-mm-yy"});
            $( "#toDate" ).datepicker({dateFormat: "dd-mm-yy"});
        });
        </script>

        <script type="text/javascript">
            $(document).on("click", ".deleteLink", function () {
                 var linkId = $(this).data('id');
                 $(".modal-body #linkId").val( linkId );
                 // As pointed out in comments, 
                 // it is superfluous to have to manually call the modal.
                 // $('#addBookDialog').modal('show');
            });

            document.getElementById("confirmDelete").onclick = function () {
                var linkId = $(".modal-body #linkId").val();
                location.href = "/link/delete/" + linkId;
            };
        </script>

    <?php endif;?>

       <!-- Morris Charts JavaScript -->
    <?php if($this->router->fetch_class() == 'summary'):?>
        <script src="/src/vendor/flot/excanvas.min.js"></script>
        <script src="/src/vendor/flot/jquery.flot.js"></script>
        <script src="/src/vendor/flot/jquery.flot.pie.js"></script>
        <script src="/src/vendor/flot/jquery.flot.resize.js"></script>
        <script src="/src/vendor/flot/jquery.flot.time.js"></script>
        <script src="/src/vendor/flot-tooltip/jquery.flot.tooltip.min.js"></script>
        <script src="/src/vendor/flot/jquery.flot.pie.js"></script>
        <script src="/src/vendor/raphael/raphael.min.js"></script>
        <script src="/src/vendor/morrisjs/morris.min.js"></script>
        <script src="/src/js/jquery-ui.min.js"></script>
        <!--<script src="/src/js/ewasap.php?v=1"></script>-->

         <script type="text/javascript">
            $(document).ready(function() {
                
                $(function() {

                    Morris.Bar({
                        element: 'morris-bar-chart',
                        data: <?php echo isset($locationResult) ? $locationResult : '[]';?>,
                        xkey: 'y',
                        ykeys: ['a'],
                        labels: ['Total Clicks'],
                        hideHover: 'auto',
                        resize: true
                    });

                    Morris.Donut({
                        element: 'morris-donut-chart',
                        data: <?php echo isset($osResult) ? $osResult : '[]';?>,
                        resize: true
                    });

                     Morris.Donut({
                        element: 'morris-donut-chart-2',
                        data: <?php echo isset($refResult) ? $refResult : '[]';?>,
                        resize: true
                    });

                    $( "#fromDate" ).datepicker({dateFormat: "dd-mm-yy"});
                    $( "#toDate" ).datepicker({dateFormat: "dd-mm-yy"});

                });  
            });

        </script>
    <?php endif;?>

    <!-- Custom Theme JavaScript -->
    <script src="/src/dist/js/sb-admin-2.js"></script>

</body>

</html>
