 <!-- BEGIN: Main Menu-->
<style>
 /* dl li, ol li, ul li {
    line-height: 0.6!important;
}*/
dl li, ol li, ul li {
    line-height: 0.3!important;
}
</style>
    <div class="main-menu menu-fixed menu-dark menu-accordion menu-shadow" data-scroll-to-active="true">
      <div class="main-menu-content" style="overflow-y: scroll!important;">
        <ul class="navigation navigation-main" id="main-menu-navigation" data-menu="menu-navigation">
         <?php foreach($side_bar_data as $key => $data){ ?>
          <li class=" nav-item" data-target="#<?php echo $data->module_id;?>"><a href="#"><i class="ft-grid"></i><span class="menu-title" data-i18n="Project"><?php echo $data->module_name; ?></span></a>
            <ul class="menu-content" id="<?php echo $data->module_id;?>">
			<?php
				$module_id = $data->module_id;
				$user_id = $_SESSION['user_id'];
				$uauth = $_SESSION['authority'];
				$q= $this->db->query("SELECT M.module_id,M.module_name,S.sub_mod_id,S.sub_mod_name,U.url FROM module M,sub_module S,user_module_access U WHERE U.module_id=M.module_id and U.sub_mod_id=S.sub_mod_id and U.user_id='$user_id' and U.module_id='$module_id' and U.status='Enabled' order by user_module_id asc");
				foreach($q->result_array() as $row2){
				$sub_mod_name = $row2['sub_mod_name'];
				$sub_mod_id = $row2['sub_mod_id'];
				$sub_module_link = $row2['url'].'/'.$sub_mod_id;
				
				$curnt_dt = date("Y-m-d");
			    $dt1 = date('d', strtotime($curnt_dt));//extract the date
	            $lastDateOfMonth = date("Y-m-t", strtotime($curnt_dt));
		        $dt2 = date('d', strtotime($lastDateOfMonth));
				
			?>
			<?php //if($sub_mod_name == 'Daily Stock Update') {
			    //if($dt1 != $dt2) {
			?>
              <li><a class="menu-item" href="<?php echo site_url($sub_module_link);?>"><i></i><span data-i18n="Project Summary"><?php echo $sub_mod_name;?></span></a>
              </li>
           <?php //} } ?>  
              </li>
				<?php } ?>
            </ul>
          </li>
		<?php } ?>
		<?php /* if($uauth == 'chef') { ?>
          <li class=" nav-item"><a href="#"><i class="la la-briefcase"></i><span class="menu-title" data-i18n="Project">DC Price</span></a>
            <ul class="menu-content">
              <li><a class="menu-item" href="<?php echo site_url('User/dcPriceC');?>"><i></i><span data-i18n="Project Summary">DC Price Update</span></a>
              </li>
            </ul>
          </li>
        <?php } */ ?>  
        </ul>
      </div>
    </div>

    <!-- END: Main Menu-->