load->model('Reports_model', 'report_model'); } public function status_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $s = $this->post('status'); // print_r($this->post()); $getStatus = $this->report_model->status($bat,$br,$u,$s); //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_filter_post() { $br = $this->post('branch'); // $userID = $this->post('userID'); $getStatus = $this->report_model->getUniversity2($br); if ($getStatus) { $result = $this->report_model->getDefaultActivity('C001',$br); if(!empty($result)){$getStatus['markcardstatus'] = $result; $cnt = count($getStatus['markcardstatus']); $getStatus['markcardstatus'][$cnt+1]["ListCode"] = "all"; $getStatus['markcardstatus'][$cnt+1]["ListName"] = "ALL"; $getStatus['markcardstatus'][$cnt+1]["StudentActivityCode"]= 'C001'; } else{ $getStatus['markcardstatus'] = array();} $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'); $sts = $this->post('status'); $fd = $this->post('from_date'); $td = $this->post('to_date'); $getStatus = $this->report_model->markcard($bat,$br,$u,$sts,$fd,$td); //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_filter_post() { $br = $this->post('branch'); $getStatus = $this->report_model->getUniversity($br); if ($getStatus) { $result = $this->report_model->getDefaultActivity('A001',$br); if(!empty($result)){$getStatus['certificatestatus'] = $result; $cnt = count($getStatus['certificatestatus']); $getStatus['certificatestatus'][$cnt+1]["StudentActivityCode"]= 'A001'; $getStatus['certificatestatus'][$cnt+1]["ListCode"] = "all"; $getStatus['certificatestatus'][$cnt+1]["ListName"] = "ALL"; } else{ $getStatus['certificatestatus'] = array();} $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'); $st = $this->post('status'); $from = $this->post('from'); $to = $this->post('to'); $getStatus = $this->report_model->certificate_status($bat,$br,$u,$from,$to,$st); //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'); $s = $this->post('status'); $getStatus = $this->report_model->answer_booklet($bat,$br,$u,$s); //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_filter_post(){ $br = $this->post('branch'); $getStatus = $this->report_model->getUniversity($br); if ($getStatus) { $cnt = count($getStatus['university']); if($cnt>=0){ $getStatus['university'][$cnt]["universityID"] = "all"; $getStatus['university'][$cnt]["universityName"] = "ALL"; $getStatus['university'][$cnt]["batchDetails"]= [];} $getStatus['rollnostatus'][0]["ListCode"] = "pending"; $getStatus['rollnostatus'][0]["ListName"] = "PENDING"; $getStatus['rollnostatus'][0]["BranchCode"]= $br; $getStatus['rollnostatus'][1]["ListCode"] = "received"; $getStatus['rollnostatus'][1]["ListName"] = "RECEIVED"; $getStatus['rollnostatus'][1]["BranchCode"]= $br; $getStatus['rollnostatus'][2]["ListCode"] = "all"; $getStatus['rollnostatus'][2]["ListName"] = "ALL"; $getStatus['rollnostatus'][2]["BranchCode"]= $br; $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'); $st = $this->post('status'); $from = $this->post('from'); $to = $this->post('to'); $updateddate = $this->post('updateddate'); $getStatus = $this->report_model->app_pending($bat,$br,$u,$st,$from,$to,$updateddate); if($getStatus['app_pendingList']){ $count = count($getStatus['app_pending_data']); for ($i = 0;$i < $count;$i++) { $getStatus['app_pending_data'][$i]->FormType = implode('-', array_map('ucfirst', explode('-', $getStatus['app_pending_data'][$i]->FormType))); } } 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_old_post() { $bat = $this->post('batch'); $br = $this->post('branch'); $u = $this->post('university'); $getStatus = $this->report_model->app_pending_old($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 lead_post() { $univ = $this->post('university'); $act = $this->post('activity'); $sta = $this->post('status'); $ass = $this->post('assigned'); $from = $this->post('from'); $to = $this->post('to'); $br = $this->post('branch'); $getStatus = $this->report_model->lead($univ,$act,$sta,$ass,$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 filters_post() { $br = $this->post('branch'); $activityCode = $this->post('activity'); $getStatus = $this->report_model->getUniversity($br); // print_r($getStatus); if ($getStatus) { $getStatus['status'] = REST_Controller::HTTP_OK; if($activityCode != "" ){ // if($activityCode == "application"){}else{} $details = $this->report_model->getDefaultActivity($activityCode,$br); if(!empty($details)){$getStatus['statusList'] = $details; $cnt = count($getStatus['statusList']); $getStatus['statusList'][$cnt]["StudentActivityCode"]= $activityCode; $getStatus['statusList'][$cnt]["ListCode"] = "all"; $getStatus['statusList'][$cnt]["ListName"] = "ALL"; } else{ $getStatus['statusList'] = array();} } else{ $getStatus['statusList'] = array(); } // 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 filter_post() { $br = $this->post('branch'); $getStatus['Univ'] = $this->report_model->getUniv($br); $getStatus['Activity'] = $this->report_model->getActivity($br); $getStatus['Staff'] = $this->report_model->getStaff($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 BatchName_post() { $br = $this->post('branch'); $batch = $this->post('batch'); $getStatus = $this->report_model->BatchName($br,$batch); //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 getAllUniversity_post() { //echo 'in'; $branchId = $this->post('branchId'); // echo $branchId; // die(); $univlist = $this->report_model->GetAllUniversity($branchId); if($univlist) { $univlist['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($univlist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function NewregDetails_post() { $det['from'] = $this->post('from'); $det['to'] = $this->post('to'); $det['university'] = $this->post('university'); $det['branch'] = $this->post('branch'); // print_r($det); $newlist = $this->report_model->GetNewRegList($det); if($newlist) { $newlist['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($newlist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } public function feepaidDetails_post() { $det['from'] = $this->post('from'); $det['to'] = $this->post('to'); $det['university'] = $this->post('university'); $det['branchId'] = $this->post('branchId'); $feelist = $this->report_model->GetFeePaidDetails($det); if($feelist) { $feelist['status'] = REST_Controller::HTTP_OK; // Set the response and exit $this->response($feelist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code } else { $this->response([ 'message' => 'No records found!', 'status' => REST_Controller::HTTP_NOT_FOUND ], REST_Controller::HTTP_NOT_FOUND); } } }