<div class="sidebar" id="sidebar">
    <div class="sidebar-inner slimscroll">
        <div id="sidebar-menu" class="sidebar-menu">
            <ul>
                <li class="menu-title">
                    <span>Menu principal</span>
                </li>
                <?php
                        $menu_roles = $_SESSION['menu_roles'];
                        $smenu_roles = $_SESSION['smenu_roles'];
                ?>
                <li class="active">
                    <a href="<?php echo base_url(); ?>dashboard"><i class="fa fa-university"></i> <span> Tableau de bord</span></a>
                </li>
                <?php if($this->session->verificateur == '1'):
                            if(isset($smenu_roles['VERIFICATON'])): ?>
                                <li>
                                    <a href="<?php echo base_url();?>C_verification" class="menu" id="menu_verification"><i class="fa fa-binoculars"></i> <span> Vérification</span></a>
                                </li>
                            <?php endif; ?>
                <?php endif; ?>
                <?php if (isset($menu_roles['CAMPAGNE'])): ?>
                    <li class="submenu">
                        <a href="#" class="waves-effect"><i class="fas fa-copyright"></i><span> Mission vérification </span><span
                            class="menu-arrow"></span></a>
                        <ul class="list-unstyled">
                            <?php if (isset($smenu_roles['CAMPAGNE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_campagne" class="menu"
                                       id="menu_campagne">Gestion Mission</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['CONTROLE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_controle" class="menu"
                                       id="menu_controle">Controle</a></li>
                            <?php endif; ?>
                        </ul>
                    </li>
                <?php endif; ?>
                <?php if (isset($menu_roles['MILLESTONES'])) : ?>
                    <li class="submenu">
                        <a href="#" class="waves-effect"><i class="fas fa-rocket"></i><span>Millestones</span><span
                    class="menu-arrow"></span></a>
                        <ul class="list-unstyled">
                            <?php if (isset($smenu_roles['MILLESTONE']['d_read'])) : ?>
                                <li><a href="<?= base_url(); ?>C_millestones/millestone_strcuture" class="menu" id="menu_Millestones">Millestones</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['FICHE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_fiche" class="menu"
                                       id="menu_fiche">Fiches vérification</a></li>
                            <?php endif; ?>
                        </ul>
                    </li>
                <?php endif; ?>
                <?php if (isset($menu_roles['IMPORT_DATA'])) : ?>
                    <li class="submenu">
                        <a href="#" class="waves-effect"><i class="fas fa-download"></i><span>Import données</span><span
                    class="menu-arrow"></span></a>
                        <ul class="list-unstyled">
                            <?php if (isset($smenu_roles['GENERE_TPL']['d_read'])) : ?>
                                <li><a href="<?= base_url(); ?>C_import_data" class="menu" id="menu_genre_template">Génération template</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['IMPORT_DATA']['d_read'])) : ?>
                                <li><a href="<?= base_url(); ?>C_import_data/form_import" class="menu" id="menu_import_template">Importation donneés</a></li>
                            <?php endif; ?>
                        </ul>
                    </li>
                <?php endif; ?>
                <?php if (isset($menu_roles['PARAM'])): ?>
                    <li class="submenu">
                        <a href="#" class="waves-effect"><i class="fas fa-cog"></i><span> Paramètrage </span><span
                            class="menu-arrow"></span></a>
                        <ul class="list-unstyled">
                            <?php if (isset($smenu_roles['ANNEE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_gestion_annee" class="menu"
                                       id="menu_gestion_annee">Annee</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['PERIODE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_gestion_periode" class="menu"
                                       id="menu_gestion_periode">Période</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['SUPPORTS']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_supports_verif" class="menu"
                                       id="menu_supports_verif">Supports vérification</a></li>
                            <?php endif; ?>
                             <?php if (isset($smenu_roles['TYPE_STR']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_type_structure" class="menu"
                                       id="menu_type_structure">Type structure</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['ENTITE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_entite" class="menu"
                                       id="menu_entite">Entités</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['STR']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_structure/atlas" class="menu"
                                       id="menu_structure">Structure</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['PERS']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_personnel" class="menu"
                                       id="menu_personnel">Personnel</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['DINDIC']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_indicateur_domaine" class="menu"
                                       id="menu_domaine_indicateur">Domaine Indicateur</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['INDIC']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_indicateur" class="menu"
                                       id="menu_indicateur">Indicateur</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['CATMILESTONES']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_millestones" class="menu"
                                       id="menu_milestones">Conf Milestones</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['MODELE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_modele_fiche" class="menu"
                                       id="menu_modele_fiche">Modele fiche de saisie</a></li>
                            <?php endif; ?>
                            <?php if (isset($smenu_roles['LIVRABLE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_millestones/livrable_milestone" class="menu"
                                       id="menu_livrable">Livrables</a></li>
                            <?php endif; ?>

                            <?php if (isset($smenu_roles['PERIODICITE']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_periodicite_api/index" class="menu"
                                       id="menu_periodicite_api">Periodicite API</a></li>
                             <?php endif; ?>
                            <?php if (isset($smenu_roles['PARAM_BASEURL']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>C_param_baseurl_api" class="menu"
                                       id="menu_baseurl_api">Base Url Api</a></li>

                            <?php endif; ?>
                        </ul>
                    </li>
                <?php endif; ?>

                <?php if (isset($menu_roles['SECURITE'])): ?>
                    <li class="submenu">
                        <a href="#" class="waves-effect"><i class="fas fa-unlock"></i><span> Sécurité </span><span
                            class="menu-arrow"></span></a>
                        <ul class="list-unstyled">

                            <?php if (isset($smenu_roles['USR']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>sys/C_sys_user" class="menu"
                                       id="menu_sys_users">Utilisateurs</a></li>
                            <?php endif; ?>

                            <?php if (isset($smenu_roles['PROFIL']['d_read'])): ?>
                                <li><a href="<?php echo base_url(); ?>sys/C_sys_profil" class="menu"
                                       id="menu_sys_profils">Profils</a></li>
                            <?php endif; ?>
                            
                        </ul>
                    </li>
                <?php endif; ?>
                <li>
                    <a href="<?php echo base_url(); ?>se_deconnecter"><i class="fas fa-power-off text-danger"></i><span><strong class="text-danger"> Se déconnecter </strong></span></a>
                </li>
                <li class="menu-title">
                    <a href="#" class="menu" id="menu_campagne_milestones"></a>
                </li>
            </ul>
        </div>
    </div>
</div>