Пример #1
0
 function menuDinamis()
 {
     $this->loadModel('helper_model');
     $getHelper = new helper_model();
     $adminid = $this->isAdminOnline();
     // pr($adminid);
     if ($adminid) {
         $data['userid'] = $adminid['id'];
         $data = $getHelper->getMenu($data);
         // pr($data);
         $menuAkses = explode(',', $data['akses_user'][0]['menu_akses']);
         foreach ($data['menu'] as $key => $value) {
             if ($value) {
                 foreach ($value as $val) {
                     if (in_array($val['menuID'], $menuAkses)) {
                         $newData[$key][] = $val;
                     }
                 }
             }
         }
         // pr($newData);
         return $newData;
     }
     return false;
 }
Пример #2
0
 function menuData()
 {
     $this->loadModel('helper_model');
     $getHelper = new helper_model();
     $data = $getHelper->getMenuData();
     return $data;
 }
 function UserOnline()
 {
     $this->loadModel('helper_model');
     $getHelper = new helper_model();
     $online = $getHelper->getOnlineUser();
     // pr($online);
     $onlineUser = $online[0]['total'];
     return $onlineUser;
 }
 function log($action = 'surf', $comment)
 {
     $getHelper = new helper_model();
     $getHelper->logActivity($action, $comment);
 }