Beispiel #1
0
 /**
  * 增加菜单
  */
 public function addAction()
 {
     if ($this->isPost()) {
         $aMenu = $this->_checkData();
         if (empty($aMenu)) {
             return null;
         }
         $aMenu['iOrder'] = Model_Menu::getNextOrder($aMenu['iParentID']);
         if (Model_Menu::addData($aMenu) > 0) {
             return $this->showMsg('菜单增加成功!', true);
         } else {
             return $this->showMsg('菜单增加失败!', false);
         }
     } else {
         $aTree = Model_Menu::getMenus();
         $this->assign('aTree', $aTree);
     }
 }