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["pid"]>0 || $_POST["pid"]>0){ $pid = $_GET["pid"]; $row = GetCREAPropertyInfoByPID($pid); $MLS = $row['MLS']; $Paddress = $row['Address_StreetAddress']; $AskingPrice = $row['Price']; $AskingPriceString = number_format($AskingPrice); $ContactDate = $row['ListingLastUpdated']; $RealDOM_tmp = strtotime(date("Y-M-d")) - (strtotime($ContactDate)); $RealDOM = floor($RealDOM_tmp/3600/24)+1; $Bedrooms = $row['Building_BedroomsTotal']; $Washrooms = $row['Building_BathroomTotal']; $Province = $row['Address_Province']; $City = $row['Address_City']; $PostalCode = $row['Address_PostalCode']; $PLatitude = $row['PLatitude']; $PLongitude = $row['PLongitude']; $PtypeA = $row['Building_ConstructionStyleAttachment']; $PtypeB = $row['Building_Type']; $OwnershipType = $row['OwnershipType']; $Fulldescription = $row['PublicRemarks']; $Fulldescription = preg_replace("/\([^)]+\)/","",$Fulldescription); $Fulldescription = preg_replace("/\'/","~q~",$Fulldescription); $Fulldescription = preg_replace("/\"/","~qq~",$Fulldescription); //str_replace(array( '(', ')' ), '', $Fulldescription); $FulldescriptionShort = substr($Fulldescription, 0, 300); $FulldescriptionShort .= "... More"; $theimages = array(); if(preg_match("/^164[4-9]/", $pid) || preg_match("/^165[5-6]/", $pid) ){ $image_server = "www.wisedeal.ca"; }elseif(preg_match("/^164[2-3]/", $pid) || preg_match("/^165[7-9]/", $pid)) { $image_server = "www.i4cc.ca"; }elseif(preg_match("/^166000/", $pid)) { $image_server = "104.222.123.207"; }else{ $image_server = "www.leozhang.ca"; } //$last3string = substr($MLS, -3); $img1 = "http://".$image_server."/images/crea/".$pid."_1.jpg"; $img2 = "http://".$image_server."/images/crea/".$pid."_2.jpg"; $img3 = "http://".$image_server."/images/crea/".$pid."_3.jpg"; $img4 = "http://".$image_server."/images/crea/".$pid."_4.jpg"; $img5 = "http://".$image_server."/images/crea/".$pid."_5.jpg"; $img6 = "http://".$image_server."/images/crea/".$pid."_6.jpg"; $img7 = "http://".$image_server."/images/crea/".$pid."_7.jpg"; $img8 = "http://".$image_server."/images/crea/".$pid."_8.jpg"; $img9 = "http://".$image_server."/images/crea/".$pid."_9.jpg"; $img10 = "http://".$image_server."/images/crea/".$pid."_10.jpg"; $img11 = "http://".$image_server."/images/crea/".$pid."_11.jpg"; $img12 = "http://".$image_server."/images/crea/".$pid."_12.jpg"; array_push($theimages, $img1); array_push($theimages, $img2); array_push($theimages, $img3); array_push($theimages, $img4); array_push($theimages, $img5); array_push($theimages, $img6); array_push($theimages, $img7); array_push($theimages, $img8); array_push($theimages, $img9); array_push($theimages, $img10); array_push($theimages, $img11); array_push($theimages, $img12); $countImages = count($theimages); $MainImage = $theimages[0]; 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 ... } }else{ $themsg = "对不起,此物业已经售出! SOLD! 好的房子不会停留超过1周的,所以请您第一时间安排看房! 谢谢! 请点击这里回首页 搜索最新的物业! LEO"; echo '房屋编号ID: echo $MLS; ?> 新上市: $today = date("Y-m-d");$OnMarketDays = datediff('d', $ContactDate, $today, false); ?> echo $OnMarketDays; ?> 天
城市: echo $City; ?> 地区: echo $Province; ?>
类型: echo $PtypeA; ?> , echo $PtypeB; ?>
产权: echo $OwnershipType; ?>
卧室: 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; ?>