public function process($action = "") { global $id; switch ($action) { case "edit": $collection = new cms_collection($id); print $collection->get_form(); break; case "delete": $collection = new cms_collection($id); $collection->delete(); $this->fetch_datas(); print $this->get_table(); break; case "save": $collection = new cms_collection(); $collection->save_form(); $this->fetch_datas(); print $this->get_table(); break; case "list": default: print $this->get_table(); break; } }