<?php include "header.php"; ?>
<main>

    <body>
        <p id="index_inmut"></p>
    </body>
    <script>
        $(document).ready(function() {
            login()

            function login() {
                $.ajax({
                    url: "model/login.php",
                    method: "GET",
                    success: function(data) {
                        $('#myuser').html(data);
                        var log = document.getElementById('myuser').innerHTML;
                        if (log == "Logout") {
                            alert('Silahkan anda login dulu!!')
                            document.location.href = "../login.php";
                        }
                    }
                })
            }
        })
    </script>

    <script>
        $(document).ready(function() {
            document.getElementById('tittlepage').innerHTML = "INDEX";
            index_inmut()

            function index_inmut() {

                $.ajax({
                    url: "data_index_inmut.php?awal=<?= $_POST['awal']; ?>&akhir=<?= $_POST['akhir']; ?>&printf=",
                    method: "GET",
                    success: function(data) {
                        $('#index_inmut').html(data);
                    }
                })

            }
        });
    </script>
</main>
<?php include "footer.php"; ?>