<aside class="page-sidebar">
    <div class="page-logo">
        <a href="#" class="page-logo-link press-scale-down d-flex align-items-center position-relative" data-toggle="modal" data-target="#modal-shortcut">
            <img src="assets/img/logo.png" alt="SmartAdmin for PHP" aria-roledescription="logo">
            <span class="page-logo-text mr-1">Gam Webtech Admin</span>
            <span class="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
            <i class="fal fa-angle-down d-inline-block ml-1 fs-lg color-primary-300"></i>
        </a>
    </div>
    <!-- BEGIN PRIMARY NAVIGATION -->
    <nav id="js-primary-nav" class="primary-nav" role="navigation">
        <div class="nav-filter">
            <div class="position-relative">
                <input type="text" id="nav_filter_input" placeholder="Filter menu" class="form-control" tabindex="0">
                <a href="#" onclick="return false;" class="btn-primary btn-search-close js-waves-off" data-action="toggle" data-class="list-filter-active" data-target=".page-sidebar">
                    <i class="fal fa-chevron-up"></i>
                </a>
            </div>
        </div>
        <div class="info-card">
            <img src="pictures/<?php echo $_SESSION['employee_picture'] ?>" class="dp profile-image rounded-circle" alt="Dr. Codex Lantern">
            <div class="info-card-text">
                <a href="#" class="d-flex align-items-center text-white">
                    <span class="text-truncate text-truncate-sm d-inline-block employee-name">
                        <?php echo $_SESSION['employee_name'] ?>
                    </span>
                </a>
                <span class="d-inline-block text-truncate text-truncate-sm"><?php echo $_SESSION['role_name'] ?></span>
            </div>
            <img src="assets/img/card-backgrounds/cover-4-lg.png" class="cover" alt="cover">
            <a href="#" onclick="return false;" class="pull-trigger-btn" data-action="toggle" data-class="list-filter-active" data-target=".page-sidebar" data-focus="nav_filter_input">
                <i class="fal fa-angle-down"></i>
            </a>
        </div>
        
            <ul class="nav-menu" id="js-nav-menu">
            <!-- `   <li>
					<a href="profile.php" title="Profile"  class=" " data-filter-tags="profile">
                        <i class="fal fa-user"></i>
						<span class="nav-link-text" data-i18n="nav.Profile">Profile</span>
					</a>
					
				
                </li> -->
                <?php if($system_groups):?>
                    <?php foreach($system_groups as $group): ?>
                        <?php if($group['system_group_name']=="Extended"): ?>
                            
                            <li>
                    
                                <a href="#" title="Application Intel"  class="" data-filter-tags="application intel">
                                    <i class="<?php echo $group['system_group_icon'] ?>"></i>
                                    <span class="nav-link-text" data-i18n="nav.application_intel"><?php echo $group['system_group_name'] ?></span>
                                </a>
                                <ul>
                                    <?php if($user_ex_lim_details): ?>
                                        <?php foreach($user_ex_lim_details as $ex): ?>
                                            <?php if($ex['state']=="Extend"): ?>
                                                <?php $get_class = array_map('trim', explode('.', $ex['action_link']));?>
                                                <?php
                                                if($ex['hidden']=="Yes"){
                                                    $hidden = "d-none";
                                                }else{
                                                    $hidden = "";
                                                }
                                                ?>
                                            <li class="<?php echo $get_class[0]; echo ' '.$hidden ?>">
                                            
                                                <a href="<?php echo $ex['action_link'] ?>" title="<?php echo $ex['display_name'] ?>"  class=" " data-filter-tags="application intel analytics dashboard">
                                                    
                                                    <span class="nav-link-text" data-i18n="nav.application_intel_analytics_dashboard"><?php echo $ex['display_name'] ?></span>
                                                </a>
                                            
                                        
                                            </li>
                                            <?php endif ?>
                                        <?php endforeach ?>
                                    <?php endif ?>
                                </ul>

                            </li>
                                <?php else: ?>
                            <li>
                    
                                <a href="#" title="Application Intel"  class=" " data-filter-tags="application intel">
                                    <i class="<?php echo $group['system_group_icon'] ?>"></i>
                                    <span class="nav-link-text" data-i18n="nav.application_intel"><?php echo $group['system_group_name'] ?></span>
                                </a>
                                
                                    <ul>
                            <?php $user_role_permissions = $role_permission->read_user_role_permission($_SESSION['role_id'],$group['system_group_id']); ?>           
                            <?php if($user_role_permissions): ?>
                                <?php foreach($user_role_permissions as $perm): ?>
                                    <?php $get_class = array_map('trim', explode('.', $perm['action_link']));?>
                                        <?php
                                            if($perm['hidden']=="Yes"){
                                                $hidden = "d-none";
                                            }else{
                                                $hidden = "";
                                            }
                                        ?>
                                        <li class="<?php echo $get_class[0]; echo ' '.$hidden?>">
                                            
                                            <a href="<?php echo $perm['action_link'] ?>" title="<?php echo $perm['display_name'] ?>"  class=" " data-filter-tags="application intel analytics dashboard">
                                                
                                                <span class="nav-link-text" data-i18n="nav.application_intel_analytics_dashboard"><?php echo $perm['display_name'] ?></span>
                                            </a>
                                            
                                        
                                        </li>
                                        
                            
                                <?php endforeach?>
                            <?php endif?>
                                </ul>

                            </li>
                        <?php endif ?>
                
                <?php endforeach?>
            <?php endif?>
                
            </ul>
                <!-- <div class="filter-message js-filter-message bg-success-600"></div> -->
    </nav>
    
</aside>