?
Current Path : /home1/savoy/public_html/savoyglobal.net/rms/application/views/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/rms/application/views/menu.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); function CreateSubMenu($submenuchild,$menu_id) { $flag = FALSE; $menulst="<ul class='nav_main_sub_list'>"; foreach ($submenuchild as $childMenu) { if($childMenu['parent_menu_id'] == $menu_id) { $menulst.='<li><a href="'.site_url().'/master/index/'.$childMenu['menu_id'].'/'.$childMenu['module_id'].'">'.$childMenu['caption'].'</a></li>'; $flag = TRUE; } } $flag ? $menulst.="</ul>" : $menulst=""; return $menulst; } ?> <script type="text/javascript"> $(document).ready(function() { sfHover = function() { var sfEls = document.getElementById("top_right_ul").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } }); </script> <div id="header_toolbar_top"> <div class="container_12"> <div class="header_top_menu"> <div class="toolbar_large"> <div class="toolbutton" style="float: left; "> <div class="toolmenu"> <div class="toolicon"> <a href="<?=site_url();?>/sessions/logout"><img title="<?=$_SESSION['user_name'];?> - Logout" src="<?=base_url()?>assets/img/icons/16x16/locked-2.png" width="16" height="16" alt="user" ></a> </div> <div class="toolcaption"> <span><?=$this->mastermodel->get_single_field_value('login_type','login_type_name','login_type_id',$_SESSION['login_type']);?></span> </div> <!-- Start of menu --> <div class="dropdown"> <ul> <?php $login_types=$this->mastermodel->getdatas('login_type'); foreach($login_types as $list) { if($_SESSION['login_type']!=$list['login_type_id']) { ?> <li style="width:100px;"> <a href="<?=site_url('master/relogin/'.$list['login_type_id']);?>"><?=$list['login_type_name'];?></a> </li> <?php } } ?> </ul> </div> </div> </div> </div> </div> </div> </div> <div id="header_toolbar"> <div class="container_12"> <h1 class="grid_8"><img src="<?=base_url();?>assets/images/ag.png"/></h1> <div class="grid_4"><img src="<?=base_url();?>assets/images/savoy_global.png" align="right"/></div> </div> </div> <nav id="header_main"> <div class="container_12"> <ul id="nav_main"> <li <?php if($_SESSION['modename']=='home'){ ?> class="current" <?php } ?>> <a href="<?=site_url();?>"> <img src="<?= base_url();?>assets/img/icons/25x25/dark/home.png" > Home </a> </li> <?php foreach($modules as $module) { $isModuleVisible = false; $i=0; $subMenuMore = ""; $subMenu="<ul class='nav_main_sub'>"; foreach($menus as $menu) { if($menu['module_id'] == $module['module_id']) { $permitedMenu = explode(",", $menu['login_type']); if (in_array($_SESSION['login_type'],$permitedMenu)) { $isModuleVisible = TRUE; $i++; if($i<=8) { $subMenu.='<li '; if($_SESSION['current_mode']==$menu['menu_id']){ $subMenu.='class="selectedli"';} $subMenu.='><a href="'.site_url().'/master/index/'.$menu['menu_id'].'/'.$module['module_id'].'">'.$menu['caption'].'</a>'.CreateSubMenu($submenuchild,$menu['menu_id']).'</li>'; } else { $subMenuMore.='<li><a href="'.site_url().'/master/index/'.$menu['menu_id'].'/'.$module['module_id'].'">'.$menu['caption'].'</a>'.CreateSubMenu($submenuchild,$menu['menu_id']).'</li>'; } } } } if($i>=9) $subMenu.= '<li><a href="#">More>></a><ul class="nav_main_sub_list">'.$subMenuMore .'</ul></li>'; if($isModuleVisible) { $subMenu.="</ul>"; ?> <li <?php if($_SESSION['modename']==$module['module_name']){ echo 'class="current"'; } ?> > <a href="#"> <?php if($module['module_icon'] !=''){?><img src="<?= base_url();?>assets/img/icons/25x25/dark/<?=$module['module_icon'];?>" ><?php } ?> <?=$module['module_title']?> </a> <?php echo $subMenu ?> </li> <?php } } ?> </ul> </div> </nav> <div id="nav_sub"></div> <style> #top_right_ul, #top_right_ul ul { padding: 0; margin: 0; list-style: none; } #top_right_ul a { display: block; width: 10em; } #top_right_ul li { float: left; width: 10em; } #top_right_ul li ul { position: absolute; width: 10em; left: -999em; } #top_right_ul li:hover ul { left: auto; } </style>