<ul class="sidebar-menu" id="nav-accordion">
    <li>
        <a class="<?= ( (in_array('home', explode('/', current_url())) || (current_url() == base_url()) ) ? 'active' : ''); ?>" href="<?php echo site_url('profile'); ?>">
            <i class="fa fa-dashboard"></i>
            <span>PROFILE</span>
        </a>
    </li>
    <li class="sub-menu">
        <a class="<?= ( in_array('image', explode('/', current_url())) ? 'active' : '' || 
                        in_array('cv-pdf', explode('/', current_url())) ? 'active' : '' ||
                        in_array('educations', explode('/', current_url())) ? 'active' : '' || 
                        in_array('experiences', explode('/', current_url())) ? 'active' : '' ||
                        in_array('educations', explode('/', current_url())) ? 'active' : '' ||
                        in_array('experiences', explode('/', current_url())) ? 'active' : '' ||
                        in_array('projects', explode('/', current_url())) ? 'active' : '' ||
                        in_array('competences', explode('/', current_url())) ? 'active' : '' ||
                        in_array('sliders', explode('/', current_url())) ? 'active' : '' ||
                        in_array('socials', explode('/', current_url())) ? 'active' : '' ||
                        in_array('services', explode('/', current_url())) ? 'active' : '' ||
                        in_array('galerie', explode('/', current_url())) ? 'active' : ''
                      ); ?>" href="javascript:;">
            <i class="fa fa-tasks"></i>
            <span>Contenus</span>
        </a>
        <ul class="sub">
            <li class="<?= ( in_array('image', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('image'); ?>">Photo de Profile</a></li>
            <li class="<?= ( in_array('cv-pdf', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('cv-pdf'); ?>">CV PDF</a></li>
            <li class="<?= ( in_array('educations', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('educations'); ?>">Éducation</a></li>
            <li class="<?= ( in_array('experiences', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('experiences'); ?>">Expérience</a></li>
            <li class="<?= ( in_array('projects', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('projects'); ?>">Projets</a></li>
            <li class="<?= ( in_array('competences', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('competences'); ?>">Compétence</a></li>
            <li class="<?= ( in_array('sliders', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('sliders'); ?>">Slider</a></li>
            <li class="<?= ( in_array('socials', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('socials'); ?>">Sociale</a></li>
            <li class="<?= ( in_array('services', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('services'); ?>">Service</a></li>
            <li class="<?= ( in_array('galerie', explode('/', current_url())) ? 'active' : ''); ?>"><a href="<?php echo site_url('galerie'); ?>">Galerie</a></li>
        </ul>
    </li>

    <li>
        <a class="<?= (in_array('contact', explode('/', current_url())) ? 'active' : ''); ?>" href="<?php echo site_url('contact'); ?>">
            <i class="fa fa-bullhorn"></i>
            <span>Contact </span>
        </a>
    </li>

    <li>
        <a class="<?= (in_array('messages', explode('/', current_url())) ? 'active' : ''); ?>" href="<?php echo site_url('messages'); ?>">
            <i class="fa fa-envelope"></i>
            <span>Messages </span>
        </a>
    </li>

    <li>
        <a href="<?php echo site_url('logout'); ?>">
            <i class="fa fa-user"></i>
            <span>Déconnexion</span>
        </a>
    </li>
</ul>