Longitude:$myrowG[longitude] –>”;
// set address for headline
//$thisAddress = $myrowG[‘Address’].”, “.$myrowG[‘City’].”, “.$myrowG[‘State’];
$thisAddress = $myrowG[‘Address’];
// create the google maps javascript lines
if (abs($myrowG[‘latitude’]) > 1 && abs($myrowG[‘longitude’]) > 1) {
if ($myrowG[‘latitude’]) $latArr[$gglCounter] = $myrowG[‘latitude’];
if ($myrowG[‘longitude’]) $lngArr[$gglCounter] = $myrowG[‘longitude’];
$bizName[$gglCounter] = “# $myrowG[Mls_Num]
$myrowG[Prop_Type]
Asking Price $”.number_format($myrowG[‘Asking_Price’]).”
$myrowG[Address] $myrowG[City]”;
//$bizAddr[$gglCounter] = “Property Details“;
$bizAddr[$gglCounter] = “”;
$gglCounter++;
}
}
if (count($latArr)) {
// calculate center of longitude coordinates and difference between largest/smallest
$lngCenter = (max($lngArr) + min($lngArr))/2;
$lngDiff = max($lngArr) – min($lngArr);
// calculate center of latitude coordinates and difference between largest/smallest
$latCenter = (max($latArr) + min($latArr))/2;
$latDiff = abs(min($latArr) – max($latArr));
//echo “
Latitude Center:$latCenter
Longitude Center:$lngCenter
“;
// increase bounds to encompass all markers (seems to increase one zoom level)
$boundsMaxLat = max($latArr)+.008;
$boundsMaxLng = max($lngArr)+.008;
$boundsMinLat = min($latArr)-.008;
$boundsMinLng = min($lngArr)-.008;
}
// create markers string
$markerStr = “”;
for($i=0;$i
$markerVar = “marker”.($i+1);
} else {
$markerVar = “marker”;
}
$markerStr .= ” var $markerVar = createMarker((new GLatLng(“.$latArr[$i].”,”.$lngArr[$i].”)), \””.$bizName[$i].”\”, \””.$bizAddr[$i].”\”);
map.addOverlay($markerVar);
“;
//echo “
Listing info for map:$bizName[$i]
“;
}
foreach ($_GET as $key => $value) {
$$key = $value;
if (($value) && ($key != “Prop_Class”) && ($key != “Offset”) && ($key != “Mls_Num”) && ($key != “whichForm”)) {
$GetPass .= “$key=”.urlencode($value).”&”;
}
}
reset($_GET);
foreach ($_POST as $key => $value) {
$$key = $value;
if (($value) && ($key != “Prop_Class”) && ($key != “Offset”) && ($key != “Mls_Num”) && ($key != “whichForm”)) {
$GetPass .= “$key=”.urlencode($value).”&”;
}
}
reset($_POST);
if ($Prop_Class) {
while(list($key,$value)=each($Prop_Class)) {
if ($value) {
$GetPass .= “Prop_Class[$key]=$value&”;
}
}
}
//echo “
// echo “
Back To Search Results
“;
$sql = “SELECT *
FROM Gunnison_listings_new
WHERE Mls_Num = ‘$Mls_Num’
“;
$result = mysqli_query($db,$sql);
//echo “
$sql
“;
//$error_text = mysql_error();
//if ($error_text) echo “Error: $error_text
“;
$myrow = mysqli_fetch_array($result);
$numResults = mysqli_num_rows($result);
if (!$numResults) {
header(“Location: http://www.crestedbuttecollection.com/404.php”);
exit;
}
if (trim($myrow[‘Area’]) == “Mt CB”) $myrow[‘Area’] = “Mt. Crested Butte”;
if (trim($myrow[‘Area’]) == “Rural CB”) $myrow[‘Area’] = “Rural Crested Butte”;
if (trim($myrow[‘Area’]) == “CB South”) $myrow[‘Area’] = “Crested Butte South”;
if (trim($myrow[‘Area’]) == “Rural Mount CB”) $myrow[‘Area’] = “Rural Mt. Crested Butte”;
//echo “\Area:*********”.$myrow[‘Area’].”********”;
// look in custom file for a virtual tour for this property
if ($propTourArr[$Mls_Num]) $myrow[‘virtual_tour’] = $propTourArr[$Mls_Num];
while(list($key,$value)=each($myrow)){
if ($value && $key != “Remarks” && $key != “virtual_tour” && $key != “virtualTour” && $key != “propertyPageURL” && $key != “propertyPageLinkText” && $value != “SLO” && $key != “Address”) {
$myrow[$key] = ucwords(strtolower($value));
}
}
$thisAddress = $myrow[‘Address’];
if ($myrow[‘Address_2’]) $thisAddress .= ” “.$myrow[‘Address_2’];
$thisAddress .= “, “.$myrow[‘City’].”, “.strtoupper($myrow[‘State’]).” “.$myrow[‘Zip’];
$imagePrimarySourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”.jpg”;
$imageASourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”a.jpg”;
$imageBSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”b.jpg”;
$imageCSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”c.jpg”;
$imageDSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”d.jpg”;
$imageESourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”e.jpg”;
$imageFSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”f.jpg”;
$imageGSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”g.jpg”;
$imageHSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”h.jpg”;
$imageISourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”i.jpg”;
$imageJSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”j.jpg”;
$imageKSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”k.jpg”;
$imageLSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”l.jpg”;
$imageMSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”m.jpg”;
$imageNSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”n.jpg”;
$imageOSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”o.jpg”;
$imagePSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”p.jpg”;
$imageQSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”q.jpg”;
$imageRSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”r.jpg”;
$imageSSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”s.jpg”;
$imageTSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”t.jpg”;
$imageUSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”u.jpg”;
$imageVSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”v.jpg”;
$imageWSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”w.jpg”;
$imageXSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”x.jpg”;
$imageYSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”y.jpg”;
$imageZSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”z.jpg”;
$imageAASourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”A.jpg”;
$imageBBSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”B.jpg”;
$imageCCSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”C.jpg”;
$imageDDSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”D.jpg”;
$imageEESourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”E.jpg”;
$imageFFSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”F.jpg”;
$imageGGSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”G.jpg”;
$imageHHSourcePath = “http://cren.interactiveproperties.com/images/listings/cren”.$Mls_Num.”H.jpg”;
//##################################################################################
// this code commented out below uses a large image and clickable thumbnails
//##################################################################################
//$imgCheck = file_get_contents($imagePrimarySourcePath);
$galleryThumbsShow = “”;
$colCount = 0;
// break up and cycle through imageLocations field
if ($myrow[‘imageLocations’]) {
//echo ““;
$imgBits = explode(“|”,$myrow[‘imageLocations’]);
$useUpper = 0;
for($i=0;$i
“;
$colCount++;
// additional images
} else if ($imgIttyBits[1] && $imgIttyBits[1] != “main”) {
if ($useUpper == 1) $imgIttyBits[1] = strtoupper($imgIttyBits[1]);
if ($imgIttyBits[1] == “z”) $useUpper = 1;
$galleryThumbsShow .= ”
“;
$colCount++;
}
}
}
if ($myrow[‘Status’] == “Uc/contingent/call Lb”) {
$thisStatus = “UNDER CONTRACT”;
} else if ($myrow[‘Status’]) {
$thisStatus = $myrow[‘Status’];
} else {
$thisStatus = “Active”;
}
?>
“;
echo “
“;
if ($myrow[‘Bedrooms’]) {
echo “
“;
if ($myrow[‘Bedrooms’] && $myrow[‘Fl_Baths’]) echo ” / “;
if ($myrow[‘Fl_Baths’]) {
echo ”
“.$myrow[‘Fl_Baths’].” Full Bath
“;
}
echo ”
“;
}
if ($myrow[‘TotalSqFt’]) {
echo “
“;
}
echo ”