if (isset($_GET['id'])) {
$id = $_GET['id'];
$string = $api."property?propertyID=$id";
$res = simplexml_load_string(curl_get($string));
echo "
";
echo "
";
echo "".$res->address->advertising."
";
echo "$res->bedrooms Bedroom $res->type";
if (($res->type != "Flat") && ($res->type != "Studio") && ($res->type != "Maisonette" )) {
echo " House";
};
if ($res->sale == "true") {
echo " for Sale";
}
else {
echo " to Let";
};
echo "
";
echo "";
echo $res->address->town.", ".$res->address->postcode;
echo "";
echo "
";
$price = (int) $res->price;
if ($res->sale == "false") {
echo "
£".number_format($price)." ".$res->rentFrequency."";
}
else {
echo "
£".number_format($price)."";
};
echo "
";
$photos = array();
$imgsrc = $apibase."photos/";
$thumbsrc = $apibase."photos/thumbnails/";
for ($i = 0; $i < count($res->photos->photo); $i++) {
//$photos[$res->photos->photo[$i]->position] = $res->photos->photo[$i]->url;
$url = (string) $res->photos->photo[$i]->url;
$id = substr($url, (strrpos($url, "/") + 1));
$photos[$id] = (string) $res->photos->photo[$i]->caption;
};
//echo "
"; print_r($photos); echo "
";
if (count($photos) > 0) {
echo "
"
?>
foreach ($photos as $main=>$cap) {
echo "
";
};
?>
$maxp = count($photos) -1; ?>
echo $res->photos->photo[$maxp]->caption; ?>
reset($photos);
$photos = array_reverse($photos);
foreach ($photos as $main=>$cap) {
echo "
";
};
?>
echo "";
echo "
";
reset($photos);
$photos = array_reverse($photos);
$i = 0;
foreach ($photos as $main=>$cap) {
if ($i < 6) {
echo "
";
};
$i++;
};
echo "
";
};
echo "
";
echo "
Full Details
";
echo "
$res->description
$res->additional
";
echo "
Location
$res->location
";
echo "
Features
";
foreach ($res->features->feature as $feat) {
echo "- $feat
";
};
echo "
";
foreach ($res->floors->floor as $floor) {
echo "
$floor->name
";
echo "
";
foreach ($floor->rooms->room as $room) {
echo "- ";
echo "$room->name - $room->size";
echo "
";
echo "$room->description
";
echo " ";
};
echo "
";
};
//echo "
"; print_r($res); echo "
";
echo "
";
echo "
";
if (isset($_GET['s'])) {
?>
};
?>
Interested in this Property?
To arrange a viewing or request property details:
Call 020 8672 7273 or Email Us
Or fill out this form
Share this property with Twitter and Facebook
if (count($res->floorplans->floorplan) > 0) {
foreach ($res->floorplans->floorplan as $plan) {
echo "
";
echo "";
echo "";
};
echo "
Click on images to enlarge floorplans
";
};
?>
if (isset($_POST['vreq'])) {
echo "
Thanks for your request. Someone will be in touch as soon as possible to arrange your viewing.
";
if ($_POST['pass'] == "") {
$form = (object) $_POST;
$mailto = "jack@pearlestates.co.uk";
$mailsub = "Pearl Estates Website Enquiry";
$mailhead = "Cc: steve@remedymedia.co.uk\r\n";
$mailhead .= "Cc: aj@pearlestates.co.uk\r\n";
$mailhead .= "From: noreply@pearlestates.co.uk\r\n";
$mailhead .= "MIME-Version: 1.0 \r\n";
$mailhead .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$mailcont = "
Viewing Request
Property |
".$res->address->advertising." |
Name |
$form->fname $form->lname |
Address |
$form->add1 $form->add2 -$form->add3 $form->postcode |
Email |
$form->email |
Phone |
$form->phone |
Best time to call |
$form->time |
";
mail($mailto, $mailsub, $mailcont, $mailhead);
};
}
else {
?>
}; ?>
echo "
";
echo "
";
};
?>
include_once("footer.php");
?>