" . $pd . $ret . "";
exit;
}
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " ");
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " ");
if ($gcddistsquaredtwo >= 0.0) $ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
if ($gcddistsquaredtwo >= 0.0) $retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
if ($gcddistsquaredthree >= 0.0) $ret=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
if ($gcddistsquaredthree >= 0.0) $retmore=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
echo "
function lookoutfortop() { if (parent.document.getElementById('getmell')) { parent.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else if (top.document.getElementById('nearest')) { if (top.document.getElementById('getmell')) { top.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else { top.document.getElementById('nearest').innerHTML=\"" . $pd . $ret . "\"; } top.window.scrollTo(0,0); } else { if (top.document.getElementById('getmell')) { document.body.innerHTML=\"" . $pd . $retmore . "\"; } else { document.body.innerHTML=\"" . $pd . $ret . "\"; } } } " . $pd . $ret . ""; //$ret;
exit;
} else if ($latlongdistsquared >= 0.0) {
//echo $latlongdistsquared . " " . $latlongdistsquaredtwo;
//exit;
$ret="
Please see Nearest TimeZone Places below ... ";
$retmore="
Please see Nearest TimeZone Places below ... ";
$gcddistsquared=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best1], $nearlongitude[$best1]);
$gcddistsquaredll=" data-ll='(" . $nearlatitude[$best1] . ',' . $nearlongitude[$best1] . ")' ";
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
if ($latlongdistsquaredtwo >= 0.0) {
$ret=str_replace(" size=2 ", " size=3 ", $ret);
$retmore=str_replace(" size=2 ", " size=3 ", $retmore);
$gcddistsquaredtwo=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best2], $nearlongitude[$best2]);
$gcddistsquaredtwoll=" data-ll='(" . $nearlatitude[$best2] . ',' . $nearlongitude[$best2] . ")' ";
if ($latlongdistsquaredthree >= 0.0) {
$ret=str_replace(" size=3 ", " size=4 ", $ret);
$retmore=str_replace(" size=3 ", " size=4 ", $retmore);
$gcddistsquaredthree=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best3], $nearlongitude[$best3]);
$gcddistsquaredthreell=" data-ll='(" . $nearlatitude[$best3] . ',' . $nearlongitude[$best3] . ")' ";
if ($gcddistsquared <= $gcddistsquaredtwo && $gcddistsquared <= $gcddistsquaredthree) {
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
if ($gcddistsquaredtwo <= $gcddistsquaredthree) {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best2]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best3]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
} else {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best3]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best2]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
}
} else if ($gcddistsquaredtwo <= $gcddistsquared && $gcddistsquaredtwo <= $gcddistsquaredthree) {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best2]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
if ($gcddistsquared <= $gcddistsquaredthree) {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best3]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
} else {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best3]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
}
} else {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best3]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
if ($gcddistsquared <= $gcddistsquaredtwo) {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best2]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
} else {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best2]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
}
}
} else if ($gcddistsquared <= $gcddistsquaredtwo) {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best2]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
} else {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best2]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $retmore);
}
} else {
$otz = new DateTimeZone("UTC"); // "Europe/London"
$tz = new DateTimeZone($nearname[$best1]);
$origin_dt = new DateTime("now", $otz);
$remote_dt = new DateTime("now", $tz);
$dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
$cloc = $tz->getLocation(); $ctrycode = $cloc['country_code']; $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
if ($offset < 0) {
$coffset=$offset;
} else {
$coffset="+" . $offset;
}
$ret=str_replace("", "
" . $nearname[$best1] . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
$retmore=str_replace("", "
" . $nearname[$best1] . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) . ") ", $ret);
}
if ($pd != "") {
$ppd='
' . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . ' = 0.0) $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best2]), $ppd);
if ($gcddistsquaredthree >= 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd);
$pd=substr($pd,0,1) . str_replace('
= 0.0) {
$ppd='
' . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . ' = 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd);
$pd=substr($pd,0,1) . str_replace('
= 0.0) {
$ppd='
' . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . ' " . $pd . $ret . "";
exit;
}
if ($retmore == "") { $retmore=$ret; }
echo "
function lookoutfortop() { if (parent.document.getElementById('getmell')) { parent.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else if (top.document.getElementById('nearest')) { if (top.document.getElementById('getmell')) { top.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\"; } else { top.document.getElementById('nearest').innerHTML=\"" . $pd . $ret . "\"; } top.window.scrollTo(0,0); } else { document.body.innerHTML=\"" . $pd . $ret . "\"; } } " . $pd . $ret . "";
exit;
}
}
}
}
}
function toeng($indow,$zn) {
return str_replace("7", "Sunday", str_replace("1", "Monday", str_replace("2", "Tuesday", str_replace("3", "Wednesday", str_replace("4", "Thursday", str_replace("5", "Friday", str_replace("6", "Saturday", ("" . substr($indow,0,1))))))))) . str_replace("~/~", $zn, substr($indow,1));
}
function great_circle_distance($talis, $gnolis, $latis, $longis) {
$ourdist=0.0;
$rgnol=(($gnolis) * pi() / 180.0);
$rtal=(($talis) * pi() / 180.0);
$rlong=(($longis) * pi() / 180.0);
$rlat=(($latis) * pi() / 180.0);
$deltalong = abs(((($gnolis)-($longis)) * pi() / 180.0));
$acof = (sin($rtal) * sin($rlat)) + (cos($rtal) * cos($rlat) * cos($deltalong)); // via //en.wikipedia.org/wiki/Great-circle_distance ... thanks
$ourdist = (round((acos($acof) * 6371000.0) + 0.00001) * 100) / 100;
return $ourdist;
}
function localtimefromtogmt($indate, $fromtz, $totz) { // thanks to //stackoverflow.com/questions/13698779/timezone-with-dst-handling-by-php
global $lastTime, $lastnonutc, $rightnow, $bestemojicodepoint, $thisemojicodepoint, $gmtdatetimeis, $gmthhris, $gmthris, $gmtminis, $bestemojiclass, $thisemojiclass;
$thisemojiclass="";
if ($indate != "now" && (strpos($indate, "+") !== false || strpos($indate, "-") !== false || strlen($indate) <= 5)) {
date_default_timezone_set('Australi' . 'a/Perth'); // YOUR timezone, of the server
$date = new DateTime("now", new DateTimeZone('Australi' . 'a/Perth')); // USER's timezone
$hoff=intval(str_replace('+','',$indate)) * 60;
if ($hoff >= 0) {
$minis=($hoff % 60);
$hris=(($hoff - $minis) / 60);
if (($gmtminis + $minis) >= 60) {
if (((1 + $hris + $gmthhris) % 24) >= 12) {
$thisemojiclass=" nighttime";
}
$hris=($hris % 12) + 1;
$minis=(($gmtminis + $minis) % 60);
} else {
if ((($hris + $gmthhris) % 24) >= 12) {
$thisemojiclass=" nighttime";
}
$minis=($gmtminis + $minis);
}
$hris=($gmthhris + $hris);
if ($hris > 12) {
$hris=($hris % 12);
}
} else {
$minis=((0 - $hoff) % 60);
$hris=(((0 - $hoff) - $minis) / 60);
if (($gmtminis - $minis) < 0) {
if (((-1 - $hris + 24 + $gmthhris) % 24) >= 12) {
$thisemojiclass=" nighttime";
}
$hris=($hris % 12) - 1;
if ($hris == 0) $hris=12;
$minis=(($gmtminis - $minis) + 60);
} else {
if ((($gmthhris - $hris + 24) % 24) >= 12) {
$thisemojiclass=" nighttime";
}
$minis=($gmtminis - $minis);
}
$hris=($gmthris - $hris);
if ($hris < 1) $hris=($hris + 12);
}
if ($minis > 45 && $hris == 12) {
$thisemojicodepoint=128336;
} else if ($minis >= 45) {
$thisemojicodepoint=128336 + $hris;
} else if ($minis <= 15) {
$thisemojicodepoint=128335 + $hris;
} else {
$thisemojicodepoint=128347 + $hris;
}
$zzb="";
if ($minis < 10) $zzb="0";
if ($thisemojiclass == " nighttime" && $hris < 12) {
$lastTime=($hris + 12) . ':' . $zzb . $minis;
} else {
$lastTime=$hris . ':' . $zzb . $minis;
}
//echo $thisemojicodepoint;
//exit;
} else {
date_default_timezone_set('Australi' . 'a/Perth'); // YOUR timezone, of the server
if ($fromtz == 'UTC') {
$date = new DateTime($indate, new DateTimeZone('UTC')); // USER's timezone
$date->setTimezone(new DateTimeZone($totz));
} else {
//echo $fromtz;
//exit;
if ($fromtz == 'Australi' . 'a/Perth') {
$date = new DateTime($indate);
} else {
echo '*' . $fromtz . '*';
exit;
$date = new DateTime($indate, new DateTimeZone($fromtz)); // USER's timezone
}
$date->setTimezone(new DateTimeZone('UTC'));
if ($totz != 'UTC') {
$lastnonutc=$totz;
$date = localtimefromtogmt($date, 'UTC', $totz);
} else {
// 1 o'clock is 🕐
// 2 o'clock is 🕑
// 12 o'clock is 🕛
// 2:30 is 🕝
// 11:30 is 🕦
// 12:30 is 🕧
$gmtdatetimeis=$date->format('D Y-m-d H:i:s') . " GMT at time of first display";
$hrntis=intval($date->format('H'));
$gmthhris=$hrntis;
$bestemojiclass="";
if ($hrntis >= 12) $bestemojiclass=" nighttime";
$hris=intval($date->format('h'));
$minis=intval($date->format('i'));
$gmthris=$hris;
$gmtminis=$minis;
if ($minis > 45 && $hris == 12) {
$bestemojicodepoint=128336;
} else if ($minis >= 45) {
$bestemojicodepoint=128336 + $hris;
} else if ($minis <= 15) {
$bestemojicodepoint=128335 + $hris;
} else {
$bestemojicodepoint=128347 + $hris;
}
$zzb="";
if ($minis < 10) $zzb="0";
if ($bestemojiclass == " nighttime" && $hris < 12) {
$lastTime=($hris + 12) . ':' . $zzb . $minis;
} else {
$lastTime=$hris . ':' . $zzb . $minis;
}
//echo $bestemojicodepoint;
}
}
}
return $date; //->format('Y-m-d H:i:s');
}
function ourtimezonelist($ididea) { // thanks to //php.net/manual/en/function.timezone-identifiers-list.php
global $lastTime, $rightnow, $kcnt, $formstuff, $hprefix, $hsuffix, $sellong;
$tzn="";
$selstuff="";
if (isset($_GET['tzname'])) {
$tzn=urldecode($_GET['tzname']);
if (strpos($tzn,"/") === false && strpos($tzn,"-") === false && strpos($tzn,"+") === false && $tzn != "") $tzn="+" . trim($tzn);
//echo $tzn;
//exit;
}
if ($ididea == "szt" && $tzn != "") {
$places="Places";
if (strpos($hprefix, "
";
//$prefix="";
} else {
$prefix="";
}
$hprefix="";
$suffix="";
$ourmapstuff="";
$yourmapstuff="";
$formstuff="";
$extrad="";
$timezone_abbreviations = DateTimeZone::listAbbreviations();
foreach ($timezone_abbreviations["est"] as $tzo) {
$betteroff=0;
$okay=false;
//echo str_replace("+","",urldecode($_GET['tzname'])) . ' ' . ('' . ($tzo['offset'] / 3600)) . ' ' . $tzo['timezone_id'];
//exit;
//echo $tzn . ' ' . $tzo['timezone_id'];
//exit;
//echo (str_replace("%2B","+",$_GET['tzname']));
//exit;
//echo (3600 * str_replace("+","",$_GET['tzname'])) . " " . $tzo['offset'];
//exit;
if (strpos($tzo['timezone_id'], $tzn) !== false) {
$tz = new DateTimeZone($tzo['timezone_id']);
$bnow = new DateTime(null, $tz);
$betteroff=$bnow->getOffset();
//echo "betteroff=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " ";
$okay=true;
//if (strpos($tzo['timezone_id'], "Auckland") !== false) {
// echo "A " . $tzn . ' ' . $tzo['timezone_id'];
// exit;
//}
} else if (str_replace("+","",urldecode($_GET['tzname'])) == ('' . ($tzo['offset'] / 3600))) {
$tz = new DateTimeZone($tzo['timezone_id']);
$bnow = new DateTime(null, $tz);
$betteroff=$bnow->getOffset();
//echo "betteroff=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " ";
$okay=true;
//if (strpos($tzo['timezone_id'], "Auckland") !== false) {
// echo "B " . $tzn . ' ' . $tzo['timezone_id'];
// exit;
//}
} //else {
//if (strpos($tzo['timezone_id'], "Auckland") !== false) {
// echo "C " . $tzo['offset'] . " " . $tzn . ' ' . $tzo['timezone_id'];
// exit;
//}
//}
if ($okay) {
$zoneName = $tzo['timezone_id'];
$loc = $tz->getLocation();
if ($loc[latitude] != 0 || $loc[longitude] != 0) {
if ($betteroff < 0) {
$coffset=($betteroff / 3600);
} else {
$coffset="+" . ($betteroff / 3600);
}
//echo "bEtteroff=" . $betteroff . " And coffset=" . $coffset . " ";
//if ($tzo['offset'] < 0) {
// $coffset=($tzo['offset'] / 3600);
//} else {
// $coffset="+" . ($tzo['offset'] / 3600);
//}
$zbits=explode("/",$zoneName);
if ($ourmapstuff == "") {
$formstuff="";
//$ourzoneName=$zoneName;
if (isset($_GET['lat']) && isset($_GET['long']) && isset($_GET['place'])) {
//$places=$_GET['place'];
//$zbits[-1 + sizeof($zbits)]=$places;
//$ourzoneName=$places;
//$loc[latitude]=urldecode($_GET['lat']);
//$loc[longitude]=urldecode($_GET['long']);
$wlinkh="";
if (isset($_GET['wlink'])) $wlinkh=" ";
//localtimefromtogmt(('' . $tzo['offset'] / 3600), 'Australi' . 'a/Perth', 'UTC');
//if ($rightnow != "") $wlinkh.=" ";
if ($formstuff == "") $formstuff=" function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); ";
$formstuff=str_replace('" name="data"', ',[' . urldecode($_GET['lat']) . ',' . urldecode($_GET['long']) . ',~' . $_GET['place'] . '~]" name=data', $formstuff);
$ourmapstuff=" document.getElementById('smapif').click(); ";
}
if ($ourmapstuff == "") $ourmapstuff=" document.getElementById('smapif').click(); ";
$yourmapstuff=" ";
//$formstuff=" function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); ";
if ($formstuff == "") $formstuff=" function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); ";
$formstuff=str_replace('" name="data"', ',[' . $loc[latitude] . ',' . $loc[longitude] . ',~' . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . '~]" name="data"', $formstuff);
} else {
$ourmapstuff=str_replace(">";
$suffix.=" ";
}
}
$prepretitlebit="";
if ($prepretitlebit == "" && isset($_GET['iso'])) {
$prepretitlebit=$_GET['iso'];
}
$zbits=explode("/",$zoneName);
$extrad="";
if ($tzo['dst'] === true) {
$tzq = new DateTimeZone($zoneName);
$bnow = new DateTime(null, $tzq);
$betteroff=$bnow->getOffset();
//echo "betteroff=" . $betteroff . " And tZo[offset]=" . $tzo['offset'] . " ";
//$extrad="⏰
";
$extrad="⏰
";
} else { // new
$tzq = new DateTimeZone($zoneName);
$bnow = new DateTime(null, $tzq);
$betteroff=$bnow->getOffset();
//echo "betteroFf=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " ";
}
if ($prepretitlebit == "") $prepretitlebit=$loc['country_code'];
$pretitlebit=explode('"' . $prepretitlebit . '">', $sellong)[1];
$titlebit=explode("<", $pretitlebit)[0] . "/" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . ($tzo['offset'] / 3600);
//localtimefromtogmt(('' . $tzo['offset'] / 3600), 'Australi' . 'a/Perth', 'UTC');
localtimefromtogmt(('' . $betteroff / 3600), 'Australi' . 'a/Perth', 'UTC');
if (strpos($titlebit,"Optionally Select Country of Interest below ...") !== false) {
$selstuff.=$prefix . " " . $zoneName . " 📹
" . $extrad . " = " . $loc['comments'] . " ... " . $coffset . "" . str_replace("","","" . $thisemojicodepoint . ";") . "
" . $suffix . " ";
} else {
$selstuff.=$prefix . " " . $zoneName . " 📹
" . $extrad . " = " . $loc['comments'] . " ... " . $coffset . "" . str_replace("","","" . $thisemojicodepoint . ";") . "
" . $suffix . " ";
}
$prefix="";
$suffix="";
}
}
//if (strpos($tzo['timezone_id'], 'Auckland') !== false) {
// echo str_replace("+","",urldecode($_GET['tzname'])) . ' ' . ('' . ($tzo['offset'] / 3600)) . ' ' . $tzo['timezone_id'];
// exit;
//}
}
$selstuff.=" " . $yourmapstuff . "
";
$ididea="tzs";
//if (strpos($hprefix, "Local Time Zone GMT ';
for ($xoff=-24.0; $xoff<=24.0; $xoff+=0.5) {
$selstuff=str_replace("", "" . str_replace("+-","-",("+" . $xoff . " hours")) . " ", $selstuff);
}
$versus=file_get_contents("tz_places.php");
$zones = timezone_identifiers_list();
foreach ($zones as $zone) {
$origzone=$zone;
//$ourtz=new DateTimeZone($zone);
$zzbit=$zone;
//$ootz = new DateTimeZone($zone);
//$oocloc = $ootz->getLocation();
//$ooctrycode = $oocloc['country_code'];
$zone = explode('/', $zone); // 0 => Continent, 1 => City
// Only use "friendly" continent names
if ($zone[0] == 'Africa' || $zone[0] == 'America' || $zone[0] == 'Antarctica' || $zone[0] == 'Arctic' || $zone[0] == 'Asia' || $zone[0] == 'Atlantic' || $zone[0] == 'Australia' || $zone[0] == 'Europe' || $zone[0] == 'Indian' || $zone[0] == 'Pacific') {
if (isset($zone[1]) != '') {
if (strpos($versus, '"' . $zzbit . '"') === false && strpos($versus, '"' . '' . '"];') !== false && strpos($versus, '"' . ' ' . '"];') !== false && strpos($versus, '"' . ' ' . '"];') !== false) {
$ourtz=new DateTimeZone($zzbit);
$versus=str_replace('"' . '' . '"];', '"' . $zzbit . '","' . '' . '"];', $versus);
$versus=str_replace('"' . ' ' . '"];', '"' . $ourtz->getLocation()[latitude] . '","' . ' ' . '"];', $versus);
$versus=str_replace('"' . ' ' . '"];', '"' . $ourtz->getLocation()[longitude] . '","' . ' ' . '"];', $versus);
if (sizeof($zone) == 3) {
$abbr="";
try {
$zzdt = new DateTime('now', new DateTimeZone($zone[0] . '/' . $zone[1] . '/' . $zone[2])); //$zzbit));
$abbr = $zzdt->format('T');
//exec("ksh -c 'TZ=" . $zone[0] . '/' . $zone[1] . '/' . $zone[2] . " date > x.x'");
} catch (Exception $eonee) {
$abbr="";
}
if ($abbr == "") { $abbr="UTC"; }
} else {
$abbr="";
try {
$zzdt = new DateTime('now', new DateTimeZone($zone[0] . '/' . $zone[1])); //$zzbit));
$abbr = $zzdt->format('T');
//exec("ksh -c 'TZ=" . $zone[0] . '/' . $zone[1] . " date > x.x'");
} catch (Exception $etwoe) {
$abbr="";
}
if ($abbr == "") { $abbr="UTC"; }
}
$versus=str_replace('"' . ' ' . '"];', '"' . $abbr . '","' . ' ' . '"];', $versus);
@file_put_contents("tz_places.php", $versus);
echo '';
//header("Location: ./tz_places.php?upto=" . $zzbit);
exit;
}
//$locations[$zone[0]][$zone[0]. '/' . $zone[1]] = str_replace('_', ' ', $zone[1]); // Creates array(DateTimeZone => 'Friendly name')
//$ourtz=new DateTimeZone(str_replace('_', ' ', $zone[0]. '/' . $zone[1]));
//$selstuff=str_replace("", "" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . " ", $selstuff);
//$selstuff=str_replace("", "" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . " ", $selstuff);
//$selstuff=str_replace("", "" . str_replace('_', ' ', str_replace("/" . $zone[-1 + sizeof($zone)], "", $zzbit). '/' . $zone[-1 + sizeof($zone)]) . " ", $selstuff);
$selstuff=str_replace("", "" . str_replace('_', ' ', str_replace("/" . $zone[-1 + sizeof($zone)], "", $zzbit). '/' . $zone[-1 + sizeof($zone)]) . " ", $selstuff);
//$selstuff=str_replace("", "" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . " ", $selstuff);
}
}
}
if (isset($_GET['tzname'])) {
if (strpos($selstuff, ("'" . urldecode($_GET['tzname']) . "'>")) !== false) {
$selstuff=str_replace(("'" . urldecode($_GET['tzname']) . "'>"),("'" . urldecode($_GET['tzname']) . "' selected>"),$selstuff);
}
}
return $selstuff;
}
if (isset($_GET['upto'])) {
ourtimezonelist($ideais);
}
find_nearest();
echo "
TimeZone Places - RJM Programming - December, 2016 ... Thanks to //php.net/manual/en/datetimezone.getlocation.php and //stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name