Commit cacff7a8 authored by dmorley's avatar dmorley

put n/a if location data is missing

parent f8a71171
......@@ -240,11 +240,11 @@ while ($row = pg_fetch_all($result)) {
echo '<br>';
}
if ($location) {
$country = $location['country_code'];
$city = isset($location['city']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['city']) : null;
$state = isset($location['region']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['region']) : null;
$lat = $location['latitude'];
$long = $location['longitude'];
$country = isset($location['country_code']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['country_code']) : "n/a";
$city = isset($location['city']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['city']) : "n/a";
$state = isset($location['region']) ? iconv('UTF-8', 'UTF-8//IGNORE', $location['region']) : "n/a";
$lat = isset($location['latitude']) ? $location['latitude']: "n/a";
$long = isset($location['longitude']) ? $location['longitude'] : "n/a";
//if lat and long are just a generic country with no detail lets make some tail up or openmap just stacks them all on top another
if (strlen($lat) < 4) {
$lat = $lat + (rand(1, 15) / 10);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment