Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Daftar List Reviewer per Proposal
- public function listreviewerproposal_post()
- {
- $username = trim($this->post('username'));
- $id = trim($this->post('id'));
- if ($username == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Username tidak ditemukan.',
- ];
- } elseif ($id == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'ID Proposal kosong.',
- ];
- } else {
- $listData = $this->db->order_by('user_name', 'asc')->get_where('v_reviewerproposal', array('propose_id' => $id))->result();
- if (count($listData) == 0) {
- $response = [
- 'resp_error' => false,
- 'resp_msg' => 'Belum Data Reviewer',
- ];
- } else {
- foreach ($listData as $r) {
- $response['items'][] = [
- 'resp_error' => false,
- 'user_username' => $r->user_username,
- 'nama' => trim($r->user_name),
- 'fakultas' => trim($r->faculty_name),
- 'progdi' => trim($r->study_program_name),
- ];
- }
- }
- }
- $this->response($response, 200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement