methods['receiveEnrolmentFromUniv_post']['limit'] = 500; // 500 requests per hour per user/key // load the model $this->load->model('Receive_Enrolment_Fees_Univ_model', 'receive_model'); } /* * This method used to add received enrolment details * created by kms * */ public function receiveEnrolmentFromUniv_post() { $now = new DateTime(); $now->setTimezone(new DateTimezone('Asia/Kolkata')); $enrolmentDetails = $this->post('details'); $localDetails = $this->post('localDetails'); $fromDetails['CreatedOn'] = $now->format('Y-m-d H:i:s'); $fromDetails['CreatedBy'] = $localDetails['localUserID']; $fromDetails['UniversityCode']=$this->post('universityID'); $fromDetails['UniversityName']=$this->post('universityName'); $fromDetails['BranchCode']=$localDetails['localBranchID']; $updatedDetails = $this->receive_model->updateEnrolmentDetails($enrolmentDetails,$fromDetails);// Check if the users data store contains users (in case the database result returns NULL) if ($updatedDetails['status']) { $updatedDetails['status'] = true; // Set the response and exit $this->response($updatedDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'Something went wrong.please try again!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } /* * This method used to add formid related student fee details form university * created by kdk * */ public function insertFormIdUnivFeeDetails_post(){ $formIdDetails = $this->post('details'); $localDetails = $this->post('localDetails'); $updatedDetails = $this->receive_model->formIdFeeDetails($formIdDetails,$localDetails);// Check if the users data store contains users (in case the database result returns NULL) if ($updatedDetails) { $updatedDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($updatedDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'Something went wrong.please try again!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function getStudentUnivFeeCompareDetails_post(){ $searchData = $this->post('search'); $univID = $searchData['University']; $courseID = $searchData['Course']; $getUnivStudentFeeCompare = $this->receive_model->getStudentUnivFeeCompareDetails($univID,$courseID);// Check if the users data store contains users (in case the database result returns NULL) if ($getUnivStudentFeeCompare) { $getUnivStudentFeeCompare['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getUnivStudentFeeCompare, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'Something went wrong.please try again!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } }