Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function listunreadpetugas_post()
- {
- $username = trim($this->post('username'));
- $level = trim($this->post('level'));
- if ($username == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Username Kosong.',
- ];
- } else if ($level == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Level Kosong.',
- ];
- } else {
- $this->db->where('notifikasi_level', $level);
- $this->db->where('notifikasi_status', 1);
- $this->db->from('bpmppt_notifikasi');
- $total = $this->db->count_all_results();
- if ($total > 0) {
- $response = [
- 'resp_error' => false,
- 'jumlah' => $total,
- ];
- } else {
- $response = [
- 'resp_error' => false,
- 'resp_msg' => 'Tidak Ada Data Notifikasi.',
- ];
- }
- }
- $this->response($response, 200);
- }
Add Comment
Please, Sign In to add comment