Ejemplo n.º 1
0
 ***************************************************************************/
require __DIR__ . '/lib2/web.inc.php';
$tpl->name = 'coordinates';
$tpl->popup = true;
$lat_float = 0;
if (isset($_REQUEST['lat'])) {
    $lat_float += $_REQUEST['lat'];
}
$lon_float = 0;
if (isset($_REQUEST['lon'])) {
    $lon_float += $_REQUEST['lon'];
}
$cache_country = isset($_REQUEST['country']) ? $_REQUEST['country'] : false;
$cache_desclang = isset($_REQUEST['desclang']) ? $_REQUEST['desclang'] : false;
$coord = new coordinate($lat_float, $lon_float);
$tpl->assign('coordDeg', $coord->getDecimal());
$tpl->assign('coordDegMin', $coord->getDecimalMinutes());
$tpl->assign('coordDegMinSec', $coord->getDecimalMinutesSeconds());
$tpl->assign('coordUTM', $coord->getUTM());
$tpl->assign('coordGK', $coord->getGK());
$tpl->assign('coordRD', $coord->getRD());
$tpl->assign('showRD', $coord->nLat >= 45 && $coord->nLat <= 57 && $coord->nLon >= 0 && $coord->nLon <= 15);
$tpl->assign('coordQTH', $coord->getQTH());
$tpl->assign('coordSwissGrid', $coord->getSwissGrid());
// build priority list of W3W languages to display
// 1. current page locale
$w3w_langs = array();
if ($opt['locale'][$opt['template']['locale']]['what3words']) {
    $w3w_langs[] = $opt['template']['locale'];
}
// 2. language of the cache description