public function index() { if ($this->post->action == 'save_new_hub') { $this->save_new_hub(); } elseif ($this->post->action == 'save_edit_hub') { $this->save_edit_hub(); } else { $this->set('hubs', HubData::get_hub()); $this->set('history', HubData::get_past_hub()); $this->show('hub/hub_index.tpl'); } }