Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function jumlahnotifanggota_post()
- {
- $username = trim($this->post('username'));
- $level = trim($this->post('level'));
- if ($username == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Username tidak ditemukan.',
- ];
- } elseif ($level == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Level tidak ditemukan.',
- ];
- } else {
- if ($level == 'Member') {
- $this->db->where('user_username', $username);
- $this->db->where('team_position_status', 'Pending');
- $this->db->from('v_anggota');
- $total = $this->db->count_all_results();
- $response = [
- 'resp_error' => false,
- 'jumlah' => $total,
- ];
- } else {
- $response = [
- 'resp_error' => false,
- 'jumlah' => 0,
- ];
- }
- }
- $this->response($response, 200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement