Beispiel #1
0
 public function tes()
 {
     $this->load->model('user_model');
     $r = new User_model();
     $user = $r->getData(1, 'id');
     var_dump($user->hasPrivilage('edit_user'));
 }
 function restart()
 {
     $user = new User_model();
     $dataU = $user->getData();
     $content_view = $this->view->fetch('menu_view', array('data' => $dataU));
     $this->view->display(LAYOUT, array('content' => $content_view));
 }
Beispiel #3
0
 public function run($id_user)
 {
     $u = new User_model();
     $user = $u->getData($id_user, "id");
     $this->crawlUp(serialize($user), $user->dataUser->id, 8);
     if (count($this->bonus_queue) > 0 and $this->cekBelumDiproses($user->dataUser->id)) {
         return $this->db->insert_batch("bonus_queue", $this->bonus_queue);
     } else {
         return false;
     }
 }
Beispiel #4
0
 public function getDownline($aktif = true)
 {
     $where = $aktif ? "AND status = 'aktif'" : "";
     $downline_data = $this->db->query("SELECT id_user FROM members WHERE id_referral = '" . $this->dataMember->id_user . "' {$where}")->result();
     $downline_obj = array();
     foreach ($downline_data as $key => $value) {
         $user_model = new User_model();
         $downline_obj[] = $user_model->getData($value->id_user, 'id');
     }
     return $downline_obj;
 }
Beispiel #5
0
 function menu()
 {
     Sesion::obtenerInstancia()->validarSesion();
     $user = new User_model();
     $dataU = $user->getData();
     $content_view = $this->view->fetch('menu_view', array('data' => $dataU));
     $this->view->display('layout_view', array('content' => $content_view));
 }