No regular expressions were active.
1 |
|
<?php
|
|
1 |
|
<?php
|
|
|
2 |
|
|
2 |
|
class Radi
usAssistan
t {
|
|
3 |
|
class Radi
usAssistan
t {
|
3 |
|
|
|
4 |
|
|
4 |
|
var $m
axLat;
|
|
5 |
|
var $m
axLat;
|
5 |
|
var $m
inLat;
|
|
6 |
|
var $m
inLat;
|
6 |
|
var $m
axLong;
|
|
7 |
|
var $m
axLong;
|
7 |
|
var $m
inLong;
|
|
8 |
|
var $m
inLong;
|
8 |
|
|
|
9 |
|
|
9 |
|
functi
on RadiusA
ssistant($
Latitude,
$Longitude
, $Miles)
{
|
|
10 |
|
functi
on RadiusA
ssistant($
Latitude,
$Longitude
, $Miles)
{
|
10 |
|
global
$maxLat,
$minLat,
$maxLong,
$minLong;
|
|
11 |
|
//
global
$maxLat,
$minLat,
$maxLong,
$minLong;
|
11 |
|
$E
QUATOR_LAT
_MILE = 69
.172;
|
|
12 |
|
$E
QUATOR_LAT
_MILE = 69
.172;
|
12 |
|
$
maxLat
=
$Latitude
+
$Miles
/
$EQUATOR_L
AT_MILE;
|
|
13 |
|
$
this->
maxLat
=
$Latitude
+
$Miles
/
$EQUATOR_L
AT_MILE;
|
13 |
|
$
minLat
=
$Latitude
-
($
maxLat
-
$Latitude)
;
|
|
14 |
|
$
this->
minLat
=
$Latitude
-
($
this->
maxLat
-
$Latitude)
;
|
14 |
|
$
maxLong
=
$Longitude
+
$Miles
/
(cos($minL
at
*
M_PI
/
180)
*
$EQUATOR_L
AT_MILE);
|
|
15 |
|
$
this->
maxLong
=
$Longitude
+
$Miles
/
(cos($minL
at
*
M_PI
/
180)
*
$EQUATOR_L
AT_MILE);
|
15 |
|
$
minLong
=
$Longitude
-
($
maxLong
-
$Longitude
);
|
|
16 |
|
$
this->
minLong
=
$Longitude
-
($
this->
maxLong
-
$Longitude
);
|
16 |
|
}
|
|
17 |
|
}
|
17 |
|
|
|
18 |
|
|
18 |
|
functi
on MaxLati
tude() {
|
|
19 |
|
functi
on MaxLati
tude() {
|
19 |
|
return
$GLOBALS["
maxLat"];
|
|
20 |
|
//
return
$GLOBALS["
maxLat"];
|
|
|
21 |
|
re
turn $this
->maxLat;
|
20 |
|
}
|
|
22 |
|
}
|
21 |
|
functi
on MinLati
tude() {
|
|
23 |
|
functi
on MinLati
tude() {
|
22 |
|
return
$GLOBALS["
minLat"];
|
|
24 |
|
//
return
$GLOBALS["
minLat"];
|
|
|
25 |
|
re
turn $this
->minLat;
|
23 |
|
}
|
|
26 |
|
}
|
24 |
|
functi
on MaxLong
itude() {
|
|
27 |
|
functi
on MaxLong
itude() {
|
25 |
|
return
$GLOBALS["
maxLong"];
|
|
28 |
|
//
return
$GLOBALS["
maxLong"];
|
|
|
29 |
|
re
turn $this
->maxLong;
|
26 |
|
}
|
|
30 |
|
}
|
27 |
|
functi
on MinLong
itude() {
|
|
31 |
|
functi
on MinLong
itude() {
|
28 |
|
return
$GLOBALS["
minLong"];
|
|
32 |
|
//
return
$GLOBALS["
minLong"];
|
|
|
33 |
|
re
turn $this
->minLong;
|
29 |
|
}
|
|
34 |
|
}
|
30 |
|
|
|
35 |
|
|
31 |
|
}
|
|
36 |
|
}
|
32 |
|
|
|
37 |
|
|
33 |
|
?>
|
|
|