public static function SetupLocationData($content) { $content['timezone'] = array('timezone' => $content['timezone']); $content = array_merge($content, Atlas::getCoordinates($content)); $content = array_merge_recursive($content, array('timezone' => Atlas::getTimeZone(time(), $content['timezone']['timezone']))); $content['timezone']['string'] = Atlas::getTimeZoneString($content['timezone']); $html = array(); $html[] = $content['long']['degrees'] . '°' . $content['long']['min'] . '′' . $content['long']['direction']; $html[] = ' '; $html[] = $content['lat']['degrees'] . '°' . $content['lat']['min'] . '′' . $content['lat']['direction']; $content['location_string'] = join('', $html); $content['city_string'] = sprintf('%s, %s, %s <small class="autocomplete">%s UTC %s</small>', $content['name'], $content['region_name'], $content['country_name'], $content['location_string'], $content['timezone']['string']); $content['city_string_home'] = sprintf('%s, %s, %s <small>%s UTC %s</small>', $content['name'], $content['region_name'], $content['country_name'], $content['location_string'], $content['timezone']['string']); return $content; }
public function show_country_in_profile($name, $country = '') { $countries = Atlas::GetCountries(); if (!empty($country)) { $selected = $country; } else { $selected = Atlas::GetCountryByIp(); } echo '<select name="' . $name . '" id="' . $name . '">'; foreach ($countries as $country) { if ($country['country_code'] == $selected) { echo '<option value="' . $country['country_code'] . '" selected="selected">' . $country['country_name'] . '</option>'; } else { echo '<option value="' . $country['country_code'] . '">' . $country['country_name'] . '</option>'; } } echo '</select>'; }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = Atlas::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
Valor: ABREPRANCHA Ativa uma prancha do atlas. <abrePrancha()> */ /* Valor: ABREPRANCHA Ativa uma prancha do atlas. <abrePrancha()> */ case "ABREPRANCHA": include_once "classe_atlas.php"; $atl = new Atlas($xml); $retorno = $atl->abrePrancha($atlasId, $pranchaId, $map_file, $locaplic); break; } if (!connection_aborted()) { if ($map_file != "") { restauraCon($map_file, $postgis_mapa); } cpjson($retorno); } else { exit; } function gravaid() { global $atlasId_, $tmpfname; //a variavel tmpfname vem do ms_criamapa.php
private function setTodaysChart() { list($mm, $numday, $yyyy, $fullmonth, $dow, $hours, $minutes, $am_pm) = split('[/.-]', date("m.d.Y.F.w.g.i.a", $this->_Page['sun']['sunrise'])); $this->_TodaysChartInput['timezone'] = Atlas::getTimeZone($this->_Page['sun']['sunrise'], $this->_Page['placeSearch']['timezone']['timezone']); $this->_TodaysChartInput['longitude'] = $current_location['longitude']; $this->_TodaysChartInput['latitude'] = $current_location['latitude']; $this->_TodaysChartInput['day'] = $numday; $this->_TodaysChartInput['month'] = $mm; $this->_TodaysChartInput['year'] = $yyyy; $this->_TodaysChartInput['hour'] = $hours; $this->_TodaysChartInput['min'] = $minutes; $this->_TodaysChartInput['report_name'] = 'Todays Chart At Sunrise'; $this->_TodaysChartInput['city'] = $this->_Page['city']; $this->_TodaysChartInput['country'] = $this->_Page['country']; $this->_TodaysChartInput['am_pm'] = $am_pm; $this->_TodaysChartInput['sex'] = 'female'; $this->_TodaysChartInput['has_all_info'] = true; $todayTransits = new AstroReport($this->_TodaysChartInput); $this->_Page['todayPlanet'] = $todayTransits->getPlanets(); }