|
|
@ -19,23 +19,25 @@ $database->update("players", [
|
|
|
|
"accountid" => getRequestUser()->getUID()
|
|
|
|
"accountid" => getRequestUser()->getUID()
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
$radius = 2;
|
|
|
|
|
|
|
|
if (!empty($VARS["radius"])) {
|
|
|
|
|
|
|
|
$radius = min(10.0, $VARS["radius"] * 1.0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$searchbounds = $userlocation->boundingCoordinates($radius, "miles");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$where = [
|
|
|
|
$where = [
|
|
|
|
"LIMIT" => 100,
|
|
|
|
"LIMIT" => 100,
|
|
|
|
"ORDER" => "time"
|
|
|
|
"ORDER" => "time"
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$radius = false;
|
|
|
|
|
|
|
|
if (!empty($VARS["radius"])) {
|
|
|
|
|
|
|
|
$radius = min(10.0, $VARS["radius"] * 1.0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($radius != false) {
|
|
|
|
|
|
|
|
$searchbounds = $userlocation->boundingCoordinates($radius, "miles");
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($VARS["latitude"]) && !empty($VARS["longitude"])) {
|
|
|
|
if (!empty($VARS["latitude"]) && !empty($VARS["longitude"])) {
|
|
|
|
$where["AND"] = [
|
|
|
|
$where["AND"] = [
|
|
|
|
'lat[<>]' => [$searchbounds[0]->getLatitudeInDegrees(), $searchbounds[1]->getLatitudeInDegrees()],
|
|
|
|
'lat[<>]' => [$searchbounds[0]->getLatitudeInDegrees(), $searchbounds[1]->getLatitudeInDegrees()],
|
|
|
|
'long[<>]' => [$searchbounds[0]->getLongitudeInDegrees(), $searchbounds[1]->getLongitudeInDegrees()],
|
|
|
|
'long[<>]' => [$searchbounds[0]->getLongitudeInDegrees(), $searchbounds[1]->getLongitudeInDegrees()],
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ob_flush();
|
|
|
|
ob_flush();
|
|
|
|
$database->debug()->select("messages", [
|
|
|
|
$database->debug()->select("messages", [
|
|
|
|