/** * content of the middle column - this is the most important part */ protected function body() { // get the translation module $words = $this->getWords(); $page_url = PVars::getObj('env')->baseuri . implode('/', PRequest::get()->request); $request = PRequest::get()->request; $callbacktag = $this->layoutkit->formkit->setPostCallback('GeoController', 'SelectorCallback'); if (!($mem_redirect = $this->layoutkit->formkit->getMemFromRedirect())) { $locations_print = ''; } elseif ($mem_redirect->location) { $Geo = new GeoController(); $locations_print = $Geo->GeoSearch($mem_redirect->location, 40, false, $callbacktag); } else { $Geo = new GeoController(); $locations_print = $Geo->GeoSearch(' ', 40, false, $callbacktag); } // Just for testing: // if (isset($_SESSION['GeoVars'])) var_dump($_SESSION['GeoVars']); // if (isset($_SESSION['GeoVars']['geonamename'])) var_dump($_SESSION['GeoVars']['geonamename']); // if (isset($request[2]) && $request[2] == 'save' && $mem_redirect->geolocation) { // $geolocation = $mem_redirect->geolocation; // list($geonameid, $geonamename) = preg_split('/[//]/', $geolocation); // $_SESSION['SignupBWVars']['geonameid'] = $geonameid; // $_SESSION['SignupBWVars']['geonamename'] = $geonamename; // print 'GEO SET'; // } else { // print 'GEO NOT SET'; // } require 'templates/popup.php'; }
public function SelectorInclude($formvars = false) { // get the translation module $words = $this->layoutkit->getWords(); $page_url = PVars::getObj('env')->baseuri . implode('/', PRequest::get()->request); $callbacktag = $this->layoutkit->formkit->setPostCallback('GeoController', 'SelectorCallback'); if ($formvars) { foreach ($formvars as $key => $value) { $callbacktag .= '<input type="hidden" name="' . $key . '" value="' . $value . '" >'; } } if (!($mem_redirect = $this->layoutkit->formkit->getMemFromRedirect())) { $locations_print = ''; } elseif ($mem_redirect->location) { $Geo = new GeoController(); $locations_print = $Geo->GeoSearch($mem_redirect->location, 40, true, $callbacktag); } else { $Geo = new GeoController(); $locations_print = $Geo->GeoSearch(' ', 40, true, $callbacktag); } // Just for testing: // if (isset($_SESSION['GeoVars'])) var_dump($_SESSION['GeoVars']); // if (isset($_SESSION['GeoVars']['geonamename'])) var_dump($_SESSION['GeoVars']['geonamename']); // if (isset($request[2]) && $request[2] == 'save' && $mem_redirect->geolocation) { // $geolocation = $mem_redirect->geolocation; // list($geonameid, $geonamename) = preg_split('/[\/\/]/', $geolocation); // $_SESSION['SignupBWVars']['geonameid'] = $geonameid; // $_SESSION['SignupBWVars']['geonamename'] = $geonamename; // print 'GEO SET'; // } else { // print 'GEO NOT SET'; // } require 'templates/popup.php'; }