<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
    <div class="position-sticky pt-2">
        <ul class="nav flex-column" id="accordion">         

            <?php  
                $temp_accordion = array("rh-liste-salaries", "rh-historique-excel", "rh-upload-excel", "rh-import-to-temp", "stats");
                (in_array(core::getGet("p"), $temp_accordion) OR (core::ifGet("p") == FALSE AND session::getType() != 3)) ? $_show = "show" : $_show = NULL;
                (access::ifAccesss("rh")) ? 
                    core::elementMenuH6("Salariés", NULL, "col-salaries") : NULL;
                echo '<ul class="collapse '. $_show .' list-unstyled" id="col-salaries" data-parent="#accordion">';
                (access::ifAccesss("rh-liste-salaries")) ?
                    core::elementMenu("rh-liste-salaries", "/", "RH : Liste des salariés", "users") : NULL;
                (access::ifAccesss("rh-historique-excel")) ?
                    core::elementMenu("rh-historique-excel", "/rh-historique-excel.html", "RH : Historique des Excels", "archive") : NULL;
                (access::ifAccesss("rh-historique-excel") AND isset(salaries::excelGetInProgress()["name"])) ? 
                    core::elementMenu("rh-historique-excel", "/rh-import-to-temp.html", "RH : Reprise du traitement", "file-text") : NULL;
                (access::ifAccesss("stats")) ? 
                    core::elementMenu("stats", "/stats.html", "RH : Stats salariés", "pie-chart") : NULL;
                echo '</ul>';

                $temp_accordion = array("proweb-salaries", "proweb-historique-excel", "proweb-export-csv", "proweb-salaries-upload");
                (in_array(core::getGet("p"), $temp_accordion)) ? $_show = "show" : $_show = NULL;
                (access::ifAccesss("proweb")) ? 
                    core::elementMenuH6("ProWeb", NULL, "col-proweb") : NULL;
                echo '<ul class="collapse '. $_show .' list-unstyled" id="col-proweb" data-parent="#accordion">';
                (access::ifAccesss("proweb-salaries")) ?  
                    core::elementMenu("proweb-salaries", "/proweb-salaries.html", "Proweb : Liste des salariés", "users") : NULL;
                (access::ifAccesss("proweb-historique-excel")) ? 
                    core::elementMenu("proweb-historique-excel", "/proweb-historique-excel.html", "Proweb : Historique des Excels", "archive") : NULL;
                (access::ifAccesss("proweb-export-csv")) ? 
                core::elementMenu("proweb-export-csv", "/proweb-export-csv.html", "Proweb : Transfert des données", "send") : NULL;
                echo '</ul>';

                $temp_accordion = array("compte", "compte-historique-csv", "compte-upload");
                (in_array(core::getGet("p"), $temp_accordion)) ? $_show = "show" : $_show = NULL;
                (access::ifAccesss("compte")) ?  
                    core::elementMenuH6("Comptes bancaires", NULL, "col-banque") : NULL;
                echo '<ul class="collapse '. $_show .' list-unstyled" id="col-banque" data-parent="#accordion">';
                (access::ifAccesss("compte-1")) ?  
                    core::elementMenu("compte-1", "/compte-1.html", "Banque : Compte Courant ASC", "bar-chart-2") : NULL;
                (access::ifAccesss("compte-2")) ? 
                    core::elementMenu("compte-2", "/compte-2.html", "Banque : Compte Courant AEP", "bar-chart-2") : NULL;
                (access::ifAccesss("compte-3")) ?  
                    core::elementMenu("compte-3", "/compte-3.html", "Banque : Livret OBNL TRIPLEX", "bar-chart-2") : NULL;
                (access::ifAccesss("compte-4")) ? 
                    core::elementMenu("compte-4", "/compte-4.html", "Banque : Épargne financière", "bar-chart-2") : NULL;
                (access::ifAccesss("compte-historique-csv")) ? 
                    core::elementMenu("compte-historique-csv", "/compte-historique-csv.html", "Banque : Historique des CSV", "archive") : NULL;
                echo '</ul>';
                
                $temp_accordion = array("sociale-check-salarie");
                (in_array(core::getGet("p"), $temp_accordion) OR (core::ifGet("p") == FALSE AND session::getType() == 3)) ? $_show = "show" : $_show = NULL;
                (access::ifAccesss("sociale")) ? 
                    core::elementMenuH6("Accès services sociaux", NULL, "col-sociaux") : NULL;
                echo '<ul class="collapse '. $_show .' list-unstyled" id="col-sociaux" data-parent="#accordion">';
                (access::ifAccesss("sociale-check-salarie")) ?
                    core::elementMenu("sociale-check-salarie", "/sociale-check-salarie.html", "Validation d'un compte salarié", "check-square") : NULL;
                echo '</ul>';

                $temp_accordion = array("evenements", "evenement", "lotterys", "lottery");
                (in_array(core::getGet("p"), $temp_accordion)) ? $_show = "show" : $_show = NULL;
                (access::ifAccesss("evenements")) ?
                    core::elementMenuH6("Evènements", NULL, "col-events") : NULL;
                echo '<ul class="collapse '. $_show .' list-unstyled" id="col-events" data-parent="#accordion">';
                (access::ifAccesss("evenements")) ?
                    core::elementMenu("evenements", "/evenements.html", "Listes des évènements", "calendar") : NULL;
                (access::ifAccesss("lotterys")) ? 
                    core::elementMenu("lotterys", "/lotterys.html", "Listes des tirages au sort", "zap") : NULL;
                echo '</ul>';
                
                $temp_accordion = array();
                (in_array(core::getGet("p"), $temp_accordion)) ? $_show = "show" : $_show = NULL;
                (access::ifAccesss("pratique")) ?
                    core::elementMenuH6("Pratiques", NULL, "col-practice") : NULL;
                echo '<ul class="collapse '. $_show .' list-unstyled" id="col-practice" data-parent="#accordion">';
                (access::ifAccesss("pratique")) ?
                    core::elementMenuLink("https://corporatedirectory.capgemini.com/MyDirectory/portals/std/index-portal.jsp", "Corporate Directory", "link") : NULL;
                (access::ifAccesss("pratique")) ?
                    core::elementMenuLink("https://www.cse-invent.com", "Site du CSE", "link") : NULL;
                (access::ifAccesss("pratique")) ?
                    core::elementMenuLink("https://" . DOMAIN_EVENTS, "Emargement Salariés", "link") : NULL;
                (access::ifAccesss("pratique")) ?
                    core::elementMenuLink("https://" . DOMAIN_CONTROL, "Emargement Contrôleur", "link") : NULL;
                (access::ifAccesss("pratique")) ?
                    core::elementMenuLink("https://wiki.cse-invent.com", "Wiki CSE", "link") : NULL;
                (access::ifAccesss("pratique")) ?
                    core::elementMenuLink("https://contact.cse-invent.com", "Contact CSE", "link") : NULL;
                (access::ifAccesss("pratique")) ?
                    core::elementMenuLink("https://sender.cse-invent.com", "SendPortal CSE", "link") : NULL;
                echo '</ul>';

                $temp_accordion = array("user", "parametres", "parametre-users", "parametre-teams", "historique");
                (in_array(core::getGet("p"), $temp_accordion)) ? $_show = "show" : $_show = NULL;
                (access::ifAccesss("parametres")) ?
                    core::elementMenuH6("Administration", NULL, "col-admin") : NULL;
                echo '<ul class="collapse '. $_show .' list-unstyled" id="col-admin" data-parent="#accordion">';
                (access::ifAccesss("parametre-users")) ?
                    core::elementMenu("parametre-users", "/parametre-users.html", "Admin : Utilisateurs", "users") : NULL;
                (access::ifAccesss("parametre-teams")) ?
                    core::elementMenu("parametre-teams", "/parametre-teams.html", "Admin : Groupes & Droits", "users") : NULL;
                (access::ifAccesss("historique")) ?
                    core::elementMenu("historique", "/historique.html", "Admin : Historique", "activity") : NULL;
                (access::ifAccesss("parametres")) ?
                    core::elementMenu("parametres", "/parametres.html", "Admin : Paramètres", "tool") : NULL;
                echo '</ul>';
            ?>
        </ul>
    </div>
    
    <div style="position: absolute; bottom: 0; margin: 0 0 5px 10px; color: gray;">
        <small>Chargement le <?php echo core::printDateTxt(); ?></small>
    </div>
</nav>