print " </td> <TD VALIGN=TOP WIDTH=350 style=\"font-family: arial; font-size: 12px;\ +"> <IMG SRC=\"\" BORDER=0 ALT=\"\"> <BR>Listings Found In Radius ( $count ) <div class=\"scrollbox\"> <font face=arial size=2>\n"; $count = 0; open(FILE, "herbalarea.pl") || die "I can't open that because: $!\ +n"; while(<FILE>) { chop; @all = split(/\n/); foreach $line (@all) { local() = split(/ /, $line); $lat2 = $hStoreLatitude; $lon2 = $hStoreLongitude; $lat1 = $lat1a; $lon1 = $lon1a; # Notice the 90 - latitude: phi zero is at the North Pole. @L = (deg2rad($lat1), deg2rad(90 - $lon1)); @T = (deg2rad($lat2), deg2rad(90 - $lon2)); $km = great_circle_distance(@L, @T, 6378); if ($km < $distance) { $match = 1; $count ++; $area = ""; $area1 = ""; $area2 = ""; $rounded = sprintf("%.1f", $km); print " <table border=0 width=240 height=105 cellpadding=15 cellspacing=0 back +ground=\"\"> <tr> <td style=\"font-size: 11px; color: #5D5D5D;\"> Store # <A HREF=\"javascript:change1('pic1','image$count')\">$area</A> +<BR>\n"; print "<div class=\"book\"><A HREF=\"\" target=_parent>Book Your Free +Consultation.</a> - KM $rounded</div></A></td> </tr> </table> \n";
In reply to Re^4: Sort by distance
by pglinx
in thread Sort by distance
by pglinx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |