get("authkeys", "accountid", ["key" => $VARS["key"]]); if (!$database->has("accounts", ["AND" => ["accountid" => $accountid, "type" => 2]])) { sendJsonResp($Strings->get("Only receivers may broadcast their location to the map.", false), "ERROR"); } $database->update("accounts", [ "latitude" => $VARS["latitude"], "longitude" => $VARS["longitude"], "lastgpsfix" => date("Y-m-d H:i:s") ], ["accountid" => $accountid]); sendJsonResp();