/** * 案例中心 */ public function caseAction() { $sType = 'case'; if (intval($sType) > 0) { $aData = Model_WebSite::getDetail((int) $sType); } else { $aData = Model_WebSite::getRow(array('where' => array('sPage' => $sType))); } if (empty($aData)) { return $this->show404('内容不存在!'); } $this->assign('aData', $aData); $this->setMeta('help_page', $aData); $this->assign('sTopMenu', 'case'); }
/** * 增加网站内容 */ public function addAction() { if ($this->_request->isPost()) { $aWebSite = $this->_checkData('add'); if (empty($aWebSite)) { return null; } if (Model_WebSite::addData($aWebSite) > 0) { return $this->showMsg('网站内容增加成功!', true); } else { return $this->showMsg('网站内容增加失败!', false); } } $parentWebsite = Model_WebSite::getList(array('iParentID' => 0, 'iStatus' => 1), $iPage); $this->assign('parentWebsite', $parentWebsite['aList']); $this->assign('iType', Model_WebSite::$iType); }