[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
BACKUP C 19-12
/
XAMPP74
/
htdocs
/
simkeu
/
dummy-old
/
application
/
models
/
[
Home
]
File: mbukti.php
<?php class Mbukti extends CI_Model { function ada(){ $this->db->where('status',null); return $this->db->get('tbl_bukti'); } function ada_ok(){ $this->db->where('status','ok'); return $this->db->get('tbl_bukti'); } function notifikasi($id_jenis){ $q = $this->ada(); $b = array(); if ($q->num_rows()>0){ foreach ($q->result() as $key ) { $a = explode('-', $key->bukti); if ($a[1] == $id_jenis){ $b[] = $a[1]; } } } return count($b); } function jenis_terima(){ $q = $this->ada(); $b = array(); if ($q->num_rows()>0){ foreach ($q->result() as $key ) { $a = explode('-', $key->bukti); $b[]=$a[1]; } } return $b; } function update($bukti,$in){ $this->db->where('bukti', $bukti); $this->db->update('tbl_bukti', $in); } function sppvar($id_mhs){ $q = $this->db->get('tbl_bukti'); $m = $this->Mmhs->get_mhs($id_mhs)->row(); if ($q->num_rows()>0){ foreach ($q->result() as $key ) { $a = explode('-', $key->bukti); if ($a[1]==3 and $a[2]==$m->id){//rev 8apr2014 return $key->bukti; } } } } function cek_nim($id){ $q = $this->db->get('tbl_bukti'); $a = array(); if ($q->num_rows()>0){ foreach ($q->result() as $row){ $pecah = explode('-',$row->bukti); if ($pecah[2] == $id){ $a[] = $row->id; } } } return $a; } function get_bukti($id){ return $this->db->get_where('tbl_bukti',array('id' => $id)); } }