param('episode_id'); if(!$episode_id) Response::redirect('/home'); $episode = Model_Movie::find_by_pk($episode_id); if(!$episode) Response::redirect('/home'); Lang::load('movie'); Lang::load('action'); $body = View::forge('episode/index'); $this->template->title = $episode->getTvShow()->title . ' S' . $episode->getSeason()->number . ' - E' .$episode->number . ' ' . $episode->title; $seasons = $episode->getTvShow()->getSeasons(); $episodes = $episode->getSeason()->getEpisodes(); $body->set('episode', $episode); $body->set('seasons', $seasons); $body->set('episodes', $episodes); $this->template->body = $body; } }