<?php if(isset($this->session->userdata['login_data'])){
                            $session_value = 1; }else{$session_value = 0;}  ?>
                            
    <div id="right-panel" class="right-panel" style="background-color: #c9edfd8a;">

        <!-- Header-->
        <header id="header" class="header" >
            <div class="top-left">
                <div class="" style="background-color: none;">
                    <a class="navbar-brand" href="<?php echo site_url('dashboard')?>"><img class="align-content" src="<?php echo base_url(); ?>assets/images/nancelogo.png" alt="" style="height: 40px;"></a>
                    <a class="navbar-brand hidden" href="<?php echo site_url('dashboard')?>">NANCE</a>
                    <a id="menuToggle" class="menutoggle">...</a>
                   
                </div>
            </div>
            <div class="top-right">
                <div class="header-menu">
                    <!--div class="header-left">
                        <button class="search-trigger"></button>
                        <div class="form-inline">
                            <form class="search-form">
                                <input class="form-control mr-sm-2" type="text" placeholder="Search ..." aria-label="Search">
                                <button class="search-close" type="submit"></button>
                            </form>
                        </div>

                        <div class="dropdown for-notification">
                            <button class="btn btn-secondary dropdown-toggle" type="button" id="notification" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                              
                                <span class="count bg-danger">3</span>
                            </button>
                            <div class="dropdown-menu" aria-labelledby="notification">
                                <p class="red">You have 3 Notification</p>
                                <a class="dropdown-item media" href="#">
                                    
                                    <p>Server #1 overloaded.</p>
                                </a>
                                <a class="dropdown-item media" href="#">
                                    
                                    <p>Server #2 overloaded.</p>
                                </a>
                                <a class="dropdown-item media" href="#">
                                    
                                    <p>Server #3 overloaded.</p>
                                </a>
                            </div>
                        </div>

                        <div class="dropdown for-message">
                            <button class="btn btn-secondary dropdown-toggle" type="button" id="message" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                               
                                <span class="count bg-primary">4</span>
                            </button>
                            <div class="dropdown-menu" aria-labelledby="message">
                                <p class="red">You have 4 Mails</p>
                                <a class="dropdown-item media" href="#">
                                    <span class="photo media-left"><img alt="avatar" src=""></span>
                                    <div class="message media-body">
                                        <span class="name float-left">Jonathan Smith</span>
                                        <span class="time float-right">Just now</span>
                                        <p>Hello, this is an example msg</p>
                                    </div>
                                </a>
                                <a class="dropdown-item media" href="#">
                                    <span class="photo media-left"><img alt="avatar" src=""></span>
                                    <div class="message media-body">
                                        <span class="name float-left">Jack Sanders</span>
                                        <span class="time float-right">5 minutes ago</span>
                                        <p>Lorem ipsum dolor sit amet, consectetur</p>
                                    </div>
                                </a>
                                <a class="dropdown-item media" href="#">
                                    <span class="photo media-left"><img alt="avatar" src=""></span>
                                    <div class="message media-body">
                                        <span class="name float-left">Cheryl Wheeler</span>
                                        <span class="time float-right">10 minutes ago</span>
                                        <p>Hello, this is an example msg</p>
                                    </div>
                                </a>
                                <a class="dropdown-item media" href="#">
                                    <span class="photo media-left"><img alt="avatar" src=""></span>
                                    <div class="message media-body">
                                        <span class="name float-left">Rachel Santos</span>
                                        <span class="time float-right">15 minutes ago</span>
                                        <p>Lorem ipsum dolor sit amet, consectetur</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                    </div-->

                    <div class="user-area dropdown float-right">
                        <a href="#" class="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            Hi <?php if(isset($this->session->userdata['login_data'])){
                            echo $this->session->userdata['login_data']['username'] ;} ?>
                        </a>
                        
                        

                        <div class="user-menu dropdown-menu">
                           

                            <a class="nav-link" href="<?php echo site_url('logout')?>">Logout</a>
                        </div>
                    </div>
                </div>
            </div>
        </header><!-- /header -->
        <!-- Header-->
         <script src="<?php echo base_url(); ?>assets/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
    
     $(document).ready(function(){
        chk_ses();
    });
    
     setInterval(function() {
        chk_ses();
    }, 10 * 1000); // 60 * 1000 milsec
    
    function chk_ses(){
        var myvar='<?php echo $session_value;?>';
        
        if(myvar<1){alert("Session Expired,Please Login"); location.href = '<?php echo base_url(); ?>logout';}
    }
    
    </script>