Ejemplo n.º 1
0
 function process()
 {
     $menuCont = new ModMenuContainer();
     $userObj = session_is_registered('REGI_userObject') ? unserialize($_SESSION['REGI_userObject']) : "";
     if (!is_object($userObj)) {
         $menuArr = $menuCont->getMenu('all');
     } else {
         $menuArr = $menuCont->getMenu($userObj->getUserGroupeName());
     }
     if (count($menuArr) == 0) {
         new ErrorHandler(get_class($this), "process", "", "GROUP ERROR", "The group, the user belongs to doesn't exist!");
     }
     for ($i = 0; $i < count($menuArr); $i++) {
         $menuName = $menuArr[$i]->getProperty('MENU_NAME');
         $menuTitle = $menuArr[$i]->getProperty('MENU_TITLE');
         $itemArr = $menuCont->getMenItem($menuName);
         $this->_template->set_var("menu_header", $this->_html->getNavHeader($menuTitle));
         for ($j = 0; $j < count($itemArr); $j++) {
             $itemTitle = $itemArr[$j]->getProperty('ITEM_TITLE');
             $itemAction = $itemArr[$j]->getProperty('ITEM_ACTION');
             $itemUrl = $itemArr[$j]->getProperty('PAGE_NAME');
             //if($itemTitle != $this->_pageRequest)
             //{
             $this->_template->set_var("menu_body", $this->_html->getNavBody($itemTitle, $itemUrl, $this->_frameSet));
             $this->_template->parse("MENU_BODY_BLOCK", "menu_body_block", true);
             //}
         }
         $this->_template->parse("MENU_HEADER_BLOCK", "menu_header_block", true);
     }
     $this->_template->parse("TOTAL_MENU_BLOCK", "total_menu_block");
     $this->_template->parse($this->_outputName, $this->_mainBlock);
 }
Ejemplo n.º 2
0
 function process()
 {
     $menuCont = new ModMenuContainer();
     $userObj = session_id('REGI-userObject') ? session_decode('REGI-userObject') : "";
     if (!is_object($userObj)) {
         $menuArr = $menuCont->getMenu('all');
     } else {
         $menuArr = $menuCont->getMenu($userObj->getUserGroupeName());
     }
     if (count($menuArr) == 0) {
         new ErrorHandler(get_class($this), "process", "", "GROUP ERROR", "The group, the user belongs to doesn't exist!");
     }
     for ($i = 0; $i < count($menuArr); $i++) {
         $menuName = $menuArr[$i]->getProperty('MENU_NAME');
         $menuTitle = $menuArr[$i]->getProperty('MENU_TITLE');
         $itemArr = $menuCont->getMenItem($menuName, $this->_language);
         $this->_template->set_var("menu_body", $this->_html->getSimpleMenu($itemArr));
     }
     $this->_template->parse("TOTAL_MENU_BLOCK", "total_menu_block");
     $this->_template->parse($this->_outputName, $this->_mainBlock);
 }