10 "); $num=mysql_numrows($result); if ($num<1 && $preview=='') echo ""; $user_id=mysql_result($result,0,"user_id"); $country=mysql_result($result,0,"country"); $city=mysql_result($result,0,"city"); $saletype=mysql_result($result,0,"saletype"); $property=mysql_result($result,0,"property"); $feature=mysql_result($result,0,"feature"); $size=mysql_result($result,0,"size"); $level=mysql_result($result,0,"level"); $price=mysql_result($result,0,"price"); $price_type=mysql_result($result,0,"price_type"); $currency=mysql_result($result,0,"currency"); $parking=mysql_result($result,0,"parking"); $garden=mysql_result($result,0,"garden"); $terrace=mysql_result($result,0,"terrace"); $balcony=mysql_result($result,0,"balcony"); $concierge=mysql_result($result,0,"concierge"); $gym=mysql_result($result,0,"gym"); $custom1=mysql_result($result,0,"custom1"); $custom2=mysql_result($result,0,"custom2"); $custom3=mysql_result($result,0,"custom3"); $custom4=mysql_result($result,0,"custom4"); $custom5=mysql_result($result,0,"custom5"); $custom6=mysql_result($result,0,"custom6"); $title=mysql_result($result,0,"title"); $description=mysql_result($result,0,"description"); $default_pic=mysql_result($result,0,"pic"); $lat=mysql_result($result,0,"lat"); $lng=mysql_result($result,0,"lng"); $zoom=mysql_result($result,0,"zoom"); $marker=mysql_result($result,0,"map_marker"); $price_display=number_format ($price, 0, '.', ','); $currency_symbol=$currencies[$currency]; if ($currency_symbol=="") $currency_display=$currency; if ($preview=='1') echo "

=== THIS IS A PREVIEW ONLY THIS PROPERTY IS NOT YET LIVE ON THE SYSTEM ===


"; echo "$city, $country - Property #$property_id"; $pic_directory="images/properties/$property_id"; $thumb_directory="images/properties/$property_id/thumbs"; $display_directory="images/properties/$property_id/display"; //Get dimensions of default image list($width, $height, $type, $attr) = getimagesize("$pic_directory/$default_pic"); // Display Existing Pic(s) echo ""; $time=time(); // first tackle the default pic echo "
"; $handle = opendir($pic_directory); $image_id=1; while (false !== ($image = readdir($handle))) { if ($image != "." && $image != ".." && $image != "thumbs" && $image != "display" ) { echo ""; if (is_int($image_id/2)) echo ""; $image_id++; } } closedir($handle); echo "
"; echo "
$title
$description
"; if ($price>0) echo "$currency_symbol $price_display $currency_display $price_type
"; echo "$feature $property
"; if ($size>0) echo "Size: $size sqm"; if (strlen($level)>0) echo ", level: $level
"; else echo "
"; if ($parking==1) echo "- Parking
"; if ($garden==1) echo "- Garden
"; if ($terrace==1) echo "- Terrace
"; if ($balcony==1) echo "- Balcony
"; if ($concierge==1) echo "- Concierge
"; if ($gym==1) echo "- Gym
"; if (strlen($level)>0) echo "- Level: $level
"; if (strlen($custom1)>0) echo "- $custom1
"; if (strlen($custom2)>0) echo "- $custom2
"; if (strlen($custom3)>0) echo "- $custom3
"; if (strlen($custom4)>0) echo "- $custom4
"; if (strlen($custom5)>0) echo "- $custom5
"; if (strlen($custom6)>0) echo "- $custom6
"; echo "

Print Listing

"; echo "
Email Listing to a Friend:

"; $action=$_REQUEST['action']; if ($action=="email_friend") { $friend_email=$_POST['friend_email']; $your_email=$_POST['your_email']; $to_address=$friend_email; $from_address=$your_email; $from_name=$site_title; $subject=$site_title." Property Information Request"; $body = FRIEND_TEXT1." http://$domain/property-$property_id.php Friend's email: $your_email ".FRIEND_TEXT2; //Only send if both addresses verify $result=VerifyEmail($friend_email); $verify=0; if($result[0]) $verify++; $result=VerifyEmail($your_email); if($result[0]) $verify++; if ($verify>1) { // consider the email headers to avoid junk filters $headers = "MIME-Version: 1.0\r\n" ."Content-Type: text/plain; charset=utf-8\r\n" ."Content-Transfer-Encoding: 8bit\r\n" ."From: =?UTF-8?B?". base64_encode($from_name) ."?= <$from_address>\r\n" ."X-Mailer: PHP/". phpversion(); mail($to_address, $subject, $body, $headers, "-f $from_address"); echo "".FRIEND_THANKS.""; } else echo "Sorry - invalid email address"; } echo "
"; echo " "; $action=$_REQUEST['action']; if ($action=="property_contact") { $full_name=$_POST['full_name']; $your_email=$_POST['your_email']; $your_phone=$_POST['your_phone']; $comments=$_POST['comments']; $from_address=$your_email; $from_name=$full_name; $from_phone=$your_phone; $subject=$Property_subject; $body = ENQUIRY_TEXT1." Name: $full_name Email Address: $your_email Phone Number: $your_phone Property Reference: $property_id http://$domain/property-$property_id.php Comments: $comments ".ENQUIRY_TEXT2; //Only send if addresses verify $result=VerifyEmail($your_email); if($result[0]) { // consider the email headers to avoid junk filters $headers = "MIME-Version: 1.0\r\n" ."Content-Type: text/plain; charset=utf-8\r\n" ."Content-Transfer-Encoding: 8bit\r\n" ."From: =?UTF-8?B?". base64_encode($from_name) ."?= <$from_address>\r\n" ."X-Mailer: PHP/". phpversion(); $result=mysql_query(" SELECT * FROM users WHERE id='$user_id' "); $owner_email=mysql_result($result,0,"email"); mail($owner_email, $subject, $body, $headers, "-f $from_address"); mail($listing_contact, $subject, $body, $headers, "-f $from_address"); echo "".ENQUIRY_THANKS.""; } else echo "Sorry - invalid email address"; } echo "
PROPERTY CONTACT FORM
Full Name:
Phone Number:
Email Address:
Subject:
Comments:
"; if ($lat <>0 && $lat !="") { /* THIS IS THE STATIC MAP WAY if ($marker==1) $map_link="http://maps.google.com/maps/api/staticmap?zoom=$zoom&size=440x300&maptype=roadmap&markers=color:red|label:|$lat,$lng&sensor=false"; else $map_link="http://maps.google.com/maps/api/staticmap?zoom=$zoom&size=440x300&maptype=roadmap&sensor=false"; */ // THIS IS THE DYNAMIC MAP WAY - so you can scroll around if ($marker==1) $map_link="http://maps.google.co.uk/maps?f=loc:q&source=s_q&hl=en&geocode=&q=$lat,$lng&ie=UTF8&z=$zoom&iwloc=&output=embed&"; else $map_link="http://maps.google.co.uk/maps?f=loc:q&source=s_q&hl=en&geocode=&ll=$lat,$lng&ie=UTF8&z=$zoom&iwloc=&output=embed&"; echo " "; } echo "
"; ?>