<?php        
              $roll = $admin->type;
              $roll_id = $admin->id;
              
              
              $userList = $this->admin_common_model->get_where('users',['id'=>$roll_id]);

 if($userList[0]['image']!=''){
          $path = base_url("uploads/images/".$userList[0]['image']);
        }else{
          $path = base_url("assets/images/users/avatar-1.jpg");
        }
        
        

        
  $total_unseen_notifi = $this->db->query("SELECT COUNT(id) AS total_users FROM notification WHERE (seen_status = 'UNSEEN' AND (notification_type = 'Profile' OR  notification_type = 'Signup') )")->result_array();
  $total_unseen_notifi = $total_unseen_notifi[0]['total_users'];

?>
 <!-- Top Bar Start -->
            <div class="topbar">
                <!-- LOGO -->
                <div class="topbar-left">
                    <div class="text-center" style="background-color: #ffffff;">
                        <a href="<?=base_url('admin/view_page/dashboard');?>" class="logo"><img style="height: 72px;width: 72px;" src="<?=base_url('uploads');?>/images/logo.png"></a>
                    </div>
                </div>
                <!-- Button mobile view to collapse sidebar menu -->
                <div class="navbar navbar-default" role="navigation">
                    <div class="container">
                        <div class="">
                            <div class="pull-left">
                                <button type="button" class="button-menu-mobile open-left">
                                    <i class="fa fa-bars" style="
    background-color: white;
"></i>
                                </button>
                                <span class="clearfix"></span>
                            </div>
                    

                            <ul class="nav navbar-nav navbar-right pull-right">
                              
                                <li class="hidden-xs">
                                    <a href="#" id="btn-fullscreen" class="waves-effect waves-light"><i class="md md-crop-free"></i></a>
                                </li>
                               
                              
                               
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle profile" data-toggle="dropdown" aria-expanded="true"><img src="<?php echo $path;?>" alt="user-img" class="img-circle"> </a>
                                    <ul class="dropdown-menu">

                                        <li><a href="<?=base_url('admin/view_page/profile/'.$roll_id);?>"><i class="md md-face-unlock"></i> Profile</a></li>
                                        <li><a href="<?=base_url('admin/admin_logout');?>"><i class="md md-settings-power"></i> Logout</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </div>
                        <!--/.nav-collapse -->
                    </div>
                </div>
            </div>
            <!-- Top Bar End -->

 
                            
<?php
  $total_unseen_notifi = $this->db->query("SELECT COUNT(id) AS total_users FROM notification WHERE (seen_status = 'UNSEEN' AND (notification_type = 'Profile' OR  notification_type = 'Signup'))")->result_array();
  $total_unseen_notifi = $total_unseen_notifi[0]['total_users'];
?>
            <!-- ========== Left Sidebar Start ========== -->
<?php
 $roll = $admin->type;
              $roll_id = $admin->id;
              
              if($roll == 'ADMIN'){
?>
            <div class="left side-menu">
                <div class="sidebar-inner slimscrollleft">
                    
                    <!--- Divider -->
                    <div id="sidebar-menu">
                        <ul>
                            <li>
                                <a href="<?=base_url('admin/view_page/dashboard');?>" class="waves-effect active"><i class="md md-home"></i><span> Dashboard </span></a>
                            </li>

                         
                
                             
                          
                            
                            
                              <li class="has_sub <?php if($page=='user_list1' || $page=='add_user1' || $page=='userNoti_list' || $page=='starting_banner_list' || $page=='add_userNoti' || $page=='add_starting_banner'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-users"></i><span>  Sub Admin Details</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                               
                
                            <li class="<?php if($page=='user_list1'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/user_list1');?>">Sub Admin List</a></li>
                            <li class="<?php if($page=='add_user1'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_user1');?>">Add Sub Admin</a></li>


                                </ul>
                            </li>
                            
                            
                                <li class="has_sub <?php if($page=='banner_list' || $page=='add_banner' ){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-flag"></i><span>  Advertisement</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                               
                
                            <li class="<?php if($page=='banner_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/banner_list');?>">Advertisement List</a></li>
                            <li class="<?php if($page=='add_banner'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_banner');?>">Add Advertisement</a></li>


                                </ul>
                            </li>
                            
                            
                            
                 <li class="has_sub <?php if($page=='about_us' || $page=='termss' || $page=='privacy'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Setting </span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='about_us'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/about_us');?>">About us</a></li>
                                   <li class="<?php if($page=='termss'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/termss');?>">Terms conditions</a></li>
                                   <li class="<?php if($page=='privacy'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/privacy');?>">Privacy Policy</a></li>

                                </ul>
                            </li>
                            
                            <li class="has_sub <?php if($page=='plan_list' || $page=='add_plan'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Subcription Plan</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                <!--   <li class="<?php if($page=='plan_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/plan_list');?>">Subcription Plan List</a></li>
                                    <li class="<?php if($page=='add_plan'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_plan');?>">Add Subcription Plan</a></li>
                            -->        <li class="<?php if($page=='user_purcahse_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/user_purcahse_list');?>">Plan Purcahse History</a></li>

                              </ul>
                            </li>
                            
                            
                                <li class="has_sub">
                                <a href="#" class="waves-effect"><i class="fa fa-money"></i><span>Coupon Details</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='couponList'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/couponList');?>">Coupons</a></li>
                                    <li class="<?php if($page=='addCoupon'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/addCoupon');?>">Add Coupon</a></li>
                              </ul>
                            </li> 
              
                    <li class="has_sub <?php if($page=='tag_list' || $page=='add_tag'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Tags</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='tag_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/tag_list');?>">Tag List</a></li>
                                    <li class="<?php if($page=='add_tag'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_tag');?>">Add Tag</a></li>
                              </ul>
                            </li>
                            
                            
                            
                               <li class="has_sub <?php if($page=='icon_list' || $page=='add_icon'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-flag"></i><span>Map Icon</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='icon_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/icon_list');?>">Map Icon List</a></li>
                                    <li class="<?php if($page=='add_icon'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_icon');?>">Add Map Icon</a></li>
                              </ul>
                            </li>
                            
                            
                       
                       
                            
                     
                            
                             <li class="has_sub <?php if($page=='user_list' || $page=='add_user' || $page=='userNoti_list' || $page=='starting_banner_list' || $page=='add_userNoti' || $page=='add_starting_banner'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-users"></i><span>  Users Details</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                               
                            <!-- <li class="<?php if($page=='add_user'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_user');?>">Add User</a></li>
-->
                            <li class="<?php if($page=='user_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/user_list');?>">Users List</a></li>

                            <li class="<?php if($page=='userNoti_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/userNoti_list');?>">Notification</a></li>

                                </ul>
                            </li>
                            
                            
                                      
                            
 <li class="has_sub <?php if($page=='country_map_list' ||$page=='country_map_city_list' ||$page=='country_map_city_place_list' || $page=='add_country_map'|| $page=='add_country_map_city'|| $page=='add_country_map_city_place'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-flag"></i><span> Map Details</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                    <li class="<?php if($page=='country_map_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/country_map_list');?>">Country Map</a></li>
                                    <li class="<?php if($page=='country_map_city_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/country_map_city_list');?>">City List</a></li>
                                    <li class="<?php if($page=='country_map_city_place_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/country_map_city_place_list');?>">City Places</a></li>
                                  
                              </ul>
                            </li>
                            
                            
                               
                                <li class="has_sub <?php if($page=='guidelines_tips_list' || $page=='add_event'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Guidelines and Tips</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='guidelines_tips_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/guidelines_tips_list');?>">Guidelines and Tips List</a></li>
                                    <li class="<?php if($page=='add_guidelines_tips'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_guidelines_tips');?>">Add Guidelines and Tips</a></li>
                              </ul>
                            </li>
                       
                            
                            
                               
                                <li class="has_sub <?php if($page=='add_company_offer_category' ||$page=='company_offer_category_list' || $page=='company_offer_list' || $page=='add_company_offer'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-money"></i><span>Company Offer</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='company_offer_category_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/company_offer_category_list');?>"> Offer Category List</a></li>
                                    <li class="<?php if($page=='add_company_offer_category'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_company_offer_category');?>">Add Offer Offer</a></li>
                                   <li class="<?php if($page=='company_offer_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/company_offer_list');?>">Company Offer List</a></li>
                                    <li class="<?php if($page=='add_company_offer'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_company_offer');?>">Add Company Offer</a></li>
                              </ul>
                            </li>
                       
                            
                            
                                <li class="has_sub <?php if($page=='service_list' || $page=='add_service'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Service List</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='service_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/service_list');?>">Service List</a></li>
                                    <li class="<?php if($page=='add_service'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_service');?>">Add Service</a></li>
                              </ul>
                            </li>
                            
                            
                            
                         <!--  <li class="has_sub <?php if($page=='user_trip_list' ){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>User Trip</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='user_trip_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/user_trip_list');?>">User Trip List</a></li>
                              </ul>
                            </li>-->
                
                            
                    
                          
                      
                           
                     

                        </ul>
                        <div class="clearfix"></div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <!-- Left Sidebar End --> 
            <?php }else{ ?>
             <div class="left side-menu">
              <div class="sidebar-inner slimscrollleft">
                    
                    <!--- Divider -->
                    <div id="sidebar-menu">
                        <ul>
                            <li>
                                <a href="<?=base_url('admin/view_page/dashboard');?>" class="waves-effect active"><i class="md md-home"></i><span> Dashboard </span></a>
                            </li>

                         
               
                        
                            
                 <li class="has_sub <?php if($page=='about_us' || $page=='termss' || $page=='privacy'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Setting </span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='about_us'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/about_us');?>">About us</a></li>
                                   <li class="<?php if($page=='termss'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/termss');?>">Terms conditions</a></li>
                                   <li class="<?php if($page=='privacy'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/privacy');?>">Privacy Policy</a></li>

                                </ul>
                            </li>
                            
                            <li class="has_sub <?php if($page=='plan_list' || $page=='add_plan'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Subcription Plan</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='plan_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/plan_list');?>">Subcription Plan List</a></li>
                                    <li class="<?php if($page=='add_plan'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_plan');?>">Add Subcription Plan</a></li>
                                    <li class="<?php if($page=='user_purcahse_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/user_purcahse_list');?>">Plan Purcahse History</a></li>
                              </ul>
                            </li>
                            
              
                                <li class="has_sub">
                                <a href="#" class="waves-effect"><i class="fa fa-money"></i><span>Coupon Details</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='couponList'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/couponList');?>">Coupons</a></li>
                                    <li class="<?php if($page=='addCoupon'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/addCoupon');?>">Add Coupon</a></li>
                              </ul>
                            </li> 
                          
                       
                            
                     
                            
                             <li class="has_sub <?php if($page=='user_list' || $page=='add_user' || $page=='userNoti_list' || $page=='starting_banner_list' || $page=='add_userNoti' || $page=='add_starting_banner'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-users"></i><span>  Users Details</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                    
                            <li class="<?php if($page=='user_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/user_list');?>">Users List</a></li>

                            <li class="<?php if($page=='userNoti_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/userNoti_list');?>">Notification</a></li>

                                </ul>
                            </li>
                            
                            
                                      
                            
 <li class="has_sub <?php if($page=='country_map_list' ||$page=='country_map_city_list' ||$page=='country_map_city_place_list' || $page=='add_country_map'|| $page=='add_country_map_city'|| $page=='add_country_map_city_place'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-flag"></i><span> Map Details</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                    <li class="<?php if($page=='country_map_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/country_map_list');?>">Country Map</a></li>
                                    <li class="<?php if($page=='country_map_city_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/country_map_city_list');?>">City List</a></li>
                                    <li class="<?php if($page=='country_map_city_place_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/country_map_city_place_list');?>">City Places</a></li>
                                  
                              </ul>
                            </li>
                            
                            
                             
                            
                            
                               
                                <li class="has_sub <?php if($page=='company_offer_list' || $page=='add_company_offer'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-money"></i><span>Company Offer</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='company_offer_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/company_offer_list');?>">Company Offer List</a></li>
                                    <li class="<?php if($page=='add_company_offer'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_company_offer');?>">Add Company Offer</a></li>
                              </ul>
                            </li>
                       
                            
                            
                                <li class="has_sub <?php if($page=='service_list' || $page=='add_service'){echo 'active';}?>">
                                <a href="#" class="waves-effect"><i class="fa fa-list"></i><span>Service List</span><span class="pull-right"><i class="md md-add"></i></span></a>
                                <ul class="list-unstyled">
                                   <li class="<?php if($page=='service_list'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/service_list');?>">Service List</a></li>
                                    <li class="<?php if($page=='add_service'){echo 'active';}?>"><a href="<?=base_url('admin/view_page/add_service');?>">Add Service</a></li>
                              </ul>
                            </li>
                            
                            
                            
                      
                  
                       


                        </ul>
                        <div class="clearfix"></div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <?php } ?>
            <script>
// delete function
function deleteUsers123(id)
{
 
function(){



        $.ajax({
          url: "<?=base_url('admin/update_noti_status');?>",
          data: {'table': 'users', 'id': id}, // change this to send js object
          type: "POST",
          success: function(result){
            //alert(result);

            $('.confirm').click(function(){
               location.reload();
            });
             

          }
        });

  

};

} 
// end delete function

</script>



