<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <!-- sidebar menu: : style can be found in sidebar.less -->
          <ul class="sidebar-menu">
            <li class="header">MAIN NAVIGATION</li>
            <li class="treeview">
              <a href="<?php echo site_url();?>dashboard/welcome">
                <i class="fa fa-dashboard"></i> <span>Dashboard</span>
              </a>
            </li>  
            
            <?php 			
			  $user_type = $this->session->userdata('user_type');			 
			  $menu = new Data_handler();
			  $menuItem = $menu->get_menu($user_type);                    
            
				foreach($menuItem as $row1){			
            ?>
            <li class="treeview">
              <a href="#">
                <i class="<?php echo $row1['font_awesome_icon'];?>"></i>
                <span><?php $parent_id = $row1['id']; echo $row1['menu_name'];?></span>
                <i class="fa fa-angle-left pull-right"></i>
              </a>
              <ul class="treeview-menu">
                <?php 
                    $sub_menu = $menu->get_submenu($parent_id,$user_type);
					
                    if ($sub_menu>0)
                                    
                    foreach($sub_menu as $row2)
                    
                    {
                    ?>
                    <li><a href="<?php echo site_url().$row2['link'];?>"><i class="fa fa-circle-o"></i><?php echo $row2['submenu_name'];?></a></li>
                    <?php  }?>
              </ul>
            </li>
          
           
            <?php  } ?>          
            
            
          </ul>
        </section>
        <!-- /.sidebar -->
      </aside>