Exemplo n.º 1
0
 function getUsermenu()
 {
     $app = classes_Singleton::getInstance('classes_controller_ApplicationController');
     $action = classes_Singleton::getInstance('classes_controller_ActionController');
     $allowedActions = $this->dao->getAllowedActionsToUser($this->id);
     $menu = null;
     foreach ($allowedActions as $action) {
         if (!empty($action['menuname']) && $action['inmenu']) {
             if (empty($action['menulevel2'])) {
                 $menu[$action['menulevel1']]['items'][] = array('target' => SITE_ROOT . '/' . $action['application'] . '/' . $action['action'] . '/', 'name' => $action['menuname']);
             } else {
                 $menu[$action['menulevel1']]['submenus'][$action['menulevel2']][] = array('target' => SITE_ROOT . '/' . $action['application'] . '/' . $action['action'] . '/', 'name' => $action['menuname']);
             }
         }
     }
     return $menu;
 }
Exemplo n.º 2
0
 public function deleteOldSessionId($userId, $sessionId, $phpSessId)
 {
     $dao = classes_Singleton::getInstance('classes_dao_sessionDAO');
     $res = $dao->execute(' delete from session where user_id = ?  and id <> ? and phpsessid = ?  ', array($userId, $sessionId, $phpSessId));
     return true;
 }