<!-- begin:: Header -->
<div id="kt_header" class="kt-header kt-grid__item  kt-header--fixed " data-ktheader-minimize="on">
    <div class="kt-header__top">
        <div class="kt-container  kt-container--fluid ">

            <!-- begin:: Brand -->
            <div class="kt-header__brand   kt-grid__item" id="kt_header_brand">
                <div class="kt-header__brand-logo">
                     <?php
                $user_type = session()->get('user_type');
                if(isset($user_type) && $user_type!=''){
                ?>
                <a href="<?= base_url('admin/dashboard'); ?>">
                        <img alt="Logo" src="<?= base_url('assets/media/logos/logo-up.png'); ?>" class="kt-header__brand-logo-default" />
                        <img alt="Logo" src="<?= base_url('assets/media/logos/logo-up.png'); ?>" class="kt-header__brand-logo-sticky" />
                    </a>

               <?php }else{ ?>
                <a href="<?= base_url(); ?>">
                        <img alt="Logo" src="<?= base_url('assets/media/logos/logo.png'); ?>" class="kt-header__brand-logo-default" />
                        <img alt="Logo" src="<?= base_url('assets/media/logos/logo.png'); ?>" class="kt-header__brand-logo-sticky" />
                    </a>
            <?php } ?>
                    
                </div>
            </div>

            <!-- end:: Brand -->

            <!-- begin:: Header Topbar -->
            <div class="kt-header__topbar">

                <!--end: Language bar -->

                <!--begin: User bar -->
                <div class="kt-header__topbar-item kt-header__topbar-item--user">
                    <div class="kt-header__topbar-wrapper" data-toggle="dropdown" data-offset="0px,10px">
                        <span class="kt-header__topbar-welcome kt-visible-desktop">Hi,</span>
                        <span class="kt-header__topbar-username kt-visible-desktop"><?= ucfirst(session()->get('name')); ?></span>
                        <img alt="Pic" src="assets/media/users/default.jpg" />
                        <span class="kt-header__topbar-icon kt-bg-brand kt-font-lg kt-font-bold kt-font-light kt-hidden">S</span>
                        <span class="kt-header__topbar-icon kt-hidden"><i class="flaticon2-user-outline-symbol"></i></span>
                    </div>
                    <div class="dropdown-menu dropdown-menu-fit dropdown-menu-right dropdown-menu-anim dropdown-menu-xl">

                        <!--begin: Head -->
                        <div class="kt-user-card kt-user-card--skin-light kt-notification-item-padding-x">
                            <div class="kt-user-card__avatar">
                                <img class="kt-hidden-" alt="Pic" src="assets/media/users/default.jpg" />

                                <!--use below badge element instead the user avatar to display username's first letter(remove kt-hidden class to display it) -->
                                <span class="kt-badge kt-badge--username kt-badge--unified-success kt-badge--lg kt-badge--rounded kt-badge--bold kt-hidden">S</span>
                            </div>
                            <div class="kt-user-card__name">
                               <?= ucfirst(session()->get('name')); ?>
                            </div>                           
                        </div>

                        <!--end: Head -->

                        <!--begin: Navigation -->
                        <div class="kt-notification">
                            <a href="<?= base_url('admin/change_password'); ?>" class="kt-notification__item">
                                <div class="kt-notification__item-icon">
                                    <i class="flaticon2-calendar-3 kt-font-success"></i>
                                </div>
                                <div class="kt-notification__item-details">
                                    <div class="kt-notification__item-title kt-font-bold">
                                        Change Password
                                    </div>                                          
                                </div>
                            </a>                                                
                            <div class="kt-notification__custom kt-space-between">
                                <a href="<?= base_url('login/logout'); ?>" class="btn btn-label btn-label-brand btn-sm btn-bold">Sign Out</a>

                            </div>
                        </div>

                        <!--end: Navigation -->
                    </div>
                </div>

                <!--end: User bar -->

                <!--begin: Quick panel toggler -->
                <div class="kt-header__topbar-item" data-toggle="kt-tooltip" title="Quick panel" data-placement="top">
                    <div class="kt-header__topbar-wrapper">
                        <span class="kt-header__topbar-icon" id="kt_quick_panel_toggler_btn"><i class="flaticon-squares"></i></span>
                    </div>
                </div>

                <!--end: Quick panel toggler -->
            </div>

            <!-- end:: Header Topbar -->
        </div>
    </div>
    <div class="kt-header__bottom">
        <div class="kt-container  kt-container--fluid ">

            <!-- begin: Header Menu -->
            <button class="kt-header-menu-wrapper-close" id="kt_header_menu_mobile_close_btn"><i class="la la-close"></i></button>
            <div class="kt-header-menu-wrapper" id="kt_header_menu_wrapper">
                <div id="kt_header_menu" class="kt-header-menu kt-header-menu-mobile ">
                    <ul class="kt-menu__nav ">
                        <li class="kt-menu__item kt-menu__item--submenu kt-menu__item--rel  <?= ($active=='dashboard' ?'kt-menu__item--open kt-menu__item--here':''); ?>" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('admin/dashboard'); ?>" class="kt-menu__link"><span class="kt-menu__link-text">Home</span></a>                           
                        </li>
                        <?php $user_type = session()->get('user_type'); 
                            if($user_type==1 || $user_type=='2'){ 
                                
                            ?> 
                        <li class="kt-menu__item  kt-menu__item--submenu kt-menu__item--rel <?= ($active=='reports' ?'kt-menu__item--open kt-menu__item--here':''); ?>" data-ktmenu-submenu-toggle="click" aria-haspopup="true"><a href="javascript:;" class="kt-menu__link kt-menu__toggle"><span class="kt-menu__link-text">Reports</span><i class="kt-menu__hor-arrow la la-angle-down"></i><i class="kt-menu__ver-arrow la la-angle-right"></i></a>
                            <div class="kt-menu__submenu kt-menu__submenu--classic kt-menu__submenu--left">
                                <ul class="kt-menu__subnav">                                    
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('reports/activity-report'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Activity Report</span></a>                                        
                                    </li>
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('reports/sales-report'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Sales Report</span></a>                                        
                                    </li>
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('reports/conversion-report'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Conversion Analysis</span></a>                                        
                                    </li>
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('reports/lead-source-report'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Leads Distribution Analysis</span></a>                                        
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('reports/lead-summary'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Source Wise Summary</span></a>                                        
                                    </li>
                                   <!-- <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('reports/task_report'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Task List Analysis Report</span></a>                                        
                                    </li>  -->                                  
                                </ul>
                            </div> 
                        </li>
                        
                        <li class="kt-menu__item  kt-menu__item--submenu kt-menu__item--rel <?= ($active=='users'?'kt-menu__item--open kt-menu__item--here':''); ?>" data-ktmenu-submenu-toggle="click" aria-haspopup="true"><a href="javascript:;" class="kt-menu__link kt-menu__toggle"><span class="kt-menu__link-text">Users</span><i class="kt-menu__hor-arrow la la-angle-down"></i><i class="kt-menu__ver-arrow la la-angle-right"></i></a>
                            <div class="kt-menu__submenu kt-menu__submenu--classic kt-menu__submenu--left">
                                <ul class="kt-menu__subnav">
                                    <?php if($user_type==1) { ?>
                                   <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('admin/add_center'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Add Users</span></a>                                        
                                    </li>
                                <?php } ?>
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('admin/view_centers'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">View Users</span></a>                                        
                                    </li>
                                </ul>
                            </div>
                        </li>
                         <?php } ?> 
                        <li class="kt-menu__item  kt-menu__item--submenu kt-menu__item--rel <?= ($active=='lead' ?'kt-menu__item--open kt-menu__item--here':''); ?>" data-ktmenu-submenu-toggle="click" aria-haspopup="true"><a href="javascript:;" class="kt-menu__link kt-menu__toggle"><span class="kt-menu__link-text">Leads</span><i class="kt-menu__hor-arrow la la-angle-down"></i><i class="kt-menu__ver-arrow la la-angle-right"></i></a>
                            <div class="kt-menu__submenu kt-menu__submenu--classic kt-menu__submenu--left">
                                <ul class="kt-menu__subnav">                                  
                                   <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('leads/add_lead'); ?>" class="kt-menu__link"><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text"> Add Lead</span></a>                                        
                                    </li>
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('leads/view_leads'); ?>" class="kt-menu__link"><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text"> View Leads</span></a>                                        
                                    </li>
                                     <?php  if($user_type==1){ ?>
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('leads/manage_leads'); ?>" class="kt-menu__link"><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text"> Manage Leads</span></a>                                        
                                    </li>
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('leads/upload_leads'); ?>" class="kt-menu__link"><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text"> Upload Leads</span></a>                                        
                                    </li>                                      
                                   <?php } ?>
                                </ul>
                            </div>
                        </li>                        
                        <?php  if($user_type==1){ ?>
                          <li class="kt-menu__item  kt-menu__item--submenu kt-menu__item--rel  <?= ($active=='courses' ?'kt-menu__item--open kt-menu__item--here':''); ?>" data-ktmenu-submenu-toggle="click" aria-haspopup="true"><a href="javascript:;" class="kt-menu__link kt-menu__toggle"><span class="kt-menu__link-text">Courses</span><i class="kt-menu__hor-arrow la la-angle-down"></i><i class="kt-menu__ver-arrow la la-angle-right"></i></a>
                            <div class="kt-menu__submenu kt-menu__submenu--classic kt-menu__submenu--left">
                                <ul class="kt-menu__subnav">                                  
                                   <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('admin/add_course'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Add Course</span></a> </li>                                    
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('admin/view_courses'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">View Course</span></a>                                        
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <?php /*?>
                        <li class="kt-menu__item  kt-menu__item--submenu kt-menu__item--rel  <?= ($active=='sub_course' ?'kt-menu__item--open kt-menu__item--here':''); ?>" data-ktmenu-submenu-toggle="click" aria-haspopup="true"><a href="javascript:;" class="kt-menu__link kt-menu__toggle"><span class="kt-menu__link-text">Sub Course</span><i class="kt-menu__hor-arrow la la-angle-down"></i><i class="kt-menu__ver-arrow la la-angle-right"></i></a>
                            <div class="kt-menu__submenu kt-menu__submenu--classic kt-menu__submenu--left">
                                <ul class="kt-menu__subnav">                                  
                                   <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('admin/add_sub_course'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">Add SubCourse</span></a>                                        
                                    </li>                                    
                                    <li class="kt-menu__item  kt-menu__item--submenu" data-ktmenu-submenu-toggle="hover" aria-haspopup="true"><a href="<?= base_url('admin/view_sub_courses'); ?>" class="kt-menu__link "><i class="kt-menu__link-bullet kt-menu__link-bullet--dot"><span></span></i><span class="kt-menu__link-text">View SubCourse</span></a>                                        
                                    </li>
                                </ul>
                            </div>
                        </li>
                    <?php */ } ?>
                    </ul>
                </div>
            </div>

            <!-- end: Header Menu -->
        </div>
    </div>
</div>

<!-- end:: Header -->