include("utils.php");
include("landmarks.php");
include("instance/global.php");
include_once("screen_size.php");
$la = $_GET['la'];
$ln = $_GET['ln'];
$centerLa = $la;
$centerLn = $ln;
$lla = urlencode("$la,$ln");
$name = $_GET['n'];
$name_encoded = urlencode($name);
$landmark_name = $_GET['lmn'];
$landmark_name_encoded = urlencode($landmark_name);
$r = $_GET['r'];
if(!isset($_GET['r']))
$r = 5;
$p = $_GET['p'];
if(!isset($_GET['p']))
$p = 0;
$pe = $p + 15;
$landmarks = getLandmarksByName($la,$ln,$r,$landmark_name);
if($landmarks==false) {
$city = $_GET['c'];
$state = $_GET['s'];
$landmarks = getLandmarksByLocationByName($city, $state, "US", $landmark_name);
}
$title = "Landmarks near $name - Roadnow";
$content = $title;
$key = $title;
$num = count($landmarks);
if($p==0) $pe = min($num,$pe);
?>
include("header_html_nofollow.php");?>
include("header.php"); ?>
-
echo "$num results in: landmarks within $r miles to $name"; ?>
if($num > 0) {
$poi_infowindows = "poi_infowindows.php";
$zoom = 12;
$poi_icon = "landmark_icon.png";
$poi_results = $landmarks;
include("g_map_poi.php");
echo "
";
echo "
";
echo "
";
echo "";
for($i=0;$i<$num;$i++) {
$h_name = $landmarks[$i]['name'];
$address = $landmarks[$i]['address'];
$city = $landmarks[$i]['city'];
$state = $landmarks[$i]['state'];
$zip = $landmarks[$i]['zip'];
$la2 = $landmarks[$i]['latitude'];
$ln2 = $landmarks[$i]['longitude'];
$dist = $landmarks[$i]['dist'];
$to_exits = trim($landmarks[$i]['to_exits']);
$city_encoded = urlencode($city);
$h_name_encoded = urlencode($h_name);
$ll2 = urlencode("$la2,$ln2");
$direction_name = urlencode("Direction from $name to $h_name");
$map_name = urlencode("Map at $h_name");
if(strlen($to_exits) >0 ) {
$t = explode("|", $to_exits);
$t1 = explode(",", $t[0]);
$exit1 = $t1[0];
$highway1 = $t1[1];
$state1 = $t1[2];
$dist1 = $t1[3];
$la3 = $t1[4];
$ln3 = $t1[5];
$laln3 = "$la3,$ln3";
$t1 = explode(",", $t[1]);
$exit2 = $t1[0];
$highway2 = $t1[1];
$state2 = $t1[2];
$dist2 = $t1[3];
$la4 = $t1[4];
$ln4 = $t1[5];
$laln4 = "$la4,$ln4";
}
$poi_name = urlencode("$h_name, $address, $city, $state");
$go = "GO THERE";
print "
-
";
}
echo "
";
}
?>
include("footer.php"); ?>