예제 #1
0
파일: Crawlweixin.php 프로젝트: pancke/yyaf
 /**
  * 微信修改
  */
 public function editAction()
 {
     if ($this->_request->isPost()) {
         $aWeiXin = $this->_checkData('update');
         if (empty($aWeiXin)) {
             return null;
         }
         $aWeiXin['iWeixinID'] = intval($this->getParam('iWeixinID'));
         $aOldWeiXin = Model_CrawlWeixin::getDetail($aWeiXin['iWeixinID']);
         if (empty($aOldWeiXin)) {
             return $this->showMsg('微信不存在!', false);
         }
         if (1 == Model_CrawlWeixin::updData($aWeiXin)) {
             return $this->showMsg('微信更新成功!', true);
         } else {
             return $this->showMsg('微信更新失败!', false);
         }
     } else {
         $iWeixinID = intval($this->getParam('id'));
         $aWeiXin = Model_CrawlWeixin::getDetail($iWeixinID);
         $this->assign('aWeiXin', $aWeiXin);
     }
 }