Ejemplo n.º 1
0
 public function index()
 {
     model_crud::$tabel = 'phones';
     model_crud::$tabel_join = array();
     $data = (array) model_crud::read()[0];
     $data['modem_status'] = $this->lib_daemon->modem_status();
     $this->load->view('theme/theme_kepala');
     $this->load->view('status', $data);
     $this->load->view('theme/theme_kaki');
 }
Ejemplo n.º 2
0
 public static function read_anggota($array_grup)
 {
     model_crud::$tabel = 'pbk';
     model_crud::$tabel_join = array('pbk_relasi' => 'pbk.pbk_id = pbk_relasi.pbk_id');
     $anggota_grup = model_crud::read(array('grup_id' => $array_grup), array(), 'pbk.*', true);
     $objek = array();
     foreach ($anggota_grup as $anggota) {
         $objek[] = new model_kontak($anggota);
     }
     return $objek;
 }
Ejemplo n.º 3
0
 public function __construct($data)
 {
     $this->id = $data->pbk_id;
     $this->nama = $data->nama;
     $this->nomor = $data->nomor;
     $this->keterangan = $data->keterangan;
     model_crud::$tabel = 'pbk_relasi';
     model_crud::$tabel_join = array();
     $relasi_array = model_crud::read(array('pbk_id' => $data->pbk_id));
     if ($relasi_array !== false) {
         foreach ($relasi_array as $relasi) {
             $this->anggota[] = $relasi->grup_id;
         }
     }
 }