public function visit($type, $contentID = false) { switch ($type) { case FeedContentTypes::USER_CONTENT: $ugc = new Content_model(); $item = $ugc->get_by_id($contentID); if ($item) { $this->load->view('content_vote', array('item' => $item, 'voteUpUrl' => site_url('content/up/' . $item->ContentID), 'voteDownUrl' => site_url('content/down/' . $item->ContentID))); } else { die('No content found with given ID...'); } break; default: header('Location: ' . site_url('')); break; } }