include_once("instance/city_list.php");
include_once("instance/desc_list.php");
include_once("instance/global.php");
include_once("utils.php");
$d = $_GET['d'];
$d_name = $_GET['d'];
if(strcmp("West", $d)==0)
$d = "w";
else if(strcmp("East", $d)==0)
$d = "e";
else if(strcmp("North", $d)==0)
$d = "n";
else if(strcmp("South", $d)==0)
$d = "s";
$state = getStateCode($_GET['s']);
$state_name = $_GET['s'];
$state_name_encoded = urlencode($state_name);
$i = 0;
$size = count($city_list);
for(;$i<$size;$i++)
if(strcmp($state, $city_list[$i][0])==0) break;
$state = $city_list[$i][0];
$state_name = getStateName($state);
$ra = getExits($iname,$state,$d);
$size = count($ra);
$title = "$iname $state_name Exits $d_name" . "bound - Roadnow";
$content = "$iname $state_name Exits $dir with nearby info on hotels, motels, restaurants, gas prices, maps, attractions and local services";
$keys = $content;
$page_title = "$iname $state_name Exits $d_name" . "bound";
$fullPage = "http://roadnow.com/$dir_name/exit.php?s=$state_name_encoded&d=$d&from=m";
?>
include("header_html.php"); ?>
include("header.php");?>
-
if($d == "w")
echo "
East
";
else if($d == "e")
echo "West
";
else if($d == "n")
echo "South
";
else if($d == "s")
echo "North
";
else
echo "$dir_up_name
";
?>
(G=Gas F=Food L=Lodging)
(within 5 miles)
function display($j) {
global $ra,$state_name_encoded, $exit, $d_name, $iname, $dir, $state ;
$services = getExitServices($ra[$j][3], $state);
$la = $ra[$j][0];
$ln = $ra[$j][1];
$ll = "$la,$ln";
$exit = $ra[$j][2];
if(strpos($exit,"mm") !== false) return;
$e_index = $j;
$name_encoded = urlencode("$iname Exit $exit, $dir");
//$gas_name = urlencode("$iname exit $exit $dir to cheap gas");
$gas_name = "$iname-exit-$exit-$dir-to-cheap-gas";
$location_name = urlencode("the current location: $la, $ln");
$city = $ra[$j][5];
$city_good = good($ra[$j][5]);
$state = $ra[$j][6];
$m2n = trim($ra[$j][7]);
$t = explode("|",$m2n);
$m2P = explode(":",$t[0]);
$m2N = explode(":",$t[1]);
$m2Pexit = $m2P[0];
$m2P = "" . $m2P[1] . "";
$m2Nexit = $m2N[0];
$m2N = "" . $m2N[1] . "";
if(isset($m2P) && isset($m2N))
$m2n = "~$m2P mi to Exit $m2Pexit, ~$m2N mi to Exit $m2Nexit";
else if(isset($m2P))
$m2n = "~$m2P mi to Exit $m2Pexit";
else if(isset($m2N))
$m2n = "~$m2N mi to Exit $m2Nexit";
$localServices = trim($ra[$j][4]);
// F:84|G:34|L:49
$t = explode("|",$localServices);
$tF = explode(":",$t[0]);
$tG = explode(":",$t[1]);
$tL = explode(":",$t[2]);
if (intval($tG[1]) > 99 )
$tG[1] = "99+";
if (intval($tF[1]) > 99 )
$tF[1] = "99+";
if (intval($tL[1]) > 99 )
$tL[1] = "99+";
$G = "G(" . $tG[1] . ")";
$F = "F(" . $tF[1] . ")";
$L = "L(" . $tL[1] . ")";
$state_name = getStateName($state);
$state_name_encoded = urlencode($state_name);
$nearCity = "near $city,$state";
if(isset($m2n) && strlen($m2n)>0)
echo "- Exit " . $ra[$j][2] . " - $G $F $L
" . strip_tags($services[0]) . "
[$nearCity]
[$m2n] ";
else
echo "- Exit " . $ra[$j][2] . " - $G $F $L
" . strip_tags($services[0]) . "
[$nearCity] ";
}
if($d == "e" || $d == "n") {
for($j=0;$j<$size;$j++)
display($j);
} else {
for($j=$size-1;$j>=0;$j--)
display($j);
}
?>
-
if($d == "w")
echo "
West
";
else if($d == "e")
echo "East
";
else if($d == "n")
echo "North
";
else if($d == "s")
echo "South
";
else
echo "$dir_up_name
";
?>
include("footer.php"); ?>