include_once("../include/config.php"); include_once("../include/db.php"); require_once('../lib/translate/config.inc.php'); require_once('../lib/translate/class/ServicesJSON.class.php'); require_once('../lib/translate/class/MicrosoftTranslator.class.php'); $translator = new MicrosoftTranslator(ACCOUNT_KEY); $selectbox = array('id'=> 'txtLang','name'=>'txtLang'); $translator->getLanguagesSelectBox($selectbox); session_start(); $e = $_GET["e"]; $s = $_GET["s"]; if($_SESSION['sess_user_login_id'] > 0 ){ $myuserid=$_SESSION['sess_user_login_id']; if($myuserid != ""){ $myLeoUserinfo = get_LeoUserinfo($myuserid); $myrealname = $myLeoUserinfo{'realname'}; $mytype = $myLeoUserinfo{'type'}; $myemail = $myLeoUserinfo{'email'}; $myphone = $myLeoUserinfo{'phone'}; $mycell = $myLeoUserinfo{'cell'}; } }else{ } if($myemail == ''){ $myemail = $e; } if(isset($_GET["a"]) && $_GET["a"] > 0 ){ $myLeoTeamUserinfo = get_LeoTeamUserinfo($_GET["a"]); $myfirstname = $myLeoTeamUserinfo{'firstname'}; $mycellphone = $myLeoTeamUserinfo{'cellphone'}; }else{ $myfirstname = 'Leo'; $mycellphone = '416.836.6826'; } if(sizeof($_POST) > 0 || sizeof($_GET) > 0) { // true if form has been submitted if($_GET["mls"]){ $mls = $_GET["mls"]; /* if(preg_match("/^[A-Z][4|7]/i", $mls)){ $fmls = $mls; $mls = FMLS2MLS($fmls); }else{ $fmls = MLS2FMLS($mls); } */ $row = GetPropertyInfoByMLS($mls); //print "Got here"; //if($row == ''){ // $row = GetPropertyInfoAllByMLS($mls); //} //print $row['AskingPrice'];exit; } elseif ($_GET["fmls"]) { $fmls = $_GET["fmls"]; $mls = FMLS2MLS($fmls); $row = GetPropertyInfoByMLS($mls); if($row == ''){ $row = GetPropertyInfoAllByMLS($mls); } } else { header("Location: /index.php"); exit(0); } $MLS = $row['MLS']; if(is_mls_active($MLS)){ $activeString = ""; }else{ //$activeString = "(This property might not be available, please register at bottom to confirm.)"; $activeString = "(This listing is not active, please click Here to search current active listings.)"; } $FMLS = MLS2FMLS($MLS); $PtypeA = $row['PtypeA']; $PtypeB = $row['PtypeB']; $Province = $row['Province']; $City = $row['City']; $Area = $row['Area']; $Municipality = $row['Municipality']; $Community = $row['Community']; $Paddress = $row['Paddress']; $Paddress2 = $row['Paddress2']; $MapAddressString = $Paddress.','.$City.','.$Province; $PaddressTitle = preg_replace('/^\s+/i', '', $Paddress); $PaddressTitle = preg_replace('/\s+$/i', '', $PaddressTitle); $PaddressTitle = preg_replace('/\d+$/i', '', $PaddressTitle); $PaddressTitle = preg_replace('/^\d+/i', '', $PaddressTitle); if($PtypeA == 'Condo Apt'){ $AreaTitle = $City.' condo,'.$Community; }else{ $AreaTitle = $City.' house,'.$Community; } $PostalCode = $row['PostalCode']; $PLatitude = $row['PLatitude']; $PLongitude = $row['PLongitude']; if($PLatitude == 0 || $PLongitude == 0){ ini_set('display_errors', 'on'); $coords = array(); $coords = geocode($PostalCode); $PLatitude = $coords['lat']; $PLongitude = $coords['lng']; $PLatitudeNum = (float)$PLatitude; $PLongitudeNum = (float)$PLongitude; $mylat = (int)($PLatitudeNum*1000000); $mylon = (int)(-($PLongitudeNum*1000000)); $tmpSQL = "UPDATE wisedeal_properties SET PLatitude = '".$PLatitude."',PLongitude = '".$PLongitude."', lat=".$mylat.", lon=".$mylon." WHERE MLS = '".$MLS."'"; mysql_query($tmpSQL); $tmpSQL1 = "UPDATE wisedeal_properties_all SET PLatitude = '".$PLatitude."',PLongitude = '".$PLongitude."', lat=".$mylat.", lon=".$mylon." WHERE MLS = '".$MLS."'"; mysql_query($tmpSQL1); //echo $tmpSQL; } $LastStatus = $row['LastStatus']; $AskingPrice = $row['AskingPrice']; //if($AskingPrice > 10000){ $AskingPrice = $AskingPrice - 2100; } $ContactDate = $row['ContactDate']; $ExpiryDate = $row['ExpiryDate']; $LastUpdate = $row['LastUpdate']; $SoldDate = $row['SoldDate']; $ClosingDate = $row['ClosingDate']; $TrebArea = $row['TrebArea']; $DOM = $row['DOM']; $Taxes = $row['Taxes']; $PriceSold = $row['PriceSold']; $PriceList = $row['PriceList']; $Intersection = $row['Intersection']; $Seller = $row['Seller']; $Occup = $row['Occup']; $Possession = $row['Possession']; $Rooms = $row['Rooms']; $Bedrooms = $row['Bedrooms']; $BedroomsPlus = $row['BedroomsPlus']; $Washrooms = $row['Washrooms']; $Kitchens = $row['Kitchens']; $Familyrooms = $row['Familyrooms']; $Basement = $row['Basement']; $Apxage = $row['Apxage']; $ApxSqft = $row['ApxSqft']; $Exposure = $row['Exposure']; $Maint = $row['Maint']; $Pool = $row['Pool']; $ExerciseRm = $row['ExerciseRm']; $Locker = $row['Locker']; $RecRoom = $row['RecRoom']; $Sauna = $row['Sauna']; $Security = $row['Security']; $Squash = $row['Squash']; $Tennis = $row['Tennis']; $HeatIncl = $row['HeatIncl']; $HydroIncl = $row['HydroIncl']; $WaterIncl = $row['WaterIncl']; $TaxesIncl = $row['TaxesIncl']; $CableTVIncl = $row['CableTVIncl']; $CACIncl = $row['CACIncl']; $BldgInsurIncl = $row['BldgInsurIncl']; $ParkingIncl = $row['ParkingIncl']; $CommonElementsIncl = $row['CommonElementsIncl']; $Balcony = $row['Balcony']; $EnsuiteLaundry = $row['EnsuiteLaundry']; $PetsPerm = $row['PetsPerm']; $Exterior = $row['Exterior']; $GarParkSp = $row['GarParkSp']; $ParkDrive = $row['ParkDrive']; $ParkType = $row['ParkType']; $ParkSpaces = $row['ParkSpaces']; $ParkSpot = $row['ParkSpot']; $ParkCostMo = $row['ParkCostMo']; $Photos = $row['Photos']; $VirtualURL = $row['VirtualURL']; $AdOK = $row['AdOK']; $misc = $row['misc']; $Dimensions = $row['Dimensions']; $Dimensions = str_replace("~q~", "\'", $Dimensions); $Dimensions = str_replace("~qq~", "\"", $Dimensions); $Fulldescription = $row['Fulldescription']; $Fulldescription = preg_replace('/Remarks for Brokerages:.*/i','',$Fulldescription); $Fulldescription = preg_replace('/Remarks For Clients: /i','',$Fulldescription); $FulldescriptionShort = substr($Fulldescription, 0, 300); $FulldescriptionShort .= "... More"; $theimages = preg_split("/\|/i", $Photos,-1 , PREG_SPLIT_NO_EMPTY); //print $myrealname."=>".$mytype; // if($myrealname && $mytype >= 5){ /// Initialize the array $theimages = array(); $last3string = substr($MLS, -3); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/1/".$last3string."/".$MLS.".jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/2/".$last3string."/".$MLS."_2.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/3/".$last3string."/".$MLS."_3.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/4/".$last3string."/".$MLS."_4.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/5/".$last3string."/".$MLS."_5.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/6/".$last3string."/".$MLS."_6.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/7/".$last3string."/".$MLS."_7.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/8/".$last3string."/".$MLS."_8.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/9/".$last3string."/".$MLS."_9.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/10/".$last3string."/".$MLS."_10.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/11/".$last3string."/".$MLS."_11.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/12/".$last3string."/".$MLS."_12.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/13/".$last3string."/".$MLS."_13.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/14/".$last3string."/".$MLS."_14.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/15/".$last3string."/".$MLS."_15.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/16/".$last3string."/".$MLS."_16.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/17/".$last3string."/".$MLS."_17.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/18/".$last3string."/".$MLS."_18.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/19/".$last3string."/".$MLS."_10.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/20/".$last3string."/".$MLS."_20.jpg"); array_push($theimages, "http://v3.torontomls.net/Live/photos/FULL/21/".$last3string."/".$MLS."_21.jpg"); /* */ // } $countImages = count($theimages); $MainImage = $theimages[0]; if (preg_match("/Estate/i", $Seller)){ $SellerInfo = "遗产房"; }elseif(preg_match("/Bank/i", $Seller)){ $SellerInfo = "银行拍卖房"; }else{ $SellerInfo = ""; } if($_GET["e"] && $_GET["s"]){ $query = 'update leo_clients set '. "emailok = 'Alert'". " where email = '".$e."'"; $result = MYSQL_QUERY($query); $to = 'simonzl@gmail.com'; $subject = $_GET["s"].' '.$e.' has responded eAlert! => '.$MLS; $body = $e.' has responded eAlert! => '.$MLS; if (mail($to, $subject, $body)) { //echo("
Message successfully sent!
"); } else { //echo("Message delivery failed...
"); } }else if($_GET["s"]){ $to = 'info@leozhang.ca'; $subject = $_GET["s"].' has responded Ad! => '.$MLS; $body = $_GET["s"].' has responded Ad! => '.$MLS; if (mail($to, $subject, $body)) { //echo("Message successfully sent!
"); } else { //echo("Message delivery failed...
"); } }else if($_GET["e"]){ $to = 'simonzl@gmail.com'; $subject = $_GET["e"].' has responded Ad! => '.$MLS; $body = $_GET["e"].' has responded Ad! => '.$MLS; if (mail($to, $subject, $body)) { //echo("Message successfully sent!
"); } else { //echo("Message delivery failed...
"); } }else{ // Do nothing ... } } ?>房屋编号ID: echo $FMLS; ?> 新上市: $today = date("Y-m-d");$OnMarketDays = datediff('d', $ContactDate, $today, false); ?> echo $OnMarketDays; ?> 天
城市: echo $City; ?> 地区: echo $Municipality; ?>
附近的路口: echo $Intersection; ?>
类型: echo $PtypeA; ?> , echo $PtypeB; ?>
卧室: echo $Bedrooms; ?> echo ($BedroomsPlus)?"+$BedroomsPlus":""; ?> 洗手间: echo $Washrooms; ?>
地下室: echo $Basement; ?> 房龄: echo $Apxage; ?> 大小: echo $ApxSqft; ?>
朝向: echo $Exposure; ?> 管理费: $ echo $Maint; ?>
房屋状态: echo $Occup; ?> 最快交接日期: echo $Possession; ?>
城市: echo $City; ?> 地区: echo $Municipality; ?>
附近的路口: echo $Intersection; ?>
类型: echo $PtypeA; ?> , echo $PtypeB; ?>
卧室: echo $Bedrooms; ?> echo ($BedroomsPlus)?"+$BedroomsPlus":""; ?> 洗手间: echo $Washrooms; ?>
地下室: echo $Basement; ?> 房龄: echo $Apxage; ?> 大小: echo $ApxSqft; ?>
朝向: echo $Exposure; ?> 管理费: $ echo $Maint; ?>
房屋状态: echo $Occup; ?> 最快交接日期: echo $Possession; ?>