示例#1
0
 public static function getCountNadisl()
 {
     $modelPracivnuku = new Pracivnuku();
     $sender_pracivnuku_id = $modelPracivnuku->getUserId();
     $arr = self::model()->findAll("sender_pracivnuku_id='{$sender_pracivnuku_id}'");
     return count($arr);
 }
示例#2
0
 public function selectPermissionsPracivnuk()
 {
     $modelPrac = new Pracivnuku();
     $id_pracivnuk = $modelPrac->getUserId();
     $access = Permissions::model()->find("id_pracivnuk='{$id_pracivnuk}'");
     if (is_object($access)) {
         $permissionArray = array();
         foreach ($access as $k => $v) {
             $permissionArray[$k] = $v;
         }
         $_SESSION['permissions'] = $permissionArray;
     }
 }