function render_top_menu($id, $level = 0, $alias = '') { $page = $this->get_page_by_id($id); if ($page->content_from == 'Url') { if (strpos('-' . $page->url, '://') <= 0) { $url = site_url($page->url); } else { $url = $page->url; } if ($alias == $page->alias) { $class = 'active'; } else { $class = is_active_menu($page->url); } } else { $url = site_url('page/' . $page->alias); if ($alias == $page->alias) { $class = 'active'; } else { $class = is_active_menu('page/' . $page->alias); } } if (count($this->has_child($id)) <= 0 && $level == 0) { echo '<li class="' . $class . '" > <a href="' . $url . '">' . translate($page->title) . '</a> </li>'; } else { if (count($this->has_child($id)) <= 0 && $level > 0) { $after_content = ''; echo '<li class="' . $class . ' ' . $class . '-child"> <a href="' . $url . '">' . translate($page->title) . '</a> </li>' . $after_content; } else { if (count($this->has_child($id)) > 0) { $childs = $this->has_child($id); $flag = 0; foreach ($childs as $child) { if ($flag == 0) { echo '<li class="has-sub" > <span class="submenu-button"></span> <a href="#" class="dropdown-toggle" data-toggle="dropdown">' . translate($page->title) . '</a> <ul>'; $flag = 1; $level++; } $this->render_top_menu($child, $level, $alias); } $after_content = ''; for ($i = 0; $i < $level; $i++) { $after_content .= '</ul></li>'; } echo $after_content; } } } }
</li> <?php } ?> <li style="border-bottom:1px solid #fff;height:0px;"></li> <?php $filter_options = array('DBC_PURPOSE_SALE' => 'sale', 'DBC_PURPOSE_RENT' => 'rent', 'DBC_PURPOSE_BOTH' => 'sale_rent'); foreach ($filter_options as $k => $v) { ?> <li class="<?php echo is_active_menu('show/purpose/' . $v); ?> "> <a href="<?php echo site_url('show/purpose/' . $v); ?> "> </i> <?php echo lang_key($k); ?> </a> </li>
if ($custom_type['title'] == 'DBC_TYPE_VILLA') { $filter_options[$custom_type['title']] = 'villa'; } else { $filter_options[$custom_type['title']] = urlencode($custom_type['title']); } } } } } } } } foreach ($filter_options as $k => $v) { ?> <li class="<?php echo is_active_menu('show/type/' . $v); ?> "> <a href="<?php echo site_url('show/type/' . $v); ?> "> <i class="fa fa-indent"></i> <?php echo lang_key($k); ?> </a> </li> <?php } ?> </ul>
"> <a href="<?php echo site_url('faturas'); ?> ">Listar Faturas</a> </li> </ul> </li> <li class="<?php echo is_active_menu('usuarios'); ?> " > <a href="<?php echo site_url('usuarios'); ?> " class="dropdown-toggle"> <i class="fa fa-users"></i> <span>Usuários</span> <b class="arrow fa fa-angle-right"></b> </a> </li> <?php }
</ul> </li> <?php }?> <?php if (check_staff_permission('pricelists_read')){?> <li class="nav-parent <?php echo is_active_menu('pricelists'); ?><?php echo is_active_menu('pricelist_versions'); ?>"> <a href="#"><i class="icon-list"></i><span>Pricelists</span> <span class="fa arrow"></span></a> <ul class="children collapse"> <li class=" nav-active <?php echo is_active_menu('pricelists'); ?>"><a href="<?php echo base_url('admin/pricelists'); ?>"><span>Pricelists</span></a></li> <li class="<?php echo is_active_menu('pricelist_versions'); ?>"><a href="<?php echo base_url('admin/pricelist_versions'); ?>">Pricelist Versions</a></li> </ul> </li> <?php }?> <?php if (check_staff_permission('contracts_read')){?> <li class=" nav-active <?php echo is_active_menu('contracts'); ?>"><a href="<?php echo base_url('admin/contracts'); ?>"><i class="fa fa-search-plus"></i><span>Contracts</span></a></li> <?php }?> <li class=" nav-active <?php echo is_active_menu('calendar'); ?>"><a href="<?php echo base_url('admin/calendar'); ?>"><i class="fa fa-calendar"></i><span>Calendar</span></a></li> <?php if (check_staff_permission('staff_read')){?> <li class=" nav-active <?php echo is_active_menu('staff'); ?>"><a href="<?php echo base_url('admin/staff'); ?>"><i class="icon-users"></i><span>Staff</span></a></li> <?php }?> </ul> </div> </div>
<li class="<?php echo is_active_menu('admin/system/settings'); ?> "><a href="<?php echo site_url('admin/system/settings'); ?> "><?php echo lang_key('admin_settings'); ?> </a></li> <li class="<?php echo is_active_menu('admin/system/generatesitemap'); ?> "><a href="<?php echo site_url('admin/system/generatesitemap'); ?> "><?php echo lang_key('sitemap'); ?> </a></li> </ul> </li>
">Edit Email Text</a></li> <li class="<?php echo is_active_menu('admin/system/sitesettings'); ?> "><a href="<?php echo site_url('admin/system/sitesettings'); ?> ">Site Settings</a></li> <li class="<?php echo is_active_menu('admin/system/settings'); ?> "><a href="<?php echo site_url('admin/system/settings'); ?> ">Admin Settings</a></li> </ul> </li>
echo $menu['parent_url']; ?> " class="nav nav-list collapse <?php if (is_active_menu($this->user_model->get_user_current_action(), $menu['parent_action'])) { echo "in"; } ?> "> <?php foreach ($menu as $sub_menu) { ?> <?php if (is_array($sub_menu)) { ?> <li <?php if (is_active_menu($this->user_model->get_user_current_action(), $sub_menu['action'])) { echo "class=active"; } ?> ><a href="<?php echo site_url($sub_menu['url']); ?> "><i class="<?php echo $sub_menu['icon']; ?> "></i><?php echo $this->lang->line('_' . $sub_menu['title']); ?> </a></li> <?php }
</script> <div class="topbar"> <div class="header-left"> <div class="topnav"> <a class="menutoggle" href="#" data-toggle="sidebar-collapsed"><span class="menu__handle"><span>Menu</span></span></a> <ul class="nav nav-horizontal"> <li class="<?php echo is_active_menu('mailbox'); ?>"><a href="<?php echo base_url('admin/mailbox'); ?>"><!--<span class="pull-right badge badge-primary">8</span>--><i class="fa fa-envelope"></i><span>Email</span></a></li> <?php if (check_staff_permission('sales_orders_read')){?> <li class="<?php echo is_active_menu('salesorder'); ?>"><a href="<?php echo base_url('admin/salesorder'); ?>"><i class="fa fa-shopping-cart"></i><span>Sales Orders</span></a></li> <?php }?> <?php if (check_staff_permission('invoices_read')){?> <li class="<?php echo is_active_menu('invoices'); ?>"><a href="<?php echo base_url('admin/invoices'); ?>"><i class="icon-note"></i><span>Invoices</span></a></li> <?php }?> <?php if (userdata('id')=='1'){?> <li><a href="<?php echo base_url('admin/settings'); ?>"><i class="icon-settings"></i><span>Settings</span></a></li> <?php }?> </ul> </div> </div> <div class="header-right"> <ul class="header-menu nav navbar-nav"> <!-- BEGIN NOTIFICATION DROPDOWN --> <?php
</div> <div class="sidebar-inner"> <div class="menu-title"> Navigation <!--<div class="pull-right menu-settings"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" data-delay="300"> <i class="icon-settings"></i> </a> <ul class="dropdown-menu"> <li><a href="#" id="reorder-menu" class="reorder-menu">Reorder menu</a></li> <li><a href="#" id="remove-menu" class="remove-menu">Remove elements</a></li> <li><a href="#" id="hide-top-sidebar" class="hide-top-sidebar">Hide user & search</a></li> </ul> </div>--> </div> <ul class="nav nav-sidebar"> <li class=" nav-active <?php echo is_active_menu('dashboard'); ?>"><a href="<?php echo base_url('customer/dashboard'); ?>"><i class="icon-home"></i><span>Dashboard</span></a></li> <li class="<?php echo is_active_menu('quotations'); ?>"><a href="<?php echo base_url('customer/quotations'); ?>"> <i class="icon-tag"></i><span>Quotations</span></a></li> <li class="<?php echo is_active_menu('salesorder'); ?>"><a href="<?php echo base_url('customer/salesorder'); ?>"> <i class="fa fa-shopping-cart"></i><span>Sales Order</span></a></li> <li class="<?php echo is_active_menu('invoices'); ?>"><a href="<?php echo base_url('customer/invoices'); ?>"> <i class="icon-note"></i><span>Invoices</span></a></li> <li class="<?php echo is_active_menu('contracts'); ?>"><a href="<?php echo base_url('customer/contracts'); ?>"> <i class="fa fa-search-plus"></i><span>Contracts</span></a></li> </ul> </div> </div>