<?php include('include/headscript.php'); ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <?php include('include/seo.php'); ?>

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <link rel="shortcut icon" href="assets/images/favicon.ico">

    <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="assets/css/icons.css" rel="stylesheet" type="text/css">
    <link href="assets/css/style.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="https://cdn.materialdesignicons.com/5.4.55/css/materialdesignicons.min.css">

</head>
<style>
    /* Visualizza il pulsante mobile anche su desktop */
    .button-menu-mobile {
        display: inline-block !important;
    }

    /* Nascondi il quadrato rosso con la X su desktop */
    @media (min-width: 992px) {
        .button-menu-mobile {
            background-color: transparent;
            border: none;
            padding: 0;
            width: auto;
            height: auto;
        }

        .button-menu-mobile i.ion-close {
            display: none;
            /* Nasconde la X rossa */
        }

        .button-menu-mobile i.mdi-menu {
            display: inline-block;
            /* Mostra sempre le tre righe orizzontali */
        }
    }

    /* Stile per mobile: Mantieni il comportamento originale */
    @media (max-width: 991.98px) {
        .button-menu-mobile {
            background-color: #ff5e5e;
            /* Questo è il colore rosso originale */
            border-radius: 50%;
            width: 50px;
            height: 50px;
        }

        .button-menu-mobile i.ion-close {
            display: inline-block;
            /* Mostra la X rossa */
        }

        .button-menu-mobile i.mdi-menu {
            display: none;
            /* Nasconde le tre righe quando la barra è aperta */
        }
    }

    /* Loader Overlay */
    #loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.8);
        z-index: 9999;
        display: flex;
        justify-content: center;
        align-items: center;
        display: none;
    }

    .loading-spinner {
        text-align: center;
    }
</style>

<body class="fixed-left">

    <!-- Loader -->
    <div id="loading-overlay">
        <div class="loading-spinner">
            <div class="spinner-border text-primary" role="status">
                <span class="sr-only">Loading...</span>
            </div>
        </div>
    </div>

    <!-- Begin page -->
    <div id="wrapper">

        <?php include('include/navigationbar.php'); ?>

        <!-- Start right Content here -->

        <div class="content-page">
            <!-- Start content -->
            <div class="content">

                <?php include('include/topbar.php'); ?>

                <div class="page-content-wrapper ">

                    <div class="container-fluid">

                        <div class="row">
                            <div class="col-sm-12">
                                <div class="page-title-box">
                                    <div class="btn-group float-right">
                                        <ol class="breadcrumb hide-phone p-0 m-0">
                                            <li class="breadcrumb-item"><a href="#">Kering Portal</a></li>
                                            <li class="breadcrumb-item active">Dashboard</li>
                                        </ol>
                                    </div>
                                    <h4 class="page-title">Dashboard</h4>
                                </div>
                            </div>
                        </div>
                        <!-- end page title end breadcrumb -->

                        <div class="row">
                            <div class="col-xl-12">
                                <div class="card">
                                    <div class="card-body">
                                        <h5 class="header-title pb-3 mt-0">XLS TO RSL</h5>
                                        <a class="btn btn-danger" href="import-xlsrsl.php" role="button">NEW IMPORT</a>
                                        <a class="btn btn-danger" href="rsl-category.php" role="button">RSL Category</a>
                                        <a href="component.php"><button type="button" class="btn btn-danger w-md waves-effect waves-light">Components</button></a>
                                        <a href="standards.php"><button type="button" class="btn btn-danger w-md waves-effect waves-light">Standards</button></a>
                                        <a href="saytrl-newsletter.php"><button type="button" class="btn btn-success w-lg waves-effect waves-light">SayTRL</button></a>
                                        <br><br>
                                        <form action="import-xls.php" method="post" enctype="multipart/form-data" class="needs-validation" novalidate>
                                            <div class="form-group">
                                                <label for="file">Select XLS File:</label>
                                                <div class="custom-file">
                                                    <input type="file" class="custom-file-input" id="file" name="file" accept=".xls,.xlsx" required>
                                                    <label class="custom-file-label" for="file">Select file...</label>
                                                    <div class="invalid-feedback">Please, select a file.</div>
                                                </div>
                                            </div>
                                            <button type="submit" class="btn btn-primary">Import XLS</button>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div><!-- container -->

                </div> <!-- Page content Wrapper -->

            </div> <!-- content -->

            <?php include('include/footer.php'); ?>

        </div>
        <!-- End Right content here -->

    </div>
    <!-- END wrapper -->

    <!-- jQuery  -->
    <script src="assets/js/jquery.min.js"></script>
    <script src="assets/js/popper.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/modernizr.min.js"></script>
    <script src="assets/js/detect.js"></script>
    <script src="assets/js/fastclick.js"></script>
    <script src="assets/js/jquery.slimscroll.js"></script>
    <script src="assets/js/jquery.blockUI.js"></script>
    <script src="assets/js/waves.js"></script>
    <script src="assets/js/jquery.nicescroll.js"></script>
    <script src="assets/js/jquery.scrollTo.min.js"></script>

    <script src="assets/plugins/chart.js/chart.min.js"></script>
    <script src="assets/pages/dashboard.js"></script>

    <!-- App js -->
    <script src="assets/js/app.js"></script>

    <!-- Script per il loader -->
    <script>
        document.querySelector('form').addEventListener('submit', function(event) {
            event.preventDefault(); // Previeni temporaneamente l'invio del modulo

            // Mostra il loader
            document.getElementById('loading-overlay').style.display = 'flex';

            // Dopo un piccolo ritardo, esegui l'invio del modulo
            setTimeout(() => {
                event.target.submit(); // Esegui l'invio del modulo
            }, 100); // Ritardo di 100 millisecondi
        });
    </script>


</body>

</html>