<aside class="main-sidebar">
    <!-- sidebar -->
    <div class="sidebar">
        <!-- sidebar menu -->
        <ul class="sidebar-menu">

            <?php
            session_start();
            include './core.php';

            $menuDescDataList = $dba->getModuleMenusById($_REQUEST['moduleId'], 0, $_SESSION['ownerId']);
//print_r($_SESSION);
            ?>

            <li class="header">-- MENU PRINCIPAL --</li>

<?php 
    for($i=0 ; $i<count($menuDescDataList); $i++) {
?>

 <li class="treeview">
          <a href="#">
            <i class="fa fa-folder"></i> <span><?php  echo $menuDescDataList[$i]['menu_name_v']; ?></span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
           <?php 
		   $menuDetailList = $dba->getMenuDetail($menuDescDataList[$i]['menu_id_n'],0,$_SESSION['ownerId']);
		   for($j=0 ; $j<count($menuDetailList); $j++) { 
		   
		   
		   ?>
            <li><a href="#" onclick="getPage('<?php echo $menuDetailList[$j]['char_field_1'].$menuDetailList[$j]['page_link_v'];  ?>','content-wrapper')" ><i class="fa fa-circle-o"></i><?php  echo $menuDetailList[$j]['menu_name_v'] ?></a></li>
            <?php } ?>

          </ul>
        </li>


<?php

}

?>




        </ul>
    </div>
    <!-- /.sidebar -->
</aside>