load->model('Reports_model', 'report_model'); } public function status_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->status($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function markcard_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->markcard($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function certificate_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->certificate_status($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function mark_cert_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $from = $this->post('from'); $to = $this->post('to'); $getStatus = $this->report_model->mark_cert_status($bat,$br,$u,$from,$to); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function expense_post() { $from = $this->post('from'); $to = $this->post('to'); $br = $this->post('branch'); $getStatus = $this->report_model->expense($from,$to,$br); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function answer_booklet_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->answer_booklet($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function app_pending_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->app_pending($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function doc_pending_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->doc_pending($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function wav_ref_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->wav_ref($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function examfee_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->examfee($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function balfee_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->balfee($bat,$br,$u); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } public function filters_post() { $br = $this->post('branch'); $getStatus = $this->report_model->filters($br); //print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { // Set the response and exit $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } }