public function security($current)
 {
     $user = $this->session->userdata('user');
     if (!empty($user)) {
         if (has_acces($user, $current)) {
             $page_data = array();
             $page_data['current'] = $current;
             $page_data['description'] = '';
             $page_data['user'] = $user;
             $page_data['user_company'] = $this->user_companies->list_users_company(1, '', 1, $user->id);
             $page_data['avatar'] = $this->users->get_avatar($user);
             //$page_data['my_recent_5_cards'] = $this->users->list_cards($user->id);
             //$page_data['my_recent_5_storyboards'] = $this->users->list_storyboards($user->id);
             //var_dump($page_data['cards']);
             //$page_data['notifications'] = $this->user_circles->notifications($user->id);
             $page_data['notifications'] = array();
             return $page_data;
         } else {
             redirect('authorization');
         }
     } else {
         redirect('login');
     }
     return false;
 }
 public function security($current)
 {
     $user = $this->session->userdata('user');
     if (!empty($user)) {
         if (has_acces($user, $current)) {
             $page_data = array();
             $page_data['current'] = $current;
             $page_data['description'] = '';
             $page_data['user'] = $user;
             $page_data['avatar'] = $this->users->get_avatar($user);
             $page_data['my_circles'] = $this->circles->list_my_cirles($user->id, "2");
             $page_data['all_accessible_cards_number'] = count($this->cards->cards_shared_with_user($user->id, '', false));
             $page_data['all_accessible_storyboards_number'] = count($this->storyboards->all_accessible_storyboards($user->id, '', false));
             $page_data['all_circles'] = $this->circles->list_all_cirles();
             $page_data['my_recent_5_cards'] = $this->users->list_cards($user->id);
             $page_data['my_recent_5_storyboards'] = $this->users->list_storyboards($user->id);
             //var_dump($page_data['cards']);
             $page_data['notifications'] = $this->user_circles->notifications($user->id);
             return $page_data;
         } else {
             redirect('authorization');
         }
     } else {
         redirect('login');
     }
     return false;
 }
Ejemplo n.º 3
0
if (!empty($all_circles)) {
    foreach ($all_circles as $c) {
        if (!is_id_in_elmts_array($c['id'], $my_circles)) {
            echo '<li>';
            echo '  <a href="' . site_url('circle/view/' . $c['id']) . '">';
            echo '    <i class="fa fa-circle-o m-r-10 orange" style="width:14px;"></i>' . $c['name'];
            echo '  </a>';
            echo '</li>';
        }
    }
}
?>
          </ul>
        </li>
        <?php 
if (has_acces($user, "/card/")) {
    ?>
          <li class="<?php 
    echo module_active($current, 'My Cards') ? 'start active open' : '';
    ?>
"> 
            <a href="<?php 
    echo site_url('/card/');
    ?>
">
              <i class="fa fa-th-large"></i>
              <span class="title">My Cards</span>
            </a>
          </li>
        <?php 
}