<?php

/**
* @package Home
*/
class Home_menu extends NE_MenuHook
{
    var $modulesViews = array(
        array('home', 'ShowSummary'),
    );

    var $menuDescription = /*T*/'General info'/*/T*/;

    function getMenuArr()
    {
        $tArray = array();
        $tSubArray = array();
        $navlinks = array();
        $options = false;

        if (NE_Lib::isPublicDir() && $this->user->isAdmin()) {
            return;
        }
        
        if ($this->user->hasPermission('home_view') && !$this->user->isAnonymous()) {
            if ($this->action == 'ShowSummary'){
                $tSubArray[0] = "<a href=\"index.php?fuse=home&amp;view=ShowSummary\" class='sel'>".strtolower($this->user->lang("overview"))."</a>";
                $tSubArray[1] = 0;
                $tArray[] = $tSubArray;
            } else {
                $tSubArray[0] = "<a href=\"index.php?fuse=home&amp;view=ShowSummary\">".strtolower($this->user->lang("overview"))."</a>";
                $tSubArray[1] = 0;
                $tArray[] = $tSubArray;
            }
            $options = true;
        }
        
        if ($this->action == 'ShowSummary') {
            if ($this->action == 'ShowSummary') {
                $tSubArray[0] = strtolower($this->user->lang("viewing overview"));
                $tSubArray[1] = 1;
                $tSubArray[2] = 1;
                $tArray[] = $tSubArray;
                $navlinks[] = $tSubArray[0];
            } else {
                $tSubArray[0] = "<a href=\"index.php?fuse=home&amp;view=ShowSummary\">".strtolower($this->user->lang("overview"))."</a>";
                $tSubArray[1] = 1;
                $tSubArray[2] = 0;
                $tArray[] = $tSubArray;
            }
        }
        if($options){
            return array('navlinks' => $navlinks, 'menus' => $tArray);
        }else{
            return;
        }
    }
}

?>
