示例#1
0
 /**
  * 首页经理修改
  */
 public function editAction()
 {
     if ($this->_request->isPost()) {
         $aHomeManager = $this->_checkData('update');
         if (empty($aHomeManager)) {
             return null;
         }
         $aHomeManager['iAutoID'] = intval($this->getParam('iAutoID'));
         $aOldHomeManager = Model_HomeManager::getDetail($aHomeManager['iAutoID']);
         if (empty($aOldHomeManager)) {
             return $this->showMsg('首页经理不存在!', false);
         }
         if (1 == Model_HomeManager::updData($aHomeManager)) {
             return $this->showMsg('首页经理信息更新成功!', true);
         } else {
             return $this->showMsg('首页经理信息更新失败!', false);
         }
     } else {
         $iHomeManagerID = intval($this->getParam('id'));
         $aHomeManager = Model_HomeManager::getDetail($iHomeManagerID);
         $this->assign('aHomeManager', $aHomeManager);
     }
 }