diff --git a/api/v1/get/application.php b/api/v1/get/application.php index 063589b..2c289f7 100644 --- a/api/v1/get/application.php +++ b/api/v1/get/application.php @@ -143,9 +143,9 @@ switch ($action) { case 'geolocation': if ($whereclause == ''){ - $whereclause = 'WHERE geolocation is not null'; + $whereclause = 'WHERE geolocation is not null OR geolocation != "["",""]"'; } else { - $whereclause .= ' AND geolocation is not null'; + $whereclause .= ' AND geolocation is not null OR geolocation != "["",""]'; } $sql = 'SELECT distinct(geolocation) FROM equipment e '.$whereclause.''; diff --git a/equipment_manage.php b/equipment_manage.php index 85653cc..6576273 100644 --- a/equipment_manage.php +++ b/equipment_manage.php @@ -216,6 +216,16 @@ $view .= ' $changelog = showlog('equipment',$equipment_ID)?? ''; +//GEOLOCATION +$geo_details = $equipment['geolocation'] ?? ''; +if (is_array($geo_details)) { + $geodetails_lat = $geo_details[0]; + $geodetails_lon = $geo_details[1]; +} else{ + $geodetails_lat = ''; + $geodetails_lon = ''; +} + $view .= '
@@ -225,7 +235,8 @@ $view .= '
- + + '.($update_allowed_special==1? $changelog:'').'
';