public function clientinfosignoffAction() { $this->_helper->layout()->disableLayout(); $client_id = $this->_getParam('param1', false); $notification_id = $this->_getParam('param2', false); //_event_id, _operator_id,_item_id if (false === $client_id || false === $notification_id) { throw new Exception('Tampered URI'); } $model = new Gyuser_Model_CRMTasks(); if (!$model->isDone($notification_id)) { $this->_helper->ViewRenderer->setScriptAction('client-info-signoff'); $this->view->notificationId = $notification_id; $this->view->clientId = $client_id; $this->view->clientHistory = $model->getClientHistory($client_id); //echo $client_id; $client = new Gyuser_Model_User(); $client->setId($client_id); $mapper = new Gyuser_Model_UserDataMapper(); $this->view->clientInfo = $mapper->ClientDetailsById($client); } else { //the task was already done $this->_helper->viewRenderer->setNoRender(true); $data['status'] = -1; //task already done by other operator $data['notificationId'] = $notification_id; echo json_encode($data); //echo -1; } return 0; }