Beispiel #1
0
function sideAct($side)
{
    if (is_array($side)) {
        foreach ($side as $item) {
            if (isSamePath(current_url(), $item)) {
                return ' class="active"';
                break;
            }
        }
    } else {
        if (isSamePath(current_url(), $side)) {
            return ' class="active"';
        }
    }
}
Beispiel #2
0
echo site_url('admin');
?>
" class="vam"><?php 
echo lang('admin_backend');
?>
</a>

	</li>
	<?php 
$menu = $this->config->item('menu');
$isFound = false;
if (is_array($menu) && count($menu) > 0) {
    foreach ($menu as $key => $menuitem) {
        if (is_array($menuitem) && count($menuitem) > 0) {
            foreach ($menuitem as $itemkey => $itemValue) {
                if (isSamePath(current_url(), $itemValue['href'])) {
                    ?>
	                    <li class="parent">
                    		<a href="<?php 
                    echo site_url($itemValue['href']);
                    ?>
"><?php 
                    echo lang($key);
                    ?>
</a>
                    
                    	</li>
                    	<li class="parent">
                    		<a href="<?php 
                    echo site_url($itemValue['href']);
                    ?>
Beispiel #3
0
 public function testIsSamePath()
 {
     isSamePath(__DIR__, __DIR__);
     isSamePath(array('some/path'), 'some\\path');
     isSamePath('some/path', array('some\\path'));
     isSamePath(array(__DIR__, 'some/path'), array(__DIR__, 'some\\path'));
 }