Esempio n. 1
0
 /**
  * 增加基础配置
  */
 public function addAction()
 {
     if ($this->_request->isPost()) {
         $aDomain = $this->_checkData('add');
         if (empty($aDomain)) {
             return null;
         }
         if (Model_Domain::getRow(array('where' => array('sName' => $aDomain['sName'], 'iType' => $aDomain['iType'], 'iStatus' => 1)))) {
             return $this->showMsg('基础配置已经存在!', false);
         }
         if (Model_Domain::addData($aDomain) > 0) {
             return $this->showMsg('基础配置增加成功!', true);
         } else {
             return $this->showMsg('基础配置增加失败!', false);
         }
     }
     $this->assign('iType', Model_Domain::$iType);
 }