コード例 #1
0
 public function removeInterestsAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $ajaxRes = array('success' => 0, 'info' => null);
     $params = $this->getRequest()->getParams();
     $arrTest = $params['dataTIds'];
     //echo "tetstt:".$arrTest;
     if (is_array($arrTest) && sizeof($arrTest) > 0) {
         $core = new PR_Api_Core_CandidateClass();
         $core->deleteInterest($arrTest);
         $ajaxRes['success'] = 1;
     }
     $response = $this->getResponse();
     $response->clearAllHeaders()->clearBody();
     $ajaxRes = json_encode($ajaxRes);
     $response->setHeader('Content-type', 'application/json');
     $response->setHeader('Content-Length', strlen($ajaxRes), true)->setBody($ajaxRes);
 }