<?php

/*
    menu array
    [0] = link including text to show for the given menu item
    [1] = type of item (depracted) - this was used to determine if it was a menu dropdownlist item or a subitem from old views (keep at zero)
    [2] = Determine if this is the active item
*/

/**
* @package Home
*/
class Home_menu extends NE_MenuHook
{

    function Home_menu(&$user, &$customer, &$tpl)
    {
            parent::NE_MenuHook($user, $customer, $tpl);

            if (NE_Lib::isPublicDir() && $this->user->isAdmin()) {
                return;
            }

            if (!$this->user->isAnonymous() && !$this->user->isAdmin() ) {
                    //Dashboard
                    $menuItem = new NE_MenuItem($this->user->lang("Dashboard"),"index.php?fuse=home&amp;view=ShowSummary");
                    $menuItem->addViews("ShowSummary");
                    $menuItem->addPermissions("home_view");
                    $this->addItem($menuItem);
            }

            if ($this->user->isAdmin()) {
                //Dashboard
                $menuItem = new NE_MenuItem($this->user->lang("Dashboard"),"index.php?fuse=home&amp;view=Admin_ShowSummary");
                $menuItem->addViews("Admin_ShowSummary");
                $menuItem->addPermissions("home_view");
                $this->addItem($menuItem);

                //Events
                $menuItem = new NE_MenuItem($this->user->lang("Events"),"index.php?fuse=home&amp;view=ViewEvents");
                $menuItem->addViews("ViewEvents");
                $menuItem->addPermissions("home_view");
                $this->addItem($menuItem);
            }
    }
        
}

?>
