methods['getUniversity_post']['limit'] = 100; $this->methods['chkUnivIdExistDetail_post']['limit'] = 100; // load the broadcast model $this->load->model('Broadcast_model', 'broadcast_model'); } // get University, Course, Branch Detailss public function getUniveCourseBatch_post() { $reqData = $this->post('data'); $loginUserId = $reqData['localUserID']; $loginUserBranchId = $reqData['localBranchID']; $loginUserType = $reqData['localType']; $getUniversityListDetails = $this->broadcast_model->get_university_course_batch($loginUserBranchId); // Check if the employee exist if ($getUniversityListDetails) { $getUniversityListDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } // ger Result fot searched keyword details public function getStuListForBrodcast_post() { $reqSearchData = $this->post('data'); $reqData = $this->post('requestDetails'); $getSearchDetails = $this->broadcast_model->get_search_result($reqSearchData, $reqData); // Check if the employee exist if ($getSearchDetails) { $getSearchDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getSearchDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function sendSMSStudentApi_post() { $reqData = $this->post('data'); $reqDetails = $this->post('requestDetails'); $msg = $this->post('msg'); $time = date('Y-m-d H:i:s'); $dateTime = $time; $count = count($reqData); for ($i = 0;$i < $count;$i++) { $data[] = array('StudentID' => $reqData[$i]['StudentID']); } $sendMsgDetails = $this->broadcast_model->send_msg_students($data, $msg, $reqDetails); // Check if the employee exist if ($sendMsgDetails) { $sendMsgDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($sendMsgDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function getSMSGroupDetails_post() { $reqData = $this->post('data'); $reqDataBy = $this->post('localReqDetails'); $getMegDetails = $this->broadcast_model->getSMSGroupDetails($reqData, $reqDataBy); // Check if the employee exist if ($getMegDetails) { $getMegDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getMegDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function getSMSSendReportList_post() { $reqData = $this->post('data'); $reqDataBy = $this->post('requestDetails'); $getMegCronDetails = $this->broadcast_model->getSmsSendBetweenDate($reqData, $reqDataBy); // Check if the employee exist if ($getMegCronDetails) { $getMegCronDetails['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getMegCronDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response(['message' => 'No list were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function getCronCall_get() { $getMegCronDetails = $this->broadcast_model->getCronUpdate(); // Check if the employee exist // echo $getMegCronDetails;exit(); if ($getMegCronDetails) { echo $getMegCronDetails; } else { } // if ($getMegCronDetails) // { // $getMegCronDetails['status'] = REST_Controller::HTTP_OK; // // Set the response and exit // $this->response($getMegCronDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code // } // else // { // // Set the response and exit // $this->response([ // 'message' => 'No list were found', // 'status' => REST_Controller::HTTP_NOT_FOUND // ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code // } } }