function getlocations_gps_callback in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_gps/getlocations_gps.module \getlocations_gps_callback()
1 string reference to 'getlocations_gps_callback'
- getlocations_gps_menu in modules/
getlocations_gps/ getlocations_gps.module - Implements hook_menu().
File
- modules/
getlocations_gps/ getlocations_gps.module, line 353 - getlocations_gps.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_gps_callback() {
if (isset($_GET['gps_lat']) && !empty($_GET['gps_lat']) && isset($_GET['gps_lon']) && !empty($_GET['gps_lon'])) {
$latlon = $_GET['gps_lat'] . ',' . $_GET['gps_lon'];
$latlon = getlocations_latlon_check($latlon);
if (!empty($latlon)) {
$ll = explode(',', $latlon);
$lat = isset($ll[0]) ? $ll[0] : FALSE;
$lon = isset($ll[1]) ? $ll[1] : FALSE;
session_start();
$_SESSION['getlocations_gps'] = array();
$_SESSION['getlocations_gps']['lat'] = $lat;
$_SESSION['getlocations_gps']['lon'] = $lon;
}
}
return FALSE;
}