<?php $sidebar = SiteHelpers::menus('sidebar') ;
$active = Request::segment(1);
?>
  <div>
    <div class="sidebar-compact" id="side-nav">
      <ul>
          <li class="logo" >
            @if(file_exists(public_path().'/uploads/images/'.config('sximo')['cnf_logo']) && config('sximo')['cnf_logo'] !='')
              <img src="{{ asset('uploads/images/'.config('sximo')['cnf_logo'])}}" alt="{{ config('sximo')['cnf_appname'] }}" width="40" />
              @else
              <img src="{{ asset('uploads/logo.png')}}" alt="{{ config('sximo')['cnf_appname'] }}"  width="40" />
              @endif 
           </li>  
          <li  >
            <a href="javascript:;" code="menu-home" @if( $active !='user' && $active !='core'  && $active !='sximo') class="active" @endif ><i class="fa fa-home"></i>
            </a>
          </li>          
          <li>
            <a href="javascript:;"  code="menu-profile" @if( $active =='user') class="active" @endif>
              <i class="fa fa-user-circle"></i>
            </a>
          </li>
		  
		  
		  @if( strpos(session('mod'), 'A00') !== false)
		  <!-- Add Sinister Disease -->
		  <li>
            <a href="javascript:;"  code="menu-disease" @if( $active =='user') class="active" @endif>
              <i class="fa fa-medkit"></i>
			  
            </a>
          </li>
          <!-- Add Sinister Disease -->
		  @endif
		  
		  
		  
		  @if( strpos(session('mod'), 'A01') !== false)
		  <!-- Add Work Accident -->
		  <li>
            <a href="javascript:;"  code="menu-WorkAccident" @if( $active =='user') class="active" @endif>
              <i class="fa fa-wheelchair-alt"></i>
			  
            </a>
          </li>
          <!-- Add Work Accident -->
		  @endif
		  
		  
		 
		  @if( strpos(session('mod'), 'A02') !== false)
		   <!-- Add FRMF -->
		  <li>
            <a href="javascript:;"  code="menu-Foot" @if( $active =='user') class="active" @endif>
              <i class="fa fa-soccer-ball-o"></i>
			  
            </a>
          </li>
           <!-- Add FRMF -->
		  @endif
		  
		  @if( strpos(session('mod'), 'A05') !== false)
		   <!-- Add AUTO -->
		  <li>
            <a href="javascript:;"  code="menu-auto" @if( $active =='user') class="active" @endif>
              <i class="fa fa-car"></i>
			  
            </a>
          </li>
           <!-- Add AUTO -->
		  @endif
		  
		  @if( strpos(session('mod'), 'A04') !== false)
		   <!-- Add RD -->
		  <li>
            <a href="javascript:;"  code="menu-RD" @if( $active =='user') class="active" @endif>
              <i class="fa fa-exclamation-circle"></i>
			  
            </a>
          </li>
           <!-- Add RD -->
		  @endif
		  
		  @if( strpos(session('mod'), 'A06') !== false)
		   <!-- Add Maritime -->
		  <li>
            <a href="javascript:;"  code="menu-FM" @if( $active =='user') class="active" @endif>
              <i class="fa fa-ship"></i>
			  
            </a>
          </li>
           <!-- Add Maritime -->
		  @endif
		 
		  
		  
		  @if( strpos(session('mod'), 'X99') !== false)
		  <!-- Add Finassure -->
		  <li>
            <a href="javascript:;"  code="menu-finassure" @if( $active !='user' && $active !='core'  && $active !='sximo') class="active" @endif>
              <i class="fa fa-empire"></i>
			  
            </a>
          </li>
          <!-- Add Finassure -->
		  @endif
		  
		  @if( strpos(session('mod'), 'M00') !== false)
		  <!-- AMCI - DIM -->
		  <li>
            <a href="javascript:;"  code="menu-amci-dim"@if( $active =='user') class="active" @endif>
              <i class="fa fa-medkit"></i>
			  
            </a>
          </li>
          <!-- AMCI - DIM -->
		  @endif
		  
		  @if( strpos(session('mod'), 'M01') !== false)
		  <!-- AMCI - ASSISTANCE -->
		  <li>
            <a href="javascript:;"  code="menu-amci-assis" @if( $active =='user') class="active" @endif>
              <i class="fa fa-ravelry"></i>
			  
            </a>
          </li>
          <!-- AMCI - ASSISTANCE -->
		  @endif
		  
		  @if( strpos(session('mod'), 'C00') !== false)
		  <!-- CENTRE RELATION CLIENT -->
		  <li>
            <a href="javascript:;"  code="menu-claims" @if( $active =='user') class="active" @endif>
              <i class="fa fa-life-ring"></i>
			  
            </a>
          </li>
          <!-- CENTRE RELATION CLIENT -->
		  @endif
		  
		  
          @if( session('gid') =='1' || session('gid') =='1' )
          <li > <a href="javascript:;" code="menu-admin" @if( $active =='core') class="active" @endif ><i class="fa fa-bars"></i></a></li>
            @if( session('gid') =='1' )
            <li > <a href="javascript:;" code="menu-app"  @if( $active =='sximo') class="active" @endif><i class="fa fa-th"></i></a></li>
            @endif
          @endif
          <!--<li class="bottom logout" style="margin-bottom: 50px;"> 
            <a href="{{ url('notification') }}"  code="menu-home"  >
              <span class="badge badge-pill badge-danger countNotif">0</span>
              <i class="fa fa-bell"></i>
          </a></li>-->
          <li  class="bottom logout"><a href="{{ url('user/logout')}}"class="confirmLogout" ><i class="fa fa-power-off"></i></a></li>
      </ul>    
    </div>


  <nav id="sidebar" class="sidebar sidebar-bg" >  
    <div class="sidebar-content ">
     
        <div class="sidebar-header">
          <a href="{{ url('/') }}">                   
           {{ config('sximo.cnf_appname') }} </a>
          <a href="javascript:;" class="toggleMenu" ><i class="fa fa-times"></i></a>
         
        </div>
        <div class="sidebar-menu" id="menu-profile" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <a href="{{ url('user/profile') }}">
                      {!! SiteHelpers::avatar( 48 ) !!}
                  </a>
                  <p>
                  <b> Bienvenue </b> <br />
                  {{ session('fid')}}</p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
                   <li class="header-menu"><span > Profil  </span></li>
                  <li><a href="{{ url('user/profile')}}"> Modifier votre profil  </a> </li>
                  <!--<li><a href="{{ url('user/theme?t=sidebar')}}" onclick="SximoModal(this.href,'Sidebar Color');return false"> Change Sidebar Color </a> </li>
                  <li><a href="{{ url('user/theme?t=header')}}" onclick="SximoModal(this.href,'Header Color');return false"> Change Header Color </a> </li>-->
                  

              </ul>   
              </div>   

        </div>

		<!-- Finassure -->
		
        <div class="sidebar-menu" id="menu-finassure" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> États connectés </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			     <li class="header-menu"><span > Liste des états  </span></li>        
                @if( strpos(session('mod'), 'X90') !== false)
				<li ><a href="{{ url('actsinisters')}}"><i class="fa fa-wheelchair-alt"></i>  @lang('core.m_actsinisters') <br /></a> </li>
				@endif
				
				@if( strpos(session('mod'), 'X91') !== false)
				<li ><a href="{{ url('dsinisters')}}"><i class="fa fa-hospital-o"></i>  @lang('core.m_dsinisters') <br /></a> </li>
				@endif
				
				@if( strpos(session('mod'), 'X93') !== false)
				<li ><a href="{{ url('inability')}}"><i class="fa fa-hospital-o"></i>  @lang('core.m_inability') <br /></a> </li>
				@endif
				
				@if( strpos(session('mod'), 'X94') !== false)
				<li ><a href="{{ url('death')}}"><i class="fa fa-hospital-o"></i>  @lang('core.m_death') <br /></a> </li>
				@endif
				
				@if( strpos(session('mod'), 'X92') !== false)
				<li ><a href="{{ url('autosinisters')}}"><i class="fa fa-car"></i>  @lang('core.m_autosinisters') <br /></a> </li>
				@endif
				
				@if( strpos(session('mod'), 'X95') !== false)
				<li ><a href="{{ url('rdsinisters')}}"><i class="fa fa-bars"></i>  @lang('core.m_rdsinisters') <br /></a> </li>
				@endif
				
				@if( strpos(session('mod'), 'X96') !== false)
				<li ><a href="{{ url('fmsinisters')}}"><i class="fa fa-bars"></i>  @lang('core.m_fmsinisters') <br /></a> </li>
				@endif
				
				
			 </ul>   
            </div>   

        </div>

		<!-- Disease Sinister -->
        <div class="sidebar-menu" id="menu-disease" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> Sinistres maladies </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion </span></li>        
				<li ><a href="{{ url('illness')}}"><i class="fa fa-hospital-o"></i>  @lang('core.m_illness') <br /></a> </li>
				<li ><a href="{{ url('inability')}}"><i class="fa fa-hospital-o"></i>  @lang('core.m_inability') <br /></a> </li>
				<li ><a href="{{ url('death')}}"><i class="fa fa-hospital-o"></i>  @lang('core.m_death') <br /></a> </li>
				
				
				@if( strpos(session('mod'), 'R00') !== false)
				
				<li class="header-menu"><span > Réseau médical </span></li> 
				<li ><a href="{{ url('medicalnetwork')}}"><i class="fa fa-stethoscope"></i>  @lang('core.m_medicalnetwork') <br /></a> </li>
				<li ><a href="{{ url('contractedmedicalnetwork')}}"><i class="fa fa-stethoscope"></i>  @lang('core.m_contractedmedicalnetwork') <br /></a> </li>
				<li ><a href="{{ url('medicalnetworklist')}}"><i class="fa fa-stethoscope"></i>  @lang('core.m_medicallist') <br /></a> </li>
				
				<li class="header-menu"><span > Reporting </span></li> 
				<li ><a href="{{ url('reportdim')}}"><i class="fa fa-bar-chart"></i>  @lang('core.m_reportdim') <br /></a> </li>
				<li ><a href="{{ url('reportdimnature')}}"><i class="fa fa-bar-chart"></i>  @lang('core.m_reportdimnature') <br /></a> </li>
				@endif
				
				<!--<li ><a href="{{ url('subaccounts')}}">  @lang('core.m_subaccounts') <br /></a> </li> 
				<li ><a href="{{ url('departments')}}">  @lang('core.m_departments') <br /></a> </li>
				<li ><a href="{{ url('core/users')}}">  @lang('core.m_users') <br /></a> </li>-->  				
              </ul>   
              </div>   

        </div>	

		<!-- Work Accident -->
        <div class="sidebar-menu" id="menu-WorkAccident" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> Accidents de travail </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion  </span>      
				<li ><a href="{{ url('workplaceaccidents')}}"><i class="fa fa-wheelchair"></i>  @lang('core.m_workplaceaccidents') <br /></a> </li>
				<!--<li ><a href="{{ url('subaccounts')}}">  @lang('core.m_subaccounts') <br /></a> </li> 
				<li ><a href="{{ url('departments')}}">  @lang('core.m_departments') <br /></a> </li>
				<li ><a href="{{ url('core/users')}}">  @lang('core.m_users') <br /></a> </li>-->  				
              </ul>   
              </div>   

        </div>	
        
        <!-- FM -->
        <div class="sidebar-menu" id="menu-FM" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> Facultés Maritimes </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion  </span>      
				<li ><a href="{{ url('msinisters')}}"><i class="fa fa-ship"></i>  @lang('core.m_msinisters') <br /></a> </li> 
              </ul>   
              </div>   

        </div>	

		<!-- AUTO -->
        <div class="sidebar-menu" id="menu-auto" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> Automobile </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion  </span>      
				<li ><a href="{{ url('autosinisters')}}"><i class="fa fa-car"></i>  @lang('core.m_autosinisters') <br /></a> </li> 
				<!--<li ><a href="{{ url('subaccounts')}}">  @lang('core.m_subaccounts') <br /></a> </li> 
				<li ><a href="{{ url('departments')}}">  @lang('core.m_departments') <br /></a> </li>
				<li ><a href="{{ url('core/users')}}">  @lang('core.m_users') <br /></a> </li>-->  				
              </ul>   
              </div>   

        </div>	
        
        <!-- RD -->
        <div class="sidebar-menu" id="menu-RD" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> Risques Divers </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion  </span>      
				<li ><a href="{{ url('rsinisters')}}"><i class="fa fa-asterik"></i>  @lang('core.m_rsinisters') <br /></a> </li> 
              </ul>   
              </div>   

        </div>	
        
        <!-- AMCI - DIM -->
        <div class="sidebar-menu" id="menu-amci-dim" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> MALADIE </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion des sinistres  </span>      
				<li ><a href="{{ url('illness')}}"><i class="fa fa-hospital-o"></i>  @lang('core.m_illness') <br /></a> </li>
				<li class="header-menu"><span > Téléchargements  </span>
				<li ><a href="{{ url('amcidimdowloads')}}"><i class="fa fa-download"></i>  @lang('core.amci_dimdownloads') <br /></a> </li>
              </ul>   
              </div>   

        </div>
        
        <!-- AMCI - ASSISTANCE -->
        <div class="sidebar-menu" id="menu-amci-assis" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> ASSISTANCE </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion des sinistres </span>      
				<li ><a href="{{ url('assistance')}}"><i class="fa fa-life-ring"></i>  @lang('core.m_assistance') <br /></a> </li> 
				<li class="header-menu"><span > Téléchargements </span>  
				<li ><a href="{{ url('amciassisdownloads')}}"><i class="fa fa-download"></i>  @lang('core.amci_assisdownloads') <br /></a> </li>
              </ul>   
              </div>   

        </div>
        
        <!-- CENTRE RELATION CLIENT -->
        <div class="sidebar-menu" id="menu-claims" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> RELATION CLIENT </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
			    <li class="header-menu"><span > Gestion des réclamations </span>      
				<li ><a href="{{ url('claims')}}"><i class="fa fa-life-ring"></i>  @lang('core.m_claims') <br /></a> </li> 
				<li class="header-menu"><span > Téléchargements </span>  
				<li ><a href="{{ url('medicalproviders')}}"><i class="fa fa-download"></i>  Prestataires WAFA <br /></a> </li>
				<li ><a href="{{ url('finassurenetwork')}}"><i class="fa fa-download"></i>  Réseau Finassure <br /></a> </li>
              </ul>   
              </div>   

        </div>

		<!-- Foot -->
        <div class="sidebar-menu" id="menu-Foot" >
              <div class="sidebar-profile">
              
                <div class="user-pic">
                  <p>
                  <b> Gestion des adhérents </b></p>
                </div>  
              </div>  
             
             <div class="p-3">

             <ul >
				<li class="header-menu"><span > Gestion  </span></li>      
				<li ><a href="{{ url('adherents')}}">  @lang('core.m_adherents') <br /></a> </li>
                <li ><a href="{{ url('medicalnetwork')}}">  @lang('core.m_medicalnetwork') <br /></a> </li>
                <!--<li ><a href="{{ url('importadherents')}}">  @lang('core.m_importadherents') <br /></a> </li>-->
				
			    <li class="header-menu"><span > Référentiels  </span></li>      
				<li ><a href="{{ url('ligues')}}">  @lang('core.m_ligues') <br /></a> </li> 
				<li ><a href="{{ url('naturesubligue')}}">  @lang('core.m_naturesubligue') <br /></a> </li>
				<li ><a href="{{ url('subligues')}}">  @lang('core.m_subligues') <br /></a> </li>
				<li ><a href="{{ url('categories')}}">  @lang('core.m_categories') <br /></a> </li>
				<li ><a href="{{ url('functions')}}">  @lang('core.m_functions') <br /></a> </li> 
				<li ><a href="{{ url('identities')}}">  @lang('core.m_identities') <br /></a> </li>	
				<li ><a href="{{ url('qualifications')}}">  @lang('core.m_qualifications') <br /></a> </li>		
				<li ><a href="{{ url('status')}}">  @lang('core.m_status') <br /></a> </li>
                <li ><a href="{{ url('cities')}}">  @lang('core.m_cities') <br /></a> </li>                 
				<!--<li ><a href="{{ url('subaccounts')}}">  @lang('core.m_subaccounts') <br /></a> </li> 
				<li ><a href="{{ url('departments')}}">  @lang('core.m_departments') <br /></a> </li>
				<li ><a href="{{ url('core/users')}}">  @lang('core.m_users') <br /></a> </li>-->			
              </ul>   
              </div>   

        </div>		
     

 
            <div class="sidebar-menu" id="menu-app" >
              <div class="p-3">
                <ul >
                  <li class="header-menu"><span > Applications  </span></li>
                  
                  <li><a href="{{ url('') }}/sximo/config"><i class="fa fa-sliders"></i> @lang('core.t_generalsetting') </a> </li> 
                  <li class="header-menu"><span > Builder / Generator  </span></li>
                  <li><a href="{{ url('sximo/module')}}"><i class="fa fa-free-code-camp"></i> @lang('core.m_codebuilder')  </a> </li>
                  <li><a href="{{ url('sximo/rac')}}"><i class="fa fa-random"></i> RestAPI Generator </a> </li> 
                  <li><a href="{{ url('sximo/tables')}}"><i class="fa fa-database"></i> @lang('core.m_database') </a> </li>
                  <li><a href="{{ url('sximo/form')}}"><i class="fa fa-th-list"></i> @lang('core.m_formbuilder') </a> </li>
                  <li class="header-menu"><span > utility  </span></li>
                  
                  <li><a href="{{ url('sximo/menu')}}"><i class="fa fa-bars"></i>  @lang('core.m_menu')</a> </li>              
                  <li> <a href="{{ url('sximo/code')}}"><i class="fa fa-code"></i> @lang('core.m_sourceeditor') </a>  </li>
                  
                  
                  <li> <a href="{{ url('sximo/config/clearlog')}}" class="clearCache"><i class="fa fa-refresh"></i> @lang('core.m_clearcache')</a> </li>

                </ul>
              </div>
            </div>

            <div class="sidebar-menu" id="menu-admin" >
              <div class="p-3">
                <ul >
                  <li class="header-menu"><span > Users and Activities  </span></li>
                    <li ><a href="{{ url('core/users')}}"><i class="fa fa-user-circle"></i>  @lang('core.m_users') <br /></a> </li> 
                    <li ><a href="{{ url('core/groups')}}"><i class="fa fa-user-circle-o"></i>  @lang('core.m_groups') </a> </li>
                    <li><a href="{{ url('core/users/blast')}}"><i class="fa fa-envelope"></i>  @lang('core.m_blastemail') </a></li> 
                    <li><a href="{{ url('core/elfinder')}}"><i class="fa fa-picture-o"></i> Files &  Media </a> </li>
                    <li> <a href="{{ url('core/logs')}}"><i class="fa fa-bookmark-o"></i> @lang('core.m_logs') </a>  </li>
                    <li class="header-menu"><span > Page & Blogs  </span></li>
                    <li><a href="{{ url('core/pages')}}"><i class="fa fa-file-o"></i>   @lang('core.m_pagecms')  </a></li>
                    <li ><a href="{{ url('core/posts')}}"><i class="fa fa-copy"></i>  @lang('core.m_post')</a></li>
                  </ul>
              </div>      

            </div>
            
            <div class="sidebar-menu" id="menu-home">
              <div class="sidebar-profile">
              
                <div class="user-pic">
                @if(file_exists(public_path().'/uploads/images/'.config('sximo')['cnf_logo']) && config('sximo')['cnf_logo'] !='')
                <img src="{{ asset('uploads/images/'.config('sximo')['cnf_logo'])}}" alt="{{ config('sximo')['cnf_appname'] }}" width="80" />
                @else
                <img src="{{ asset('uploads/logo.png')}}" alt="{{ config('sximo')['cnf_appname'] }}"  width="80" />
                @endif 
                </div>  
              </div>  

            <ul > 
                <li class="header-menu"><span > Menu principal </span></li>
                <li> <a href="{{ url('dashboard') }}" ><span class="iconic">  <i class="fa fa-home"></i></span> Tableau de bord</a></li>

        @foreach ($sidebar as $menu)   

            @if($menu['module'] =='separator')
              <li class="header-menu"> <span> {{$menu['menu_name']}} </span></li>  

            @else

                  @if(count($menu['childs']) > 0 ) 
                       <li class="sidebar-dropdown">
                  @else 
                       <li> 
                  @endif

                <a 

                    @if(count($menu['childs']) > 0 ) 
                        href="javascript:void(0);" 
                    @elseif($menu['menu_type'] =='external')
                        href="{{ $menu['url'] }}" 
                    @else
                        href="{{ url($menu['module'])}}" 
                    @endif         
                    @if(Request::segment(1) == $menu['module']) class="active" @endif
                    >    
                    <span class="iconic"> <i class="{{$menu['menu_icons']}}"></i> </span>                                         
                          {{ (isset($menu['menu_lang']['title'][session('lang')]) ? $menu['menu_lang']['title'][session('lang')] : $menu['menu_name']) }}
                     
                        
                  </a> 

                  @if(count($menu['childs']) > 0 ) 
                    <div class="sidebar-submenu " >
                        <ul>
                            @foreach ($menu['childs'] as $menu2)
                            <li>
                                <a 
                                    @if(count($menu2['childs']) > 0 ) 
                                        href="javascript:void(0);" 
                                    @elseif($menu2['menu_type'] =='external')
                                        href="{{ $menu2['url'] }}" 
                                    @else
                                        href="{{ url($menu2['module'])}}" 
                                    @endif  

                                    @if(Request::segment(1) == $menu2['module']) class="active" @endif       
                                >
                                 <span>
                                    {{ (isset($menu2['menu_lang']['title'][session('lang')]) ? $menu2['menu_lang']['title'][session('lang')] : $menu2['menu_name']) }}
                                </span>
                                </a> 

                                @if(count($menu2['childs']) > 0 ) 
                                    <div class="sidebar-submenu " >
                                        <ul>
                                            @foreach ($menu2['childs'] as $menu3)
                                            <li>
                                                <a 
                                                    @if(count($menu3['childs']) > 0 ) 
                                                        href="javascript:void(0);" 
                                                    @elseif($menu3['menu_type'] =='external')
                                                        href="{{ $menu3['url'] }}" 
                                                    @else
                                                        href="{{ url($menu3['module'])}}" 
                                                    @endif  

                                                    @if(Request::segment(1) == $menu3['module']) class="active" @endif       
                                                >
                                                 <span>
                                                    {{ (isset($menu3['menu_lang']['title'][session('lang')]) ? $menu3['menu_lang']['title'][session('lang')] : $menu3['menu_name']) }}
                                                </span>
                                                </a> 
                                            </li>

                                            @endforeach

                                        </ul>
                                    </div>
                                @endif

                            </li>

                            @endforeach

                        </ul>
                    </div>
                  @endif


            </li>       
            @endif

           
        @endforeach
            
          </div>
      

    </div>

  
  </nav>  
</div>   
<script type="text/javascript">
$(document).ready(function(){
    $('.sidebar-menu').hide();

    <?php if($active =='sximo') { ?> 
      $('#menu-app').show(); 
    <?php } else if ($active =='user') { ?> 
      $('#menu-profile').show();
    <?php } else if ($active =='core') { ?> 
      $('#menu-admin').show(); 
    <?php } else { ?>
        $('#menu-home').show(); 
    <?php } ?>


    $('.sidebar-compact ul li a ').mouseover(function(){                 
        $('.sidebar-compact ul li a').removeClass('active')
        $(this).addClass('active') 
        $('.sidebar-menu').hide();
        var id = $(this).attr('code');
        $('#'+id).show(); 
    }).mouseout(function() {
       
    })

    $('.sidebar-submenu  ul li a.active').closest('li.sidebar-dropdown').addClass('active')

     $('li.sidebar-dropdown a').click(function(){
            
            $('li.sidebar-dropdown').removeClass('active')
            $(this).parent().addClass('active')

        })

  $('.confirmLogout').click(function() {
      Swal.fire({
        title: 'Se déconnecter ?',
        text: ' Merci de confirmer en cliquant sur oui ',
        type: 'warning',
        showCancelButton: true,
        confirmButtonText: 'Oui',
        cancelButtonText: 'Annuler'
      }).then((result) => {
        if (result.value) {

          var url = $(this).attr('href');
          window.location.href = url;
          
        }
      })

      return false;

  })  
})

</script>

<script type="text/javascript">
    $(document).ready(function(){
       
    })
</script>