<?php
if (isset($_SESSION['user'])) {
?>
    <?php
    if ($data_user['level'] == $data_user['level']) {
    ?>
        <style>
            .menubottom {
                display: none
            }

            @media screen and (max-width:800px) {
                .menubottom {
                    position: relative
                        /*fixed*/
                    ;
                    right: 0;
                    left: 0;
                    z-index: 500;
                    bottom: 0
                }

                .menubottom nav ul {
                    display: flex !important;
                    width: 100% !important;
                    padding-left: 0;
                    justify-content: space-between !important;
                    margin-bottom: 0;
                    flex-direction: row !important;
                    list-style: none
                }

                .menubottom nav ul li {
                    width: 100% !important;
                    list-style: none;
                }

                .menubottom nav ul li a {
                    display: block;
                    text-decoration: none;
                    padding: .4rem 1rem
                }

                .menubottom nav ul li a svg {
                    width: 25px;
                    height: 25px;
                    fill: #9aa3a9;
                }

                .menubottom nav ul li a span {
                    color: #fbfbfb;
                    position: relative;
                    font-size: 12px;
                    display: block;
                    top: -5px padding-top: 5px;
                }
            }

            @media screen and (max-width:768px) {
                .menubottom {
                    left: 0;
                    text-align: center;
                    width: 100%;
                    position: fixed;
                    display: block
                }

                .menubottom nav {
                    background-color: #191c24;
                    background-image: linear-gradient(110deg, rgba(33, 150, 243, 0.1) 16%, rgba(33, 150, 243, 0.1) 17%, rgba(33, 150, 243, 0.05) 17%, rgba(33, 150, 243, 0.05) 23%, transparent 8.5%, transparent 78%, rgba(33, 150, 243, 0.05) 78%, rgba(33, 150, 243, 0.05) 84%, rgba(33, 150, 243, 0.1) 84%, rgba(33, 150, 243, 0.1));
                    display: block;
                    position: relative;
                    box-shadow: 0 -1px 3px rgba(0, 0, 0, .3);
                    border-radius: 20px 20px 0 0
                }

                .menubottom ul li {
                    float: left;
                    width: 100px;
                    height: 100%;
                    transition: background-color 0.2s linear .5s;
                    transition: all .5s linear;
                    background-position: center;
                    display: block
                }
        </style>
        <div class='menubottom '>
            <nav>
                <ul>
                    <li class='ripple'>
                        <a href='<?php echo $config['web']['url']; ?>' itemprop='url' title='Home'><i class="mdi mdi-home" style='font-size:20px'></i><span itemprop='name'><b>Home</b></span></a>
                    </li>
                    <li class='ripple'>
                        <a href='<?php echo $config['web']['url']; ?>deposit/' itemprop='url' title='Deposit'><i class="mdi mdi-cash-usd" style='font-size:20px'></i><span itemprop='name'><b>Deposit</b></span></a>
                    </li>
                    <li class='ripple'>
                        <a href='<?php echo $config['web']['url']; ?>user/mutasi' itemprop='url' title='Mutasi'><i class="mdi mdi-code-not-equal" style='font-size:20px'></i><span itemprop='name'><b>Mutasi</b></span></a>
                    </li>
                    <li class='ripple'>
                        <a href='<?php echo $config['web']['url']; ?>tiket/' itemprop='url' title='Bantuan'><i class="mdi mdi-comment-account-outline" style='font-size:20px'></i><span itemprop='name'><b>Bantuan</b></span></a>
                    </li>
                    <li class='ripple'>
                        <a href='<?php echo $config['web']['url']; ?>user/setting' itemprop='url' title='Profil'><i class="mdi mdi-account-circle" style='font-size:20px'></i><span itemprop='name'><b>Profil</b></span></a>
                    </li>
                </ul>
            </nav>
        </div>
<?php }
} ?>
<footer class="footer">
    <div class="d-sm-flex justify-content-center justify-content-sm-between">
        <span class="text-muted d-block text-center text-sm-left d-sm-inline-block">© Copyright <?php echo $data['short_title']; ?>.</span>
    </div>
</footer>
<!-- partial -->
</div>
<!-- main-panel ends -->
</div>
<!-- page-body-wrapper ends -->
</div>
<!--WA BUTTON-->
<!--<div class="integration-fixed integration-fixed__bottom-left">
    <div class="whatsapp-container">
        <a href="https://api.whatsapp.com/send?phone=<?php echo $data['wa_number']; ?>" target="_blank" class="whatsapp-button">
            <i class="mdi mdi-whatsapp"></i>
        </a>
    </div>
</div>-->
<!-- container-scroller -->
<link rel="stylesheet" href="<?php echo $config['web']['url']; ?>assets/vendors/mdi/css/materialdesignicons.min.css<?php echo $version_update; ?>">
<!-- plugins:js -->
<script src="<?php echo $config['web']['url']; ?>assets/vendors/js/vendor.bundle.base.js<?php echo $version_update; ?>"></script>
<!-- endinject -->
<script src="<?php echo $config['web']['url']; ?>assets/vendors/select2/select2.min.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/vendors/typeahead.js/typeahead.bundle.min.js<?php echo $version_update; ?>"></script>
<!-- Custom js for this page -->
<script src="<?php echo $config['web']['url']; ?>assets/js/file-upload.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/js/typeahead.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/js/select2.js<?php echo $version_update; ?>"></script>
<!-- Plugin js for this page -->
<script src="<?php echo $config['web']['url']; ?>assets/vendors/chart.js/Chart.min.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/vendors/progressbar.js/progressbar.min.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/vendors/jvectormap/jquery-jvectormap.min.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/vendors/jvectormap/jquery-jvectormap-world-mill-en.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/vendors/owl-carousel-2/owl.carousel.min.js<?php echo $version_update; ?>"></script>
<!-- End plugin js for this page -->
<!-- inject:js -->
<script src="<?php echo $config['web']['url']; ?>assets/js/off-canvas.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/js/hoverable-collapse.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/js/misc.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/js/settings.js<?php echo $version_update; ?>"></script>
<script src="<?php echo $config['web']['url']; ?>assets/js/todolist.js<?php echo $version_update; ?>"></script>
<!-- endinject -->
<!-- Custom js for this page -->
<script src="<?php echo $config['web']['url']; ?>assets/js/chart.js<?php echo $version_update; ?>"></script>
<!-- Custom js for this page -->
<script src="<?php echo $config['web']['url']; ?>assets/js/dashboard.js<?php echo $version_update; ?>"></script>
<!-- End custom js for this page -->
<script type="text/javascript">
    $(document).ready(function() {
        $("#kategori").change(function() {
            var kategori = $("#kategori").val();
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/layanan_sosmed.php',
                data: 'kategori=' + kategori,
                type: 'POST',
                dataType: 'html',
                success: function(msg) {
                    $("#layanan").html(msg);
                }
            });
        });
        $("#layanan").change(function() {
            var layanan = $("#layanan").val();
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/catatan_sosmed.php',
                data: 'layanan=' + layanan,
                type: 'POST',
                dataType: 'html',
                success: function(msg) {
                    $("#catatan").html(msg);
                }
            });
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/rate_sosmed.php',
                data: 'layanan=' + layanan,
                type: 'POST',
                dataType: 'html',
                success: function(msg) {
                    $("#rate").val(msg);
                }
            });
        });
    });
    document.getElementById("show1").style.display = "none";
    $("#layanan").change(function() {
        var selectedCountry = $("#layanan option:selected").text();
        if (selectedCountry.indexOf('Kostum') !== -1 || selectedCountry.indexOf('Costum') !== -1 || selectedCountry.indexOf('custom') !== -1 || selectedCountry.indexOf('Custom') !== -1 || selectedCountry.indexOf('CUSTOM') !== -1) {
            document.getElementById("show1").style.display = "none";
            document.getElementById("show2").style.display = "block";
        } else if (selectedCountry.indexOf('Comment Likes') !== -1 || selectedCountry.indexOf('Tiktok Likes Komentar') !== -1) {
            document.getElementById("show1").style.display = "block";
            document.getElementById("show2").style.display = "none";
        } else {
            document.getElementById("show1").style.display = "block";
            document.getElementById("show2").style.display = "none";
        }
    });
    $(document).ready(function() {
        $("#comments").on("keypress", function(a) {
            if (a.which == 13) {
                var baris = $("#comments").val().split(/\r|\r\n|\n/).length;
                var rates = $("#rate").val();
                var calc = eval(baris) * rates;
                var a1 = calc;
                var b1 = Math.floor(a1)
                console.log(b1)
                $('#totalxx').val(b1);
            }
        });

    });

    function get_total(quantity) {
        var rate = $("#rate").val();
        var result = eval(quantity) * rate;
        var a1 = result;
        var b1 = Math.floor(a1);
        $('#total').val(b1);
    }
</script>
<script type="text/javascript">
    function copy_to_clipboard(element) {
        var copyText = document.getElementById(element);
        copyText.select();
        document.execCommand("copy");
    }
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $('.view_order').click(function() {
            var id = $(this).attr("id");
            // memulai ajax
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/detail-sosmed.php',
                method: 'post',
                data: {
                    id: id
                },
                success: function(data) {
                    $('#data_order').html(data);
                    $('#myDetail').modal("show");
                }
            });
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $('.view_ppob').click(function() {
            var id = $(this).attr("id");
            // memulai ajax
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/detail-ppob.php',
                method: 'post',
                data: {
                    id: id
                },
                success: function(data) {
                    $('#data_ppob').html(data);
                    $('#myPPOB').modal("show");
                }
            });
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $('.view_layanan').click(function() {
            var id = $(this).attr("id");
            // memulai ajax
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/detail-layanan.php',
                method: 'post',
                data: {
                    id: id
                },
                success: function(data) {
                    $('#data_layanan').html(data);
                    $('#myLayanan').modal("show");
                }
            });
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $('.view_layananPPOB').click(function() {
            var id = $(this).attr("id");
            // memulai ajax
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/detail-layanan-ppob.php',
                method: 'post',
                data: {
                    id: id
                },
                success: function(data) {
                    $('#data_layananPPOB').html(data);
                    $('#myLayananPPOB').modal("show");
                }
            });
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#provider").change(function() {
            var provider = $("#provider").val();
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/deposit-manual.php',
                data: 'provider=' + provider,
                type: 'POST',
                dataType: 'html',
                success: function(msg) {
                    $("#catatandepo").html(msg);
                }
            });
        });
        $("#jumlah").change(function() {
            var provider = $("#provider").val();
            var jumlah = $("#jumlah").val();
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/rate_depositmanual.php',
                type: 'POST',
                dataType: 'html',
                data: 'provider=' + provider + '&jumlah=' + jumlah,
                success: function(result) {
                    $("#ratemanual").val(result);
                }
            });
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#providerauto").change(function() {
            var providerauto = $("#providerauto").val();
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/deposit-automatis.php',
                data: 'providerauto=' + providerauto,
                type: 'POST',
                dataType: 'html',
                success: function(msg) {
                    $("#catatandepoauto").html(msg);
                }
            });
        });
        $("#jumlah").change(function() {
            var providerauto = $("#providerauto").val();
            var jumlah = $("#jumlah").val();
            $.ajax({
                url: '<?php echo $config['web']['url']; ?>ajax/rate_depositauto.php',
                type: 'POST',
                dataType: 'html',
                data: 'providerauto=' + providerauto + '&jumlah=' + jumlah,
                success: function(result) {
                    $("#rateauto").val(result);
                }
            });
        });
    });
</script>
</body>

</html>