public function changeStatusAction() { $this->view->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $id = $this->_getParam('id'); $status = $this->_getParam('status'); if ($status == 0) { $status = 1; } else { $status = 0; } $model = new Admin_Model_Supplier(); $res = $model->changeStatus($id, $status); if (false === $res) { $arrResult = array("result" => 0); } else { $arrResult = array("result" => 1); } echo Zend_Json::encode($arrResult); }