Eruv Map

login(‘http://cornerstone.mris.com:6103/platinum/login’ ,’3014132′, ‘755117’, ‘MRIS Conduit/1.1′, null, false,’RETS/1.5’, false, true, false, ‘http.log’);

if (!$results ) { exit; }

$code = $_GET[‘code’];

global $alldata,$centerlat,$centerlong,$sublist,$authority,$ziplist,$eruvarea;

if ($code == “silverspring”) {
$centerlat = 39.045386;
$centerlong = -77.026262;
$sublist = “”;
$authority = “http://wp.yise.org/community-resources/eruv-info”;
$ziplist = “20901,20902,20906,20904,20903”;
} elseif ($code == “whiteoak”) {
$centerlat = 39.034657;
$centerlong = -76.999496;
$sublist = “BURNT MILL*,DUMONT OAK*, NORTHWEST BR*”;
$authority = “http://wp.yise.org/community-resources/eruv-info”;
$ziplist = “”;
} elseif ($code == “kempmill”) {
$centerlat = 39.045386;
$centerlong = -77.026262;
$sublist = “GRAY,GRAYS ESTATES,KEMP HILL ESTATES,KEMP MILL*,UNIVERSITY T*,SPRINGBROOK FO*”;
$authority = “http://wp.yise.org/community-resources/eruv-info”;
$ziplist = “”;
} elseif ($code == “rockville”) {
$centerlat = 39.053568;
$centerlong = -77.132202;
$sublist = “MONTROSE*,OLD FARM,LUXMANOR,TIMBERLAWN,TUCKERMAN*,*GROSVEN*,MIRAMONT*,GRAYROB,OLD GEORGETOWN*,HOLLYOAK,GEORGETOWN V*,THE FALLS*,THE WISC*,FALLSTONE,LUXBER*,GABLES OF T*,CHERINGTON,PT*ROCK*,NEILW*,CRE*WIC*,BENTLE*”;
$authority = “http://www.animadev.com/members/anima/ezrasisrael.nsf/webpage?OpenForm&ParentUNID=7F4480667D08A0CF88256E5B00596352”;
$ziplist = “2085*”;
} elseif ($code == “aspenhill”) {
$centerlat = 39.073675;
$centerlong = -77.100053;
$sublist = “ASPEN HILL*,BEL PRE*,ROCK CREEK*,ENGLISH MANOR*,MANOR WOOD*,WHEATON WOOD*,MANOR PAR*”;
$authority = “http://www.bethjoshua.org/index.php/our-community/eruv-info”;
$ziplist = “2085*”;
} elseif ($code == “northwoodsligo”) {
$centerlat = 39.032036;
$centerlong = -77.022121;
$sublist = “FOREST KN*,NORTHWOOD*,SLIGO*,UNIVERSITY T*,MCDONALD KN*”;
$authority = “http://wp.yise.org/community-resources/eruv-info”;
$ziplist = “”;
} elseif ($code == “olney”) {
$centerlat = 39.15727;
$centerlong = -77.066002;
$sublist = “*OLNEY*,CHERRYWO*,BARNSLEY*,HALLOW*,BATCHELLOR*,JAMES C*,MANOR OAKS,CHRISTIE*,BROOKVILLE*,WILLIAMSBUR*,CAMEL*,BROOKE*”;
$authority = “http://www.osttolney.org/community/olney-eruv-map”;
$ziplist = “2083*”;
} elseif ($code == “potomac”) {
$centerlat = 39.048586;
$centerlong = -77.162218;
$sublist = “FOX HILLS, PINE KNOLLS, LAKE NORMA*,REGENCY EST*,PARK POTOM*,WILLERBURN*,INVERNESS*,MONTGOMERY SQ*,POTOMAC*,FALLS*”;
$authority = “http://www.bethsholom.org/eruv.htm”;
$ziplist = “2085*”;
} elseif ($code == “woodside”) {
$centerlat = 39.002857;
$centerlong = -77.035013;
$sublist = “WOODSIDE*,MONTGOMERY H*,FOREST GLEN*,SILVER SPRING,NORTHMO*”;
$authority = “http://www.wsat.org/eruv.htm”;
$ziplist = “20910,20901”;
} elseif ($code = “test”) {
$centerlat = 39.15727;
$centerlong = -77.066002;
$sublist = “”;
$authority = “http://www.osttolney.org/community/olney-eruv-map”;
$ziplist = “20832”;
}

// Download relevant subdivisions from RETS

if ($ziplist == “”) {
$searchstring = “(County=|10000004181),(LocaleListingStatus=|10000069147,10000069150,10000069149,10000069148,10000069151),(TaxLegalSubdivision=$sublist)”;
} else {
$searchstring = “(County=|10000004181),(LocaleListingStatus=|10000069147,10000069150,10000069149,10000069148,10000069151),(PostalCode=$ziplist)”;
}

$response = $rets->Search(‘Property’,’RES’,’0′,”,”,”,’DMQL2′,’Latitude,Longitude,ListPictureURL,LocaleListingStatus,FullStreetAddress,CityName,State,PostalCode,Latitude,Longitude,CloseDate,ListingID,ClosePrice,ListPrice,LocaleListingStatus’,$searchstring);

if ($code == “kempmill”) {
$eruvarea = “Kemp Mill”;
} elseif ($code == “whiteoak”) {
$eruvarea = “White Oak”;
} elseif ($code == “aspenhill”) {
$eruvarea = “Aspen Hill”;
} elseif ($code == “northwoodsligo”) {
$eruvarea = “Northwood/Sligo”;
} elseif ($code == “olney”) {
$eruvarea = “Olney”;
} elseif ($code == “potomac”) {
$eruvarea = “Potomac”;
} elseif ($code == “woodside”) {
$eruvarea = “Woodside”;
} elseif ($code == “rockville”) {
$eruvarea = “Rockville/North Bethesda”;
} elseif ($code == “silverspring”) {
$eruvarea = “Silver Spring”;
}

if ($rets->goodsearch == “Yes”) {
$rets->compact_xml_to_csv_file(“/home/eruvhome/www/www/$code” . ‘.txt’,’DATA’,&$response,”\r\n”,”\t”,”,’false’,’true’);
$activelines = file (“/home/eruvhome/www/www/$code” . ‘.txt’);
unlink (“/home/eruvhome/www/www/$code” . ‘.txt’);

$fields = explode (“\t”, $activelines[0]);
$i = 0;
$fieldlist = array();
foreach ($fields as $f) {
$fieldlist[trim($f)] = $i++;
}

$alldata = array();
$j = 0;

array_shift ($activelines);

foreach ($activelines as $l) {
$u = trim($l) . “\t\t”;
$temp = explode(“\t”,$u);
foreach ($fields as $f) {
$alldata[$j][trim($f)] = trim($temp[$fieldlist[trim($f)]]);
}

if ((strpos($alldata[$j][“ListPictureURL”],”//”) < 3) and ($fieldlist['ListPictureURL'] == 0)) { // No good - need to account for missing field at beginning foreach ($fields as $f) { if (trim($f) == 'ListPictureURL') { $alldata[$j][trim($f)] = ""; } else { $alldata[$j][trim($f)] = trim($temp[$fieldlist[trim($f)]-1]); } } } $j++; } unset ($response); } function startmapfile () { global $directory, $centerlat, $centerlong,$code,$eruvarea; echo "

\n”;
echo “

Current Active and Under Contract Listings in MRIS within the $eruvarea Eruv. Click on icon for full listing.
“;
//echo “Information provided as a community service by Barbara Ciment

\n”;
//echo “Back to home page\n”;
echo “

– Home for sale   “;
echo “ – Home for rent   “;
echo “ – Home under contract
“;
echo “ – Eruv-relevant Location”;
echo “

“;
echo “

\n”;
echo “\n”;
echo “\n”;
echo “\n”;

echo “Information deemed reliable, but not guaranteed. Please double-check whether a property is within or outside the eruv with the proper eruv authority. For more information see the Eruv Website. Information provided as a community service by Barbara Ciment\n”;
// echo “\n”;
// echo “

\n”;
}

setlocale(LC_MONETARY,’en_US’);

function writemapstuff () {
global $code, $alldata, $rownumber, $l;
startmapfile();
$rownumber = 0;
foreach($alldata as $l) {
writemaprow();
}

if (($code == “whiteoak”) or ($code == “silverspring”)) {
writecenterpoint (39.034657,-76.999496,”Southeast Hebrew Congregation”,”http://www.southeasthebrew.org”,1);
}
if (($code == “kempmill”) or ($code == “silverspring”)) {
writecenterpoint (39.04084,-77.029425,’Young Israel Shomrai Emunah’,’http://www.yise.org’,1);
writecenterpoint (39.051418,-77.024862,’Kemp Mill Synagogue’,’http://www.kmsynagogue.org’,2);
writecenterpoint (39.046753,-77.018631,’Chabad of Silver Spring’,’http://www.chabadsilverspring.com’,3);
writecenterpoint (39.045153,-77.030733,’Silver Spring Jewish Center’,’http://ssjc.info’,4);
writecenterpoint (39.04252,-77.030364,’Yeshiva of Greater Washington’,’http://yeshiva.edu’,5);
}
if ($code == “potomac”) {
writecenterpoint (39.050919,-77.16338,’Beth Sholom Congregation and Talmud Torah’,’http://www.bethsholom.org’,1);
writecenterpoint (39.047327,-77.161854,’Young Israel Ezras Israel of Potomac’,’http://www.yieip.org’,2);
writecenterpoint (39.047702,-77.161726,’Chabad Shul of Potomac’,’http://www.chabadpotomac.com’,3);
}
if ($code == “aspenhill”) {
writecenterpoint (39.073675,-77.100053,’Melvin J Berman Hebrew Academy’,’http://www.mjbha.org’,1);
}
if (($code == “northwoodsligo”) or ($code == “silverspring”)) {
writecenterpoint (39.032036,-77.022121,’Young Israel Shomrai Emunah’,’http://www.yise.org’,1);
}
if ($code == “olney”) {
writecenterpoint (39.15727,-77.066002,’Ohev Sholom Talmud Torah’,’http://www.osttolney.org’,1);
}
if ($code == “woodside”) {
writecenterpoint (39.002857,-77.035013,’Woodside Synagogue Ahavas Torah’,’http://www.wsat.org’,1);
}
if ($code == “rockville”) {
writecenterpoint (39.053568,-77.132202,’Ezras Israel Congregation’,’http://www.animadev.com/members/anima/ezrasisrael.nsf/webhome?OpenForm&ParentUNID=C2B51302485A491188256E58006CCCA9%27′,1);
writecenterpoint (39.044782,-77.120789,’Aish HaTorah DC’,’http://www.aishdc.org’,2);
writecenterpoint (39.040895,-77.113071,’Magen David Sephardic Congregation’,’http://www.magendavidsephardic.org’,3);
writecenterpoint (39.040653,-77.122654,’Jewish Rockville Outreach Center’,’http://www.jewishroc.org’,4);
writecenterpoint (39.058309,-77.128918,’Chabad Israeli Center of Rockville’,’http://www.chabadisraelicenter.org’,5);
}
endmapfile();
}

writemapstuff ();

unset($alldata);

?>