[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
simaku
/
application-old
/
models
/
[
Home
]
File: Muser.php
<?php class Muser extends CI_Model { public function update($id,$in){ $this->db->where('idlog', $id); $this->db->update('tblu_user', $in); } public function update_by_id_unit($id,$in){ $this->db->where('id_unit', $id); $this->db->update('tblu_user', $in); } public function add($in){ $this->db->insert('tblu_user', $in); } public function show(){ return $this->db->get('tblu_user'); } //show semua user yang diaktifkan public function show_all(){ $this->db->from('tblu_user,tbl_wewenang'); $this->db->where('tblu_user.wewenang = tbl_wewenang.id'); return $this->db->get(); } public function del($id){ $this->db->delete('tblu_user', array('idlog' => $id)); } public function del_by_id_unit($id){ $this->db->delete('tblu_user', array('id_unit' => $id)); } public function show_super_univ(){ return $this->db->get_where('master_pra',array('idlog'=>13041977),1)->row(); } public function edit_super($super){ $this->db->where('idlog', 13041977); $this->db->update('master_pra', $super); } public function get_idlog_by_id_unit($id){ return $this->db->get_where('tblu_user',array('id_unit'=>$id)); } function terpilih(){ $this->db->where('wewenang !=',0); $this->db->where('wewenang !=',8); $this->db->where('wewenang !=',9); $q = $this->db->get('tblu_user'); $a=array(); if ($q->num_rows()>0){ foreach ($q->result() as $key) { if ($key->id_unit!=0){ $a[]=$key->wewenang; } } } return $a; } function get_keuangan(){ $this->db->where('id_unit',0); return $this->db->get('tblu_user'); } }