<ul class="uk-tab">
<?php
$class = function($uri){ if(in_array($uri,$this->uri->segment_array())) return 'class="uk-active"'; };
$href = function($uri, $title, $class){echo '<li '.$class.'><a href="'.site_url('manageadmin/'.$uri.'?token='.$this->session->userdata('token_value')).'">'.$title.'</a></li>';}?>
<?php $href('food_categories_management','Food Categories',$class('food_categories_management'))?>
<?php $href('food_items_management','Food Items',$class('food_items_management'))?>
<?php $href('restaurants_management','Restaurants',$class('restaurants_management'))?>
<?php $href('vendor_management','Vendors',$class('vendor_management'))?>
</ul>
<?php
$class = function($uri){ if(in_array($uri,$this->uri->segment_array())) return 'class="uk-active"'; };
$href = function($uri, $title, $class){echo '<li '.$class.'><a href="'.site_url('manageadmin/'.$uri.'?token='.$this->session->userdata('token_value')).'">'.$title.'</a></li>';}?>
<?php $href('food_categories_management','Food Categories',$class('food_categories_management'))?>
<?php $href('food_items_management','Food Items',$class('food_items_management'))?>
<?php $href('restaurants_management','Restaurants',$class('restaurants_management'))?>
<?php $href('vendor_management','Vendors',$class('vendor_management'))?>
</ul>
0 comments:
Post a Comment