//ini_set('display_errors', 1); //ini_set('display_startup_errors', 1); //error_reporting(E_ALL); //IM COMMENTING OUT THE HOST/USER/PASS CONFIGS FROM PAGES THAT QUERY HOMES DATA SO THEY CAN USE THE CONFIG BELOW TO QUERY HOMES DATA FROM OTHER SERVER. REFERRALS DB QUERIES WILL BE LEFT AS THEY ARE SO THEY QUERY/ADD/UPDATE THE LOCAL SERVER USING THE LOCALHOST CREDENTIALS THEY HAVE. $host="localhost"; $user="root"; $password="baldeagle"; $user_agent=$_SERVER['HTTP_USER_AGENT']; //print "$user_agent
"; $ip=$REMOTE_ADDR; $host_name= str_replace('www.','',$_SERVER['HTTP_HOST']); //print "$host_name
"; $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"); include ("lastrecip.php"); include "header_variables.htm"; include "spam_lead_checks.htm"; //print "$cookie_refer
"; //$referer=$_SERVER["HTTP_REFERER"]; //print "$referer"; //$articlepath=$REQUEST_URI; $articlepath=$_SERVER["REQUEST_URI"]; if ( !substr_count($articlepath, "/blog/") and !substr_count($articlepath, "enter_commitment.htm") and !substr_count($articlepath, ".css") and !substr_count($articlepath, ".js") ) { //load rest of header file //print_r($_COOKIE); //$mypath=($SCRIPT_NAME); //print "$mypath
$articlepath"; $mypath=str_replace("%20", " ", $articlepath); //$key=date("F j, Y"); //$key=date('l jS \of F Y \h\i\h\o'); $key = mktime(0, 0, 0, date("m")-4, date("d"), date("Y")); $ckey=crypt($key); $losturl=$articlepath; //print "$thisurl"; $htmcount=substr_count($losturl, ".htm"); $homescount=substr_count($losturl, "/homes/"); $spacecount=substr_count($losturl, "%20"); //print "
$spacecount"; if ($spacecount>=5 and $htmcount and $homescount) { $homespage='yes'; //set header ok after www. url redirect if ($www_count==1){ //header("HTTP/1.1 200 OK"); } } function reverse_words($phrase) { $array = explode(' ', $phrase); $result = ''; $len = count($array)-1; for($i=$len; $i>=0; $i--) {$result.= $array[$i] . ' ';} $result = rtrim($result); return $result;} //echo reverse_words('i love you'); //$longshow=str_replace(".htm", "", $longshow); //$longshow=str_replace("district school", "school district", $longshow); //print $longshow; //echo $referral_id; $today=date("Y-m-d H:i:s"); //echo $today; //print $cookie_show." ------- ".$cookie_mypath; include "header_variables.htm"; $thisbrokerage='relocationUSA'; $theirip=$_SERVER['REMOTE_ADDR']; $mydir='tar'; $partner='barb'; $site_name=('tucsonproperties.net'); $lastrecip='lastrecip'; $recip_page='recip_page'; $entry_date='entry_date'; //$table='partners'; //print ("--$whichsection--"); //print_r($_COOKIE); //SHOW IS THE FILE NAME //print ("$mypath
"); $rev=strrev($mypath); //print ("$rev
"); $pos=strpos($rev, "/"); //print ("$pos
"); $show=substr($rev, 0, $pos); //print ("$show
"); $longshow=substr($rev, $pos); //print ("$longshow
"); $show=strrev($show); //print ("$show
"); $longshow=strrev($longshow); $longshow=str_replace("/", " ", $longshow); if ($longshow!='school district') $longshow=reverse_words($longshow); //print ("$longshow
"); $show=substr($show, 0, strlen($show)-4 ); //print ("$show
");
//print "$show
";
$underscorepos=strpos($show, "_");
//print "$underscorepos
";
if ($underscorepos) {
$pagenum=substr($show, $underscorepos+1);
//print "$pagenum";
$show=substr($show, 0, $underscorepos);
} //end if
//if ($mlsno and $show!="saproperty") header("location:/data/tar/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/")) {$modifier=("Horse ");}
//if (substr_count($mypath, "/acres/")) {$ender=(" on 1 or more Acres of Land");}
if (substr_count($mypath, "/homes/") or substr_count($mypath, "/property/")){
$spacepos=strpos($show, " ");
$show=substr($show, $spacepos, 100);
}
/*
if (substr_count($mypath, "/levels/") or substr_count($mypath, "/zip/")) {} else
{
$digits = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
$show=str_replace($digits,"",$show);
}
*/
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, "/popular.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, "/style.htm")) {$between=('by');}
if (substr_count($mypath, "/rent.htm")) {$between=('for');}
if (substr_count($mypath, "special/University")) {$show="University of Arizona Area";}
if (substr_count($mypath, "/Acres")) {$between=""; $show="with Land"; $list="yes";}
if (substr_count($mypath, "/bankowned.htm")) {$modifier="Bank Owned"; $between=''; $show='by Area';}
if (substr_count($mypath, "/bankowned/")) {$modifier="Bank Owned";}
if (substr_count($mypath, "/shortsale.htm")) {$modifier="Short Sale"; $between=''; $show='by Area';}
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, "/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")) {$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.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, "/values")) {$firstpart=('Best Values');}
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 Properties');}
if (substr_count($mypath, "/commercial")) {$firstpart=('Commercial Properties');}
if (substr_count($mypath, "/Single Family/")) {$firstpart=('Single Family Homes');}
if (substr_count($mypath, "/Single Family (New)/")) {$firstpart=('Single Family (New) Homes');}
if (substr_count($mypath, "/Condominium/")) {$firstpart=('Condominiums');}
if (substr_count($mypath, "/Townhouse/")) {$firstpart=('Towhouses');}
//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
if (substr_count($mypath, 'armls')) {$kwd='Phoenix'; $propsearch='armls';} else {$kwd='Tucson'; $propsearch='tar';}
//echo $kwd;
//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|
");
//NOT USING
//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");
//
?>
"; //if ($pagenum) $thistitle.=" - Page $pagenum"; //} //else $thistitle=("$middler $show $ender Tucson $modifier $firstpart"); $thistitle=str_replace(" ", " ", $thistitle); $thistitle=str_replace(" ", " ", $thistitle); $thistitle=str_replace(" ", " ", $thistitle); $thistitle=str_replace(" ", " ", $thistitle); $thistitle=trim($thistitle); $thistitle="
" class="smalllink">Home Page | http://www.tucsonproperties.net/data/tar/sasearch.asp" class="smalllink">Property Search | Site Map |
*/ } //end if //print $site_name; } //load entire file if not articles ?>
|
Map
$area="Upper NorthWest"; $mun="Oracle"; include("/sites/default/data/tar/show_area.php");?>
$subdivision="Saddlebrooke Ranch"; $mun="Oracle"; include("/sites/default/data/tar/show_subdivision.php");?>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Additional Photos: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"; include "header_footer_links.htm"; ?> /*
" class="smalllink">Home Page | http://www.tucsonproperties.net/data/tar/sasearch.asp" class="smalllink">Property Search | Site Map |
|
} ?> //} //else { /* $arr = array("index", "city", "area", "listingtype", "builder", "subdivision", "community", "zip", "armls"); foreach ($arr as $arg) { $found_script=strpos($mypath, "$arg.htm"); if ($found_script === false) {} else $found='true'; } //end for if ($found) print "Brought to you by: Realty Center of Arizona"; else print" Information Deemed Reliable But Not Guaranteed |
|
Click 'Like' to Share this Site on Facebook! |
Tweet | Click 'Tweet' to Share this Site on Twitter! |
Click 'Share' to Share this on LinkedIn! |