Esempio n. 1
0
 public function setViewVars()
 {
     $geo_type = new GeoTypeModel();
     $this->_view->assign('geo_types', $geo_type->loadAll());
     if ($this->session->geo_type_id) {
         $country = new CountryModel();
         $this->_view->assign('countries', $country->loadAll());
     }
     if ($this->session->country_id) {
         $city = new CityModel();
         $this->_view->assign('cities', $city->loadByCountry($this->session->country_id));
     }
     if ($this->session->geo_type_id && $this->session->city_id) {
         $geo_subtype = new GeoSubtypeModel();
         $this->_view->assign('geo_subtypes', $geo_subtype->loadByType($this->session->geo_type_id));
     }
     if ($this->session->geo_subtype_id && $this->session->city_id) {
         $geo_place = new GeoPlaceModel();
         $this->_view->assign('geo_places', $geo_place->load($this->session->geo_subtype_id, $this->session->city_id));
     }
     $this->_view->assign('my_places', $this->user->loadGeoPlaces());
 }