*/ class Shares extends MY_Controller { /** * Constructor. */ public function __construct() { parent::__construct(); } /** * Shows a list of all projects. */ public function index() { $data['projects'] = $this->share->getByUserId($this->session->userdata('user_id')); $this->load->view('shares/list', $data); } /** * Allows users to mark all shared projects as seen. */ public function mark_all_seen() { $shares = $this->share->getByUserId($this->session->userdata('user_id')); foreach ($shares as $share) { if ($share['seen'] == 0) { $this->share->markSeen($share['project_id']); } } redirect('shares', 303); } } /* End of file shares.php */ /* Location: ./application/controllers/shares.php */