$user_agent=$_SERVER['HTTP_USER_AGENT']; //print "$user_agent
"; $existing_url="http://". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; //print "$existing_url
"; $www_count=substr_count($existing_url, "http://www."); //print "$www_count
"; if ($www_count==0){ $redirected_url=str_replace("http://", "http://www.", $existing_url); //print "$redirected_url
"; header("Location: $redirected_url"); } include ("/sites/relocationusa_tp/register_globals.htm"); $theirip=$_SERVER['REMOTE_ADDR']; $thisbrokerage='relocationUSA'; include "header_variables.htm"; include "/sites/relocationusa_tp/spam_lead_checks.htm"; $myphone='(678)509-3380'; $site_name=('atlantarealestate-homes.com'); $mydir='fmls'; $company='All Atlanta Properties'; $partner='unassigned'; $lastrecip='lastrecip_phx'; $recip_page='recip_page_phx'; $entry_date='entry_date_phx'; //$table='partners'; //print ("--$whichsection--"); $key=date("F j, Y"); //$key=date('l jS \of F Y \h\i\h\o'); $thispath=$_SERVER["REQUEST_URI"]; //$thispath=str_replace("%20", " ", $thispath); $htmcount=substr_count($thispath, ".htm"); $homescount=substr_count($thispath, "/homes/"); $spacecount=substr_count($thispath, "%20"); //print "
$spacecount"; if ($spacecount>=5 and $htmcount and $homescount) { //print "Homes Page"; $homespage='yes'; //set header ok after www. url redirect if ($www_count==1){ //header("HTTP/1.1 200 OK"); } } if (!substr_count($thispath, "/blog/") and !substr_count($thispath, "enter_commitment.htm") and !substr_count($thispath, ".js") and !substr_count($thispath, "getimages")) { //load rest of header file //print_r($_COOKIE); //$mypath=($SCRIPT_NAME); //$mypath=$thispath; $mypath=str_replace("%20", " ", $thispath); $today=date("Y-m-d H:i:s"); //print "$today"; //print ("$mypath
"); $rev=strrev($mypath); //print ("$rev
"); $pos=strpos($rev, "/"); //print ("$pos
"); $show=substr($rev, 0, $pos); //print ("$show
"); $show=strrev($show); //print ("$show
"); $show=substr($show, 0, strlen($show)-4 ); //print ("$show
"); $underscorepos=strpos($show, "_"); if ($underscorepos) { $pagenum=substr($show, $underscorepos+1); //print $pagenum; $show=substr($show, 0, $underscorepos); } //if ($mlsno and $show!="saproperty") header("location:/data/fmls/saproperty.asp?mlsno=$mlsno"); //REFORMAT CASE AND CHANGE CERTAIN FILENAMES VALUES $show=ucwords($show); $show=str_replace(" Of ", " of ", $show); $show=str_replace("Golfcity", "City", $show); $show=str_replace("Golfcourse", "Golf Community", $show); $show=str_replace("Listingtype", "Property Type", $show); $show=str_replace("Golfcommunity", "Golf Community", $show); //$show=str_replace("Horse", "City", $show); $show=str_replace("Index", "", $show); $show=str_replace("Popular", "Subdivision", $show); //print $show; //SET THE MODIFIER, MIDDLER, BETWEEN, ENDER AS APPROPRIATE if (substr_count($mypath, "/golf/")) {$modifier=("Golf ");} if (substr_count($mypath, "/gated/")) {$ender=(" Communities");} if (substr_count($mypath, "/construction/")) {$ender=(" Construction");} if (substr_count($mypath, "/levels/")) {$ender=(" Story");} if (substr_count($mypath, "/style/")) {$ender=(" Style");} if (substr_count($mypath, "/bedrooms/")) {$ender=(" Bedroom");} if (substr_count($mypath, "/baths/")) {$ender=(" Bath");} if (substr_count($mypath, "/horse_county/")) {$modifier=("Horse ");} if (substr_count($mypath, "/horse_city/")) {$modifier=("Horse ");} if (substr_count($mypath, "/county/")) {$ender=(" County");} if (substr_count($mypath, "/Apartment Style/")) {$modifier=("Apartment Style ");} if (substr_count($mypath, "/Single Family/")) {$modifier=("Single Family ");} if (substr_count($mypath, "/Single Family (New)/")) {$modifier=("Single Family (New) ");} if (substr_count($mypath, "/Townhouse/")) {$modifier=("Townhouse ");} if (substr_count($mypath, "/Townhouse (New)/")) {$modifier=("Townhouse (New) ");} if (substr_count($mypath, "/Patio Home/")) {$modifier=("Patio Home ");} if (substr_count($mypath, "/Loft Style/")) {$modifier=("Loft Style ");} if (substr_count($mypath, "/Gemini Twin/")) {$modifier=("Gemini Twin ");} if (substr_count($mypath, "/Modular Home/")) {$modifier=("Modular Home ");} if (substr_count($mypath, "/bankowned.htm")) {$modifier="Bank Owned"; $between=''; $show='by City';} if (substr_count($mypath, "/bankowned/")) {$modifier="Bank Owned";} if (substr_count($mypath, "/shortsale.htm")) {$modifier="Short Sale"; $between=''; $show='by City';} if (substr_count($mypath, "/shortsale/")) {$modifier="Short Sale";} if (substr_count($mypath, "/leasepurchase.htm")) {$modifier="Lease Purchase"; $between=''; $show=' ';} if (substr_count($mypath, "/leasepurchase/")) {$modifier="Lease Purchase";} //if (substr_count($mypath, "/district/")) {$middler=("District");} //if (substr_count($mypath, "/area/")) {$middler=("Area");} //if (substr_count($mypath, "/acres/")) {$ender=(" on 1 or more Acres of Land");} if (substr_count($mypath, "/homes/")) { //if ($show[0]=='3'){ //$show=substr($show, 5, 100); //}elseif ($show[0]=='1' or $show[0]=='9'){ $show=substr($show, 8, 100); //} } if (substr_count($mypath, "/property/")) $show=substr($show, 7, 100); if (substr_count($mypath, "/levels/")) $show=$show{0}; //only show first digit & leave out the page # if (substr_count($mypath, "/zip/")) $show=substr($show, 0, 5); //only show first digit & leave out the page # $between='in'; if (substr_count($mypath, "/address.htm")) {$between=('by');} if (substr_count($mypath, "/county.htm")) {$between=('by');} if (substr_count($mypath, "/high.htm")) {$show=('High School'); $between=('by'); $list="yes";} if (substr_count($mypath, "/middle.htm")) {$show=('Middle School '); $between=('by'); $list="yes";} if (substr_count($mypath, "/elementary.htm")) {$show=('Elementary School '); $between=('by'); $list="yes";} if (substr_count($mypath, "/district.htm")) {$show='School District'; $between=('by'); $list="yes";} if (substr_count($mypath, "/primary.htm")) {$ender=' School'; $between=('by'); $list="yes";} if (substr_count($mypath, "/intermediate.htm")) {$ender=' School'; $between=('by'); $list="yes";} if (substr_count($mypath, "/senior.htm")) {$ender=' School'; $between=('by'); $list="yes";} if (substr_count($mypath, "/districtelem.htm")) {$show='Elementary School District'; $between=('by'); $list="yes";} if (substr_count($mypath, "/style.htm")) {$between=('by');} if (substr_count($mypath, "/rent.htm")) {$between=('for');} if (substr_count($mypath, "/University of Georgia")) {$between=('near');} if (substr_count($mypath, "/Acres")) {$between=""; $show="with Land"; $list="yes";} if (substr_count($mypath, "/golf.htm")) {$between=('by'); $ender=" Community";} if (substr_count($mypath, "/gated.htm")) {$between=('by'); $ender=" Community";} if (substr_count($mypath, "/listingtype.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/subdivision.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/community.htm")) {$between=('by'); $list="yes";} //if (substr_count($mypath, "/golf.htm")) {$between=('by'); $modifier=('Golf');} if (substr_count($mypath, "/school.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/construction.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/zoning.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/levels.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/bedrooms.htm")) {$between=('by');} if (substr_count($mypath, "/bathrooms.htm")) {$between=('by');} if (substr_count($mypath, "/city.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/area.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/zip.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/builder.htm")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/retirement.htm")) {$show=('Active Adult Communities');} if (substr_count($mypath, "/golfcity.htm")) {$modifier='Golf Course '; $between=('by');} if (substr_count($mypath, "/golfcourse.htm")) {$modifier='Golf Course '; $between=('by');} if (substr_count($mypath, "/golfcommunity.htm")) {$between=('by');} //if (substr_count($mypath, "/horse_city.htm")) {$between=('by'); $ender=(' Property');} //if (substr_count($mypath, "/horse_county.htm")) {$between=('by'); $ender=(' Property');} if (substr_count($mypath, "/combination")) {$between=('by'); $list="yes";} if (substr_count($mypath, "/income listingtype.htm")) {$show="Income Property Type"; $between=('by'); $list="yes";} $firstpart="Real Estate"; if (substr_count($mypath, "/favorite_sites/")) {$firstpart=('Recommended Sites');} if (substr_count($mypath, "/land")) {$firstpart=('Vacant Land');} if (substr_count($mypath, "/acres/")) {$firstpart=('Homes with Land');} if (substr_count($mypath, "/income")) {$firstpart=('Income Property');} if (substr_count($mypath, "/commercial")) {$firstpart=('Commercial Property');} //print ("|$mypath|
");
//$KWD IS THE START OF THE TITLE AND HEADING - IT IS 'TUCSON' or ANOTHER CITY
//$REDUNDANT is KWD but is set to nothing if it's in $SHOW
$kwd='Atlanta';
//SET THE KWD TO THE OTHER CITY IF THERE IS ONE
if (substr_count("$mypath", "/acres/")) {$kwd="$show";}
if (substr_count("$mypath", "/horse/")) {$kwd="$show";}
if (substr_count("$mypath", "/city/")) {$kwd="$show";}
$redundant=$kwd;
if (substr_count($show, $kwd)) $redundant='';
//print ("|$show| |$kwd| |$redundant|
");
//SOME FINAL CHEATS FOR CASES WHERE LISTING BY CITY BUT WANT SHOW TO BE SOMETHING ELSE
if (substr_count($mypath, "/golfcity.htm")) {$show_space=str_replace("City", "Golf", $show_space);}
if (substr_count($mypath, "/horse.htm")) {$show_space=str_replace("City", "Horse Property", $show_space);}
include("lastrecip.php");
//print ("$mypath");
?>
HI THERE
"; ?> if (!substr_count($thispath, "/homes/")){ ?> //old //$mapkey='AIzaSyDzOyv5NWh3bWeIjkEnC-1nzZahFaXy1pU'; //atlanta //$mapkey='AIzaSyD9Ml9FC0PuMXpij7YlZwn4eNfar5SFmBY'; ?> /* //atlanta */?> /* */?> /* //moved to top of sasearch */?> /* */?> /* */?> } //end if if ($mypath=='/' or substr_count($mypath, "index.htm")) {?> }elseif (substr_count($mypath, "Builder/") or substr_count($mypath, "Subdivisions/") or substr_count($mypath, "sasearch.asp") or substr_count($mypath, "getdata.asp") or substr_count($mypath, "paged_re_listings.asp")) {?> /* */?> }?> /* */?> $day_of_month=date("j"); //print "$day_of_month"; ?> // necessary for slideshow?> /*
" class="smalllink">Home Page | http://www.atlantarealestate-homes.com/data/fmls/sasearch.asp" class="smalllink">Property Search | Site Map |
*/ include "/sites/relocationusa_tp/header_footer_links.htm"; ?> //} //end if } //end if load rest of file if not .js ?> if (!$search_screen){ print ""; } //print "$whereclause"; //include("/sites/default/data/getheader.php"); if ($filename){ //IF PAGE PREGENERATED print ("\n"); } $whereclause = str_replace("\\" , "" , $whereclause); //if ($garage){$whereclause="where Cargarage>=1 and (Area='Central' or Area='West') order by price asc";} if ($featured) {$whereclause="where officename='$own_listing_string' order by price desc";} if ($aid) {$whereclause="where agentnum='$aid' or listingagentnum='$aid' or listingagentmlsid='$aid' or listingagentname='$aid' order by price desc";} //if ($subdivision) {$whereclause="where status='A' and subdivision like '%$subdivision%' order by //price desc";} //print ($whereclause); $url_subdivision=(urlencode($subdivision)); //print ("$url_subdivision"); //SET START RECORD BASED ON PAGING MOVE $count=0; if (!$start_record) {$start_record=1;} if ($paging_move=="previous") {$start_record = $start_record - 40;} elseif ($paging_move=="next") {$start_record = $start_record + 40;} if ($start_record<1) {$start_record=1;} //print("$whereclause"); //SET UP TABLE QUERY FOR MATCHING RECORDS $host="localhost"; $user="root"; $password="baldeagle"; $dbname="fmls"; $tablename="fmls_homes"; $link=mysqli_connect ($host, $user, $password, $dbname); //$offset=$start_record-1; //if ($offset) $thisoffset=" offset $offset"; $thisday= (date("d")-1); $thismonth=date("m"); $thisyear=date("y"); $thishour= date("H"); $thisminute=date("i"); $thissecond=date("s"); $yesterday=date("Y-m-d H:i:s", mktime($thishour, $thisminute, $thissecond, $thismonth, $thisday, $thisyear)); if ($keyword=='newlistings') { if ($city) $thiscity="and city='$city'"; $today=date("Ymd"); $query="select propertycondition, lotsizedimensions, sqft, sqftsource, url, propsubtype, subdivision, mls_number, mlsno, bedrooms, baths, street_suffix, streetdirsuffix, zip, city, price, addrnum, unit, state, addrname, nsew from fmls_homes left join fmls_images on (fmls_homes.matrix_unique_id=fmls_images.mls_no and fmls_images.photonum='1') left join newlistings on mlsno=mls_number where listing_date>='$yesterday' and listing_count='1' $thiscity order by price, mlsno"; }else{ $query="select concat_ws(' ', NULLIF(addrnum, ''), NULLIF(nsew, ''), NULLIF(addrname, ''), NULLIF(street_suffix, ''), NULLIF(streetdirsuffix, ''), NULLIF(unit, ''), NULLIF(city, ''), NULLIF(state, '')) as address, url, lotsizedimensions, sqft, sqftsource, propertycondition, propsubtype, subdivision, mlsno, bedrooms, baths, street_suffix, streetdirsuffix, zip, city, price, addrnum, unit, addrname, nsew, state from fmls_homes left join fmls_images on (fmls_homes.matrix_unique_id=fmls_images.mls_no and fmls_images.photonum='1') ".$whereclause; } //echo ("$query"); //print "
------------------------------------------
"; //$query="select mlsno, officename from $tablename ".$whereclause; $data=mysqli_query ($link, $query); //print ("---------------$data"); $num_rows = mysqli_num_rows($data); //print $num_rows; if (substr_count($mypath, "/sasearch.asp") or substr_count($mypath, "/getdata.asp") or substr_count($mypath, "/paged_re_listings.asp")){ $thiswidth="width=975"; }else{ $thiswidth="width=500"; //just a low number that makes content expand it. fmls disclosure expands table to 100% without this. } //CREATE TABLE AND PRINT NAVIGATIONAL & STATISTICAL STUFF print "
");
if ($keyword or ($whereclause and $whereclause!=" order by price")) { //only show if whereclause
//include navigation section
include("navigation.asp");
print " "; if (substr_count($whereclause, "having ")) { $show_this = str_replace("having address=" , "" , $whereclause); $show_this = str_replace("'" , "" , $show_this); } if ($filename){ print ("\$show_this=\"$show_this\"; \$whereclause=\"$whereclause\"; include(\"/sites/default/data/fmls/saved/banner.htm\");?>\n"); //print " "; }elseif ($num_rows){ include("saved/banner.htm"); //print " "; } //End of Table & Statistical/Navigational Stuff print (" | ||||
\n\n | \n||||
\n"; $rest = substr("$Row[mlsno]", -2); $url=str_replace("-o", "", "$Row[url]"); if (substr_count($mypath, "/sasearch.asp") or substr_count($mypath, "/getdata.asp")) { $thissrc='this-src'; }else{ $thissrc='src'; } if ("$Row[url]") { $newurl="$Row[url]"; print ("");} else {print ("");} print ("\n | \n");
//print "";
$show_the_addr="$Row[addrnum] $Row[addrname] $Row[street_suffix] $Row[streetdirsuffix]";
if ("$Row[unit]") $show_the_addr.=" #$Row[unit]";
$show_the_addr=str_replace(" "," ",$show_the_addr);
$show_the_addr=str_replace(" "," ",$show_the_addr);
$show_the_addr=trim($show_the_addr);
//$show_the_addr=str_replace(" "," ",$show_the_addr);
print "$show_the_addr";
print(" "); if ("$Row[city]") { //print ("$Row[city]"); $second_addr="$Row[city],"; }elseif ("$Row[county]"){ //print (", $Row[county] county"); $second_addr="$Row[county],"; } if ("$Row[state]") $second_addr.=" $Row[state]"; if ("$Row[zip]") $second_addr.=" $Row[zip]"; //print(", $Row[state] $Row[zip] "); if ($second_addr){ //$second_addr=str_replace(" "," ",$second_addr); print "$second_addr"; } print " "; if ($site=="phoenix") { print ("\$subdivision=\"$Row[subdivision]\"; \$city=\"$Row[city]\"; include(\"/sites/default/data/fmls/page_subdivision.php\");?>\n"); }else{ if ("$Row[subdivision]"!="$Row[city]" and "$Row[subdivision]" and "$Row[subdivision]"!="Unsubdivided" and "$Row[subdivision]"!="Other/Unknown") { $subdiv_file = "/sites/atlanta/$Row[city] Subdivisions/$Row[subdivision].htm"; $subdiv_link = "/$Row[city] Subdivisions/$Row[subdivision].htm"; //$subdiv_link=str_replace(" ", "%20", $subdiv_link); $subdiv_found='no'; if (file_exists($subdiv_file)) { $subdiv_found='yes'; //echo "The file $subdiv_file exists"; } if ($subdiv_found=='yes'){ print ""; } print ("$Row[subdivision]"); if (!substr_count("$Row[subdivision]", "$Row[city]")) print " $Row[city]"; if ($subdiv_found=='yes'){ print ""; } } //end if not other/unknown } //end if phx site print(" "); //print "HI THERE"; //if (trim($Row[lotsizedimensions])) { //print("$Row[lotsizedimensions]"); //if (!substr_count($Row[lotsizedimensions], "Lot")) {print " Lot Size";} //} print " "; if ("$Row[sqft]") { print (number_format("$Row[sqft]")." Sqft"); //$sqftsource=str_replace(" ", " " , "$Row[sqftsource]"); if ("$Row[sqftsource]") {print " (Src:"."$Row[sqftsource]".")";} }else{ print " "; } print " "; //elseif ($Row[county] and $Row[mun]!="Tucson") {print ("$Row[county] County");} //else print (" "); if ("$Row[bedrooms]" or "$Row[baths]") print(" "); if ("$Row[bedrooms]"=='1') $plural="Bedroom"; elseif ("$Row[bedrooms]">1) $plural="Bedrooms"; if ("$Row[bedrooms]") {print("$Row[bedrooms] $plural ");} if ("$Row[baths]"=='1') $plural_baths="Bath"; elseif ("$Row[baths]">1) $plural_baths="Baths"; if ("$Row[baths]") { //remove decimal places if filled with zeros $these_baths=str_replace(".00", "", "$Row[baths]"); $these_baths=str_replace("0", "", $these_baths); print("$Row[baths] $plural_baths "); } print (" | ");
if ($filename or $site_name) {
print("Property Details");
}else{
print("Property Details");
}
//print " "; print " "; //} $City = str_replace(" ", "+", "$Row[city]"); //$State = str_replace(" ", "+", $Row[state]); $State='AZ'; $Addrnum = str_replace(" ", "+", "$Row[addrnum]"); $Nsew = str_replace(" ", "+", "$Row[nsew]"); $Addrname = str_replace(" ", "+", "$Row[addrname]"); $Street_Suffix = str_replace(" ", "+", "$Row[street_suffix]"); $Zip = str_replace(" ", "+", "$Row[zip]"); $mapstring="city=$Mun&state=$State&address=$addrnum+$nsew+$addrname+$Street_Suffix&zip=$Zip&country=us&zoom=10"; $mapstring=str_replace("++", "+", $mapstring); $mapstring=str_replace("++", "+", $mapstring); $mapstring=str_replace("++", "+", $mapstring); //print("Map to this Home "); $latitude="$Row[latitude]"; $longitude="$Row[longitude]"; $County="$Row[County]"; $unit="$Row[Unit]"; /* ?> Map to this Home */ print "Request Information "; //print("Map to this Home ");
print("\$");
print number_format("$Row[price]"); //print(" $link_text"); print (" $Row[propsubtype]"); print " "; print "MLS# $Row[mlsno]"; print(" "); print " "; //if ($Row[status]) {print("$Row[status]");} //if ($Row[lotsqft]) print $Row[lotsqft]; if (($minlotsqft or $maxlotsqft) and $Row[lotsqft]){ //print (" $Row[lotsqft] Lot Sqft "); if ($Row[lotsqft]>=43560) { $page_acres=floor($Row[lotsqft]/43560); //$page_acres=($Row[lotsqft]/43560); if ($page_acres=='1') $plural="Acre"; elseif ($page_acres>1) $plural="Acres"; print(" ".$page_acres." $plural"); //print(number_format($page_acres,2)." $plural"); } } //if ($newonmarket) print " Listed $Row[listing_date]"; print (" | ||
/*
?>
Listings identified with the FMLS IDX logo come from FMLS, are held by brokerage firms other than the owner of this website and the listing brokerage is identified in listing details. Information is deemed reliable but is not guaranteed. © First Multiple Listing Service, Inc. For questions regarding this listing search engine, please contact Saguaro Data Systems. (service@saguaromail.com / 520-907-5639)
*/
include("/sites/default/data/fmls/last_updated.php");
print " | ||||
if ($filename){
print ("\$whereclause=\"$whereclause\"; include(\"/sites/default/data/fmls/saved/banner.htm\");?>\n");
//print " "; }elseif ($num_rows){ include("saved/banner.htm"); //print " "; } //include navigation section //include("navigation.asp"); }//end if whereclause ?> | ||||
"); print (" |
/*
" class="smalllink">Home Page | http://www.atlantarealestate-homes.com/data/fmls/sasearch.asp" class="smalllink">Property Search | Site Map |
"; } //else{ //if ($mypath!='/index.htm'){ //include "/sites/relocationusa_tp/armls/blogs.php"; //} //print ("