".number_format($price)." €"; echo "

PROPERTY REF".$ref."

"; $publish_up_new=$publish_up; $sqlpublish_up="select publish_up from sbp2.vfox_iproperty where mls_id = '$ID_LISTING'"; $resultpublish_up=mysqli_query($connection,$sqlpublish_up) or die("could not do sql on line 114"); while ($rowpublish_up=mysqli_fetch_array($resultpublish_up)) {extract($rowpublish_up);} if ($publish_up >= $publish_up_new) {$publish_up=$publish_up_new;} echo "

URL link to propertyhttp://www.villasfox.com/property?id=".$ID_LISTING."

"; if ($vtour <> '') {echo "

URL link to virtual tour http://www.villasfox.com/vtour?id=".$ID_LISTING."

";} echo "

Date property first listed".$publish_up."

"; $date1 = $publish_up; $date2 = date('m/d/Y h:i:s a', time()); //Convert them to timestamps. $date1Timestamp = strtotime($date1); $date2Timestamp = strtotime($date2); //Calculate the difference. $difference = intval(($date2Timestamp - $date1Timestamp)/(60*60*24)); echo "

Days advertised ".$difference." days

"; /*echo "

Views on www.villasfox.com".$hits."

"; echo "

Total constructed size (m2)$square_feet

";$sqft_saved=$square_feet; $ppm2=($price/($sqft+0.001)); echo "

Price per m2 constructed area".number_format($ppm2,0)."

"; //Lets calculate the benchmark // $cunter=0; $minagreed_price=9999999999; $sql3c="select agreed_price,square_feet from sbp2.smf_smds_cont_sales_progress join sbp2.vfox_osrs_properties on propref=ref where (agreed_price/'$price') >0.6 and (agreed_price/'$price')20 and idsscsp < 275000 order by idsscsp desc limit 100"; $result3c=mysqli_query($connection,$sql3c) or die("could not do sql on line 160"); while ($row3c=mysqli_fetch_array($result3c)) { extract ($row3c); $cunter=$cunter+1; $totppm2=$totppm2+($agreed_price/$sqft); if ($agreed_price>$maxagreed_price) {$maxagreed_price=$agreed_price;} if ($agreed_price<$minagreed_price) {$minagreed_price=$agreed_price;} } $benchmark=$totppm2/$cunter; echo "

Benchmark (the average price/m2 observed for previous ".$cunter." sales of properties in this price range)".(number_format($benchmark,0))."

"; echo "

Variation between advertised price/m2 and benchmark price/m2".number_format((($ppm2/$benchmark)*100)-100,1)." %"; echo "Benchmark price".number_format(($sqft_saved*$benchmark),0)." €"; echo "

"; echo "

Properties used in the benchmark comparison sold for final agreed prices between ".$minagreed_price." € and ".$maxagreed_price." €"; if ($propcode99=='') {echo "<align=center>Owners will see a button here which allows them to view lots of detailed information about similar properties to theirs which have already sold, including metres, number of bedrooms and bathrooms, plot size, location and final selling price.";} else {echo "

";} echo " "; */ echo ""; // this is an empty row in the wrapper table /// echo " "; /// that was an empty row in the wrapper table /// //show viewing history // echo " "; echo ""; echo ""; if ($ID_LISTING =="all") { $sql7="select * from sbp2.smf_smdscapturenotes as x left join sbp2.smf_smdscapture as y on x.entryid = y.id where viewing=1 order by entrydate desc"; } else { $sql7="select * from sbp2.smf_smdscapturenotes as x left join sbp2.smf_smdscapture as y on x.entryid = y.id where entrytype='$ID_LISTING' and viewing=1 order by entrydate desc"; } $result7=mysqli_query($connection,$sql7) or die("could not do sql on line 151"); $numberviewings=mysqli_num_rows($result7); while ($row7=mysqli_fetch_array($result7)) {extract ($row7); echo ""; } echo ""; echo " VIEWINGS Date Client Ref Language/nationality Feedback ".substr($entrydate,0,10)." $id $lang ".utf8_encode($feedback)." Total number of viewings = ".$numberviewings." "; // this is an empty row in the wrapper table /// echo " "; /// that was an empty row in the wrapper table /// //end of viewing history $id=''; // show enquiry history // echo " "; echo ""; echo ""; $sql="select * from sbp2.smf_smdsclass_listing_enquiries as x left join sbp2.smf_smdscapture as y on x.email=y.email where x.property_ref = '$ID_LISTING' order by x.date desc"; if ($ID_LISTING =="all") { $sql="select * from sbp2.smf_smdsclass_listing_enquiries order by date desc limit 1000"; } $result=mysqli_query($connection,$sql) or die("could not do sql on line 98"); $counter=mysqli_num_rows($result); $enquiries=$counter; while ($row=mysqli_fetch_array($result)) {extract($row); $info=strtolower($info); $word = "spanish"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Spanish";} $word = "español"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Spanish";} $word = "hola"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Spanish";} $word = "gracias"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Spanish";} $word = "english"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="English";} $word = "information"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="English";} $word = "belgium"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Belgium";} $word = "belgian"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Belgium";} $word = "french"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="French";} $word = "language: fr"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="French";} $word = "france"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="French";} $word = "sur ce bien"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="French";} $word = "pourriez"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="French";} $word = "german"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="German";} $word = "bitte"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="German";} $word = "angebot"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="German";} $word = "dutch"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Dutch";} $word = "netherlands"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Dutch";} $word = "informatie"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Dutch";} $word = "swedish"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Swedish";} $word = "sweden"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Swedish";} $word = "fastighet"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Swedish";} $word = "norwegian"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Norwegian";} $word = "norway"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Norwegian";} $word = "finnish"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Finnish";} $word = "finland"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Finnish";} $word = "danish"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Danish";} $word = "denmark"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Danish";} $word = "italian"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Italian";} $word = "italy"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Italian";} $word = "portuguese"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Portuguese";} $word = "portugal"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Portuguese";} $word = "polski"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="Polish";} $word = "polish"; if (($lang=='') and (strpos($info, $word) !== false)) { $lang="polish";} echo ""; if ($propcode99=="jhnm49s.d") {echo "";} else {echo "";} $email=""; echo ""; echo ""; $counter=$counter-1; } echo ""; echo " ENQUIRIES Activity number Date Client Ref Type Client language/nationality Price when enquiry made Source $counter ".substr($date,0,10)." $email $id Enquiry $lang ".number_format($price)." € $source_enq Total number of recorded enquiries: $enquiries "; // this is the end of the wrapper table /// echo ""; /// that was the end of the wrapper table /// echo ""; echo " "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo " Where can I see my property on other websites, besides this one? www.idealista.com www.kyero.com www.green-acres.com www.thinkspain.com www.aplaceinthesun.com www.apired.com www.yaencontre.com www.wallapop.com www.indomio.es www.spainhouses.net Fotocasa Habitaclia Milanuncios Facebook Instagram "; echo ""; ?>