<style>
.my_image{
width:35px;
height:30px;
margin-right:10px;
border-radius: 30px ;
}
</style>
<?php
$id =get_cookie('id');
$student_id = $this->db->query("SELECT student_id FROM `admin` WHERE `id`='$id'")->row_array()['student_id'];

                   
$records=@$this->db->select('student.img,branch.name')
                    ->from('student')
                    ->join('branch','branch.id=student.branch')
                    ->where('student.id',$student_id)
                    ->get()->row_array();
$user_img=$records['img'];  
$school_name=$records['name']; 
?>            	                              
<body>

    <div id="wrapper">
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
             
            <div id="nav" class="navbar-header">
                <button id="button" type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <div id="logo">
                    <a style="font-size: 18px;" class="navbar-brand" href="<?php echo site_url() ?>dashboard/index"><?php echo substr($school_name, 0, 20);?></a>
                   
                </div>
               
            </div><!-- navbar-header -->
            
         
               
                    <!--<a style="font-size: 18px;margin-left:20% !important; width: auto;" class="navbar-brand" href="#"><?php //echo $school_name;?></a>-->
              
               
            
   <!--========================= Top Menu Items ============================= -->
           
            <ul id="login" class="nav navbar-right top-nav">
                
                <li class="dropdown" style="padding:0px;margin:0px;float:left;display:inline;color:white;">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" style="padding:0.01in;float:left;color:white;">
                    
                    <?php
                    
                    echo "&nbsp;<h4 style='padding:0px;color:white;margin:0px;width:100%'>";
                    if(empty($user_img)){
                        echo "<img class='my_image' src='https://softvilla.com.pk/demovilla/edusolutions/edusolution/./images/avatar.png'>";
                    }
                    else{
                        $profile = '0';
                        echo "<img class='my_image' src='https://softvilla.com.pk/demovilla/edusolutions/edusolution/".$user_img."'>";
                    }
                      
                    echo $userInfo['username']." ".$userInfo['first_name']; ?>
                     <b class="caret" style="margin:20px;"></b>
                     </a>
                    <ul class="dropdown-menu">
                       <li>
                    <a style="margin-top: 10px;" href="<?php echo site_url() ?>user/profile"><i class="fa fa-fw far fa-user "></i>Profile</a>
                        </li>
                        <!--<li class="divider"></li>-->
                        <!--<li>-->
                        <!--    <a style="margin-top: 10px;" href="<?php //echo site_url() ?>user/update_password"><i class="fa fa-fw fa-gear"></i> Update Password</a>-->
                        <!--</li>-->
                        <li class="divider"></li>
                        <li>
                            <a href="<?php echo site_url(); ?>user/logout"><i class="fa fa-fw fa-power-off"></i> Log Out</a>

                        </li>
                    </ul>
                    <?php echo "&nbsp;</h4>"; ?>
                    
                </li>
            </ul>

<!--================================== Sidebar Menu Items ================================== -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul style="background-color: #34495e" class="nav navbar-nav side-nav">
                    <li>
                        <a href="<?php echo site_url() ?>dashboard/index"><i class="fa fa-home"></i> Dashboard</a>
                    </li>
                    <!-- <li>
                        <a href="javascript:;" data-toggle="collapse" data-target="#attendance"><i class="fa fa-fw fa-bar-chart"></i> Attendance <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="attendance" class="collapse">
                            <li>
                                <a href="<?php echo site_url() ?>attendance/index"><i class="fa fa-fw fa-file-o"></i> View Attendance</a>
                            </li>
                        </ul>
                    </li>-->
                     <li>
                        <a href="javascript:;" data-toggle="collapse" data-target="#result"><i class="fa fa-fw fa-table"></i> Result <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="result" class="collapse">
                            <li>
                                <a href="<?php echo site_url() ?>Result/result"><i class="fa fa-fw fa-file-o"></i> View Result</a>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a href="javascript:;" data-toggle="collapse" data-target="#fee"><i class="fa fa-file-o"></i> Fee <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="fee" class="collapse">
                            <li>
                                <a href="<?php echo site_url() ?>Fee/invoice"><i class="fa fa-fw fa-file-o"></i> Voucher List</a>
                            </li>
                        </ul>
                    </li>


                     <li>
                        <a href="javascript:;" data-toggle="collapse" data-target="#datesheet"><i class="fa fa-file-text-o"></i> DateSheet <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="datesheet" class="collapse">
                            <li>
                                <a href="<?php echo site_url() ?>Datesheet/index"><i class="fa fa-fw fa-file-o"></i> View Datesheet</a>
                            </li>
                        </ul>
                    </li>
                    
                    <li>
                        <a href="javascript:;" data-toggle="collapse" data-target="#timetable"><i class="fa fa-clock-o"></i> Timetable <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="timetable" class="collapse">
                            <li>
                                <a href="<?php echo site_url() ?>Timetable/index"><i class="fa fa-fw fa-file-o"></i> View Timetable</a>
                            </li>
                        </ul>
                    </li>
                    
                    <!--<li>-->
                    <!--    <a href="javascript:;" data-toggle="collapse" data-target="#dailyorder"><i class="fa fa-newspaper-o"></i> Circular / Notices <i class="fa fa-fw fa-caret-down"></i></a>-->
                    <!--    <ul id="dailyorder" class="collapse">-->
                    <!--        <li>-->
                    <!--            <a href="<?php echo site_url() ?>Dailyorder/index"><i class="fa fa-fw fa-file-o"></i> View Notices</a>-->
                    <!--        </li>-->
                    <!--    </ul>-->
                    <!--</li>-->
                    
                     <li>
                        <a href="javascript:;" data-toggle="collapse" data-target="#test"><i class="fa fa-laptop"></i> CBT <i class="fa fa-fw fa-caret-down"></i></a>
                        <ul id="test" class="collapse">
                            <li>
                                <a href="<?php echo site_url() ?>Test/index"><i class="fa fa-fw fa-file-o"></i>CBT List</a>
                                <a href="<?php echo site_url() ?>Test/result_list"><i class="fa fa-fw fa-file-o"></i>CBT Result</a>
                            </li>
                        </ul>
                    </li>

                    
                    <!--Add Extra -->
                    <!--<li>-->
                    <!--    <a href="<?php echo base_url() ?>Dashboard/news"><i class="fa fa-newspaper-o"></i> News</a>-->
                    <!--</li>-->
                    <!--<li>-->
                    <!--    <a href="<?php echo base_url() ?>Dashboard/weekly_Activities"><i class="fa fa-newspaper-o"></i> Weakly Activities</a>-->
                    <!--</li>-->
                    
                    <li>
                        <a href="<?php echo base_url() ?>Syllabus"><i class="fa fa-newspaper-o"></i> Syllabus</a>
                    </li>
                    <!--<li>-->
                    <!--    <a href="<?php echo base_url() ?>Dashboard/Curricular_Activities"><i class="fa fa-newspaper-o"></i> Circular / Notices</a>-->
                    <!--</li>-->

                    <li>
                        <a href="<?php echo base_url() ?>notes/index"><i class="fa fa-pencil-square-o"></i> Study Notes</a>
                    </li> 
                    
                    <li>
                        <a href="<?php echo base_url() ?>notes/lecture"><i class="fa fa-video-camera"></i> Lectures</a>
                    </li>
                    
                    <?php $sess_data =$this->session->userdata('user_sec');;   ?>      
                    

                   
                </ul>
            </div><!-- collapse navbar-collapse navbar-ex1-collapse -->           
        </nav>
