Skip to main content

Get Google Calendar Event List in WordPress

<a href="https://console.cloud.google.com/apis/credentials">Get Your Api Credentials Here</a> <a href="https://calendar.google.com/calendar">Get your Calender ID</a> <?php include_once("wp-load.php"); function  get_calender_events() { $params = array(); /*Get current date*/ $current_date  = date('Y-m-d H:i:s'); /*Convert it to google calendar's rfc_format */ $rfc_format = date("c", strtotime($current_date)); $params[] = 'orderBy=startTime'; $params[] ='maxResults=100'; $params[] = 'timeMin='.urlencode($rfc_format); $url_param = ''; foreach($params as $param) { $url_param.= '&'.$param; } $calender_id = "calender_id"; $client_key =  "client_key"; $url = "https://www.googleapis.com/calendar/v3/calendars/".$calender_id."/events?key=".$client_key."&singleEvents=true".$url_param; $list_events = wp_remote_post($url,

XML READ IN PHP

ajaxpropertysearch.php\
*********

<?php
//echo "<pre>";
//print_r($_REQUEST);
//$page = $_REQUEST['start'];
$page = !empty($_REQUEST['start']) ? (int)$_REQUEST['start'] : 1;

//$town = $_REQUEST['reference'];
if($_REQUEST['reference']==''){
$town = $_REQUEST['referencesearch'];
}else{
$town = $_REQUEST['reference'];
}
//echo $town;
//$saleorrental= $_REQUEST['saleorrent'];
if($_REQUEST['saleorrent']==''){
$saleorrental= $_REQUEST['rentorsale'];
}else{
$saleorrental= $_REQUEST['saleorrent'];
}
//echo $saleorrental;
$bedroom = $_REQUEST['bedroom'];
$minprice = $_REQUEST['price_min'];
$maxprice = $_REQUEST['price_max'];


function xml2array($xml) {
   $arXML = array();
   $arXML['name'] = trim($xml->getName());
   $arXML['value'] = trim((string)$xml);
   $t = array();
   foreach($xml -> attributes() as $name => $value){
      $t[$name] = trim($value);
   }
   $arXML['attr'] = $t;
   $t=array();
   foreach($xml -> children() as $name => $xmlchild) {
      $t[$name][] = xml2array($xmlchild); //FIX : For multivalued node
   }
   $arXML['children'] = $t;
   return($arXML);
}


   $xml = file_get_contents("http://www.vnclients.com/xmlfeed/xml_result.php?apikey=123&page=$page&town=$town&saleorrental=$saleorrental&bedrooms=$bedroom&minPrice=$minprice&maxPrice=$maxprice&perPage=5");
   $xml_array = xml2array(new SimpleXMLElement($xml));
   $xml_arrayfirst= $xml_array['children']['propertySearchSales']['0'];
   $xml_arraysecond=$xml_arrayfirst['children']['properties'][0];
   $xml_arrayfinal=$xml_arraysecond['children']['property'];
   $totalcount= $xml_arraysecond['children']['pages']['0']['attr']['countfound'];
   $per_page=5;
   $no_of_paginations = ceil($totalcount / $per_page);


   echo "<pre>";
   print_r($totalcount);

   $pagecount= $xml_array['children']['propertySearchSales']['0']['children']['properties']['0']['children']['pages']['0']['attr']['pageCount'];

   

$html='';  
$html.='<div id="divpaging" class="pager">';
            $html.='<h2 class="proTitle">Properties <span>'.$saleorrental.'</span> in <span>"'.$town.'"</span></h2>';
           $html.='<div class="PagingCointainer">';
$html.='<div class="pagination">';
$html.='<div class="nav" style="float:right">';
$html.='<ul>';
$pagination = new Pagination($page, $per_page, $totalcount);
            $delta = 1;
            $start = max(1, $page - $delta);
            $end = min($pagination -> total_pages(), $page + $delta);
           
           
            if ($start > 1) {
                $html.='<li style="float:left">';
$html.='<a id="pageing1" class="bot-link" value="1" title="1" onclick="javascript:displayproperty(1);">First</a>';
$html.='</li>';
                if ($start > 2) {
                    $html.='<li style="float:left">...</li>';
                }
            }
            for ($i = $start; $i <= $end; $i++) {
               
                if ($i == $page) {
                 
                    $html.='<li style="float:left">';
$html.='<a id="pageing'.$i.'" class="bot-link" value="'.$i.'" title="'.$i.'" onclick="javascript:displayproperty('.$i.');">'.$i.'</a>';
$html.='</li>';
                }              
                else {
                   
                    $html.='<li style="float:left">';
$html.='<a id="pageing'.$i.'" class="bot-link" value="'.$i.'" title="'.$i.'" onclick="javascript:displayproperty('.$i.');">'.$i.'</a>';
$html.='</li>';
                }
            }
            if ($end < $pagination -> total_pages()) {
                if ($end < $pagination -> total_pages() - 1) {
                    $html.='<li style="float:left">...</li>';
                }
                $html.='<li style="float:left">';
$html.='<a id="pageing'.$pagination -> total_pages().'" class="bot-link" value="'.$pagination -> total_pages().'" title="'.$pagination -> total_pages().'" onclick="javascript:displayproperty('.$pagination -> total_pages().');">Last</a>';
$html.='</li>';
               
            }
           
            /*if ($page > 1) {
$html.='<li style="float:left">';
$html.='<a id="pageing1" class="bot-link" value="1" title="1" onclick="javascript:displayproperty(1);">First</a>';
$html.='</li>';
if ($start > 2) {
echo " ... ";
}
}
/*if($page == 0){
$html.='<li style="float:left">';
$html.='<a id="pageing1" class="bot-link" value="1" title="1">First</a>';
$html.='</li>';
}
if($page >0){
$html.='<li style="float:left">';
$html.='<a id="pageing1" class="bot-link" value="1" title="1" onclick="javascript:displayproperty(1);">First</a>';
$html.='</li>';
}*/
/*for($j = 1; $j <= $pagecount; ++$j) {
if($j==1 && $page < 1){
/*$html.='<li style="float:left">';
$html.='<a id="pageing'.$j.'" class="bot-link" value="'.$j.'" title="'.$j.'" onclick="javascript:displayproperty('.$j.');">'.$j.'</a>';
$html.='</li>';*/
/* $html.='<li style="float:left">';
$html.='<a id="pageing1" class="bot-link" value="1" title="1" onclick="javascript:displayproperty(1);">First</a>';
$html.='</li>';
}
else if($j==$no_of_paginations){
$html.='<li style="float:left">';
$html.='<a id="pageing'.$j.'" class="bot-link" value="'.$j.'" title="'.$j.'" onclick="javascript:displayproperty('.$j.');">Last</a>';
$html.='</li>';
}
else{
$html.='<li style="float:left">';
if($j<$page && $j>1){
$html.='<a id="pageing'.$j.'" class="bot-link" value="'.$j.'" title="'.$j.'" onclick="javascript:displayproperty('.$j.');">'.$j.'</a>';
}else if($page >2 && $j < $page){
//$html.='<a id="pageing'.$page.'" class="bot-link" value="'.$page.'" title="'.$page.'" onclick="javascript:displayproperty('.$page.');">'.$page.'</a>';
$html.='<a id="pageing'.$j.'" class="bot-link" value="'.$j.'" title="'.$j.'" onclick="javascript:displayproperty('.$j.');">'.$j.'</a>';
}else if($j>$page) {
$html.='<a id="pageing'.$j.'" class="bot-link" value="'.$j.'" title="'.$j.'" onclick="javascript:displayproperty('.$j.');">'.$j.'</a>';
}
$html.='</li>';
}
}
*/
$html.='</ul>';
$html.='</div>';
$html.='</div>';
$html.='</div>';
$html.='<div class="cls"></div>';
            $html.='</div>';
  for($i = 0; $i < count($xml_arrayfinal); ++$i) {
  //echo "hiiii";
           $summaryDescription=$xml_arrayfinal[$i]['children']['summaryDescription']['0']['value'];
           $features=$xml_arrayfinal[$i]['children']['features']['0']['value'];
   $propertyid=$xml_arrayfinal[$i]['attr']['id'];
           $html.='<div class="propertyMain">';
            $html.='<div class="property-image"><img src="'.$xml_arrayfinal[$i]['attr']['pictureURL'].'" alt="" /></div>';
                        $html.='<div class="property-detail">';
                         $html.='<h1>'.$xml_arrayfinal[$i]['children']['town']['0']['value'].', '.$xml_arrayfinal[$i]['children']['county']['0']['value'].'</h1>';
$html.='<h3>'.$xml_arrayfinal[$i]['children']['pricetext']['0']['value'].'</h3>';
                            $html.='<div class="price"><span>'.$xml_arrayfinal[$i]['attr']['price'].'</span></div>';
                            $html.='<div class="detailLeft">';
                             $html.='<div class="bedroom">';
                                 $html.='<h1><span>'.$xml_arrayfinal[$i]['attr']['bedrooms'].'</span>Bedroom</h1>';
                                $html.='</div>';
                                $html.='<div class="specfication">';
                                 $html.='<ul>';
    $html.='<li>'.$xml_arrayfinal[$i]['attr']['propertyType'].'</li>';
                                     $html.='<li>'.$xml_arrayfinal[$i]['attr']['bathrooms'].'Bathroom</li>';
                                        $html.='<li>'.$xml_arrayfinal[$i]['attr']['tenure'].'</li>';
                                        $html.='<li>'.$xml_arrayfinal[$i]['attr']['status'].'</li>';                              
                                        $html.='<li>'.$xml_arrayfinal[$i]['children']['street']['0']['value'].'</li>';                                      
$html.='<li>'.$xml_arrayfinal[$i]['attr']['saleorrental'].'</li>';
                                    $html.='</ul>';
                                $html.='</div>';
                            $html.='</div>';
                            $html.='<div class="detailRgt">';
                             $html.='<div class="searchKey">';
                                 $html.='<ul>';
   if (strpos($summaryDescription, 'garden') !== false || strpos($features, 'garden') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-act.png" alt="" /></li>';                                      
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/tree-gray.png" alt="" /></li>';                                      
   }
   if (strpos($summaryDescription, 'parking') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/p-blue.png" alt="" /></li>';                                      
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-2.png" alt="" /></li>';                                      
                                        }
   if (strpos($summaryDescription, 'SHARE') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/s-blue.png" alt="" /></li>';                                  
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/share-3.png" alt="" /></li>';                                  
   }
                                     //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-act.png" alt="" /></li>';
                                        //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-2.png" alt="" /></li>';
                                        //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/share-3.png" alt="" /></li>';
                                    $html.='</ul>';
                                    $html.='<div class="cls"></div>';
                                $html.='</div>';
                                $html.='<div class="talk-to-advisior">';
                                 $html.='<div class="detail">';
                                     $html.='<p>Talk to a Knights personal, expert financial advisor</p>';
                                        $html.='<a href="finance/" class="click-here">click here</a>';
                                        $html.='<span class="tree-icon"><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/treeicon.png" alt="" /></span>';
                                    $html.='</div>';
                                $html.='</div>';
                                $html.='<a class="see-more" href="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/property-detail/?propertyId='.$propertyid.'&oieo='.$xml_arrayfinal[$i]['children']['pricetext']['0']['value'].'">SEE MORE</a>';
                            $html.='</div>';
                        $html.='</div>';
                        $html.='<div class="cls"></div>';        
           $html.='</div>';
}
 echo $html;

?>
<?php
class Pagination {

  public $current_page;
  public $per_page;
  public $total_count;

  public function __construct($page=1, $per_page=20, $total_count=0){
    $this->current_page = (int)$page;
    $this->per_page = (int)$per_page;
    $this->total_count = (int)$total_count;
  }

  public function offset() {
    return ($this->current_page - 1) * $this->per_page;
  }

  public function total_pages() {
    return ceil($this->total_count/$this->per_page);
    }

  public function previous_page() {
    return $this->current_page - 1;
  }

  public function next_page() {
    return $this->current_page + 1;
  }

    public function has_previous_page() {
        return $this->previous_page() >= 1 ? true : false;
    }

    public function has_next_page() {
        return $this->next_page() <= $this->total_pages() ? true : false;
    }


}
?>


ajaxpropertysearchdetail.php
******************
<?php 
//echo "<pre>";
//print_r($_REQUEST);
$page = $_REQUEST['start'];
//$town = $_REQUEST['reference'];
if($_REQUEST['reference']==''){
$town = $_REQUEST['referencesearch'];
}else{
$town = $_REQUEST['reference'];
}
//echo $town;
//$saleorrental= $_REQUEST['saleorrent'];
if($_REQUEST['saleorrent']==''){
$saleorrental= $_REQUEST['rentorsale'];
}else{
$saleorrental= $_REQUEST['saleorrent'];
}
//echo $saleorrental;
$bedroom = $_REQUEST['bedroom'];
$minprice = $_REQUEST['price_min'];
$maxprice = $_REQUEST['price_max'];

function xml2array($xml) {
   $arXML = array();
   $arXML['name'] = trim($xml->getName());
   $arXML['value'] = trim((string)$xml);
   $t = array();
   foreach($xml -> attributes() as $name => $value){
      $t[$name] = trim($value);
   }
   $arXML['attr'] = $t;
   $t=array();
   foreach($xml -> children() as $name => $xmlchild) {
      $t[$name][] = xml2array($xmlchild); //FIX : For multivalued node
   }
   $arXML['children'] = $t;
   return($arXML);
}


   $xml = file_get_contents("http://www.vnclients.com/xmlfeed/xml_result.php?apikey=123&page=$page&town=$town&saleorrental=$saleorrental&bedrooms=$bedroom&minPrice=$minprice&maxPrice=$maxprice");
   $xml_array = xml2array(new SimpleXMLElement($xml));
   $xml_arrayfirst= $xml_array['children']['propertySearchSales']['0'];
   $xml_arraysecond=$xml_arrayfirst['children']['properties'][0];
   $xml_arrayfinal=$xml_arraysecond['children']['property'];
   //echo "<pre>";
   //print_r($xml_array);
   
   //print_r( $xml_array['children']['propertySearchSales']['0']['children']['properties']['0']['children']['pages']['0']['attr']['pageCount']);
  
   //echo $xml_arrayfinal['0']['children']['features']['0']['value'];
   
   
   $pagecount= $xml_array['children']['propertySearchSales']['0']['children']['properties']['0']['children']['pages']['0']['attr']['pageCount'];
   
     
   
  $html='';
   $html.='<div id="divpaging" class="pager">';
            $html.='<h2 class="proTitle">Properties <span>'.$saleorrental.'</span> in <span>"'.$town.'"</span></h2>';
           $html.='<div class="PagingCointainer">';
$html.='<div class="pagination">';
$html.='<div class="nav" style="float:right">';
$html.='<ul>';
for($j = 1; $j <= $pagecount; ++$j) {
$html.='<li style="float:left">';
$html.='<a id="pageing'.$j.'" class="bot-link" value="'.$j.'" title="'.$j.'" onclick="javascript:displayproperty('.$j.');">'.$j.'</a>';
$html.='</li>';
}
  
$html.='</ul>';
$html.='</div>';
$html.='</div>';
$html.='</div>';
$html.='<div class="cls"></div>';
            $html.='</div>'; 
  for($i = 0; $i < count($xml_arrayfinal); ++$i) {
  //echo "hiiii";
           $summaryDescription=$xml_arrayfinal[$i]['children']['summaryDescription']['0']['value'];
           $features=$xml_arrayfinal[$i]['children']['features']['0']['value'];
   $propertyid=$xml_arrayfinal[$i]['attr']['id'];
           $html.='<div class="propertyMain">';
            $html.='<div class="property-image"><img src="'.$xml_arrayfinal[$i]['attr']['pictureURL'].'" alt="" /></div>';
                        $html.='<div class="property-detail">';
                         $html.='<h1>'.$xml_arrayfinal[$i]['children']['town']['0']['value'].', '.$xml_arrayfinal[$i]['children']['county']['0']['value'].'</h1>';
                            $html.='<div class="price"><span>'.$xml_arrayfinal[$i]['attr']['price'].'</span></div>';
                            $html.='<div class="detailLeft">';
                             $html.='<div class="bedroom">';
                                 $html.='<h1><span>'.$xml_arrayfinal[$i]['attr']['bedrooms'].'</span>Bedroom</h1>';
                                $html.='</div>';
                                $html.='<div class="specfication">';
                                 $html.='<ul>';
    $html.='<li>'.$xml_arrayfinal[$i]['attr']['propertyType'].'</li>';
                                     $html.='<li>'.$xml_arrayfinal[$i]['attr']['bathrooms'].'Bathroom</li>';
                                        $html.='<li>'.$xml_arrayfinal[$i]['attr']['tenure'].'</li>';
                                        $html.='<li>'.$xml_arrayfinal[$i]['attr']['status'].'</li>';                               
                                        $html.='<li>'.$xml_arrayfinal[$i]['children']['street']['0']['value'].'</li>';                                        
$html.='<li>'.$xml_arrayfinal[$i]['attr']['saleorrental'].'</li>';
                                    $html.='</ul>';
                                $html.='</div>';
                            $html.='</div>';
                            $html.='<div class="detailRgt">';
                             $html.='<div class="searchKey">';
                                 $html.='<ul>';
   if (strpos($summaryDescription, 'garden') !== false || strpos($features, 'garden') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-act.png" alt="" /></li>';                                       
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/tree-gray.png" alt="" /></li>';                                        
   }
   if (strpos($summaryDescription, 'parking') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/p-blue.png" alt="" /></li>';                                       
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-2.png" alt="" /></li>';                                       
                                        }
   if (strpos($summaryDescription, 'SHARE') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/s-blue.png" alt="" /></li>';                                    
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/share-3.png" alt="" /></li>';                                    
   }
                                     //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-act.png" alt="" /></li>';
                                        //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-2.png" alt="" /></li>';
                                        //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/share-3.png" alt="" /></li>';
                                    $html.='</ul>';
                                    $html.='<div class="cls"></div>';
                                $html.='</div>';
                                $html.='<div class="talk-to-advisior">';
                                 $html.='<div class="detail">';
                                     $html.='<p>Talk to a Knights personal, expert financial advisor</p>';
                                        $html.='<a href="finance/" class="click-here">click here</a>';
                                        $html.='<span class="tree-icon"><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/treeicon.png" alt="" /></span>';
                                    $html.='</div>';
                                $html.='</div>';
                                $html.='<a class="see-more" href="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/property-detail/?propertyId='.$propertyid.'">SEE MORE</a>';
                            $html.='</div>';
                        $html.='</div>';
                        $html.='<div class="cls"></div>';        
           $html.='</div>';
}
 echo $html;
?>


ajaxsimilarproperty.php
**********************************



<?php 
//echo "<pre>";
//print_r($_REQUEST);
$page = $_REQUEST['start'];

if($_REQUEST['reference']==''){
$town = $_REQUEST['referencesearch'];
}else{
$town = $_REQUEST['reference'];
}

if($_REQUEST['saleorrent']==''){
$saleorrental= $_REQUEST['rentorsale'];
}else{
$saleorrental= $_REQUEST['saleorrent'];
}

if($_REQUEST['propertytype']!=''){
  $propertytype = $_REQUEST['propertytype'];
}
$bedroom = $_REQUEST['bedroom'];
$minprice = $_REQUEST['price_min'];
$maxprice = $_REQUEST['price_max'];


function xml2array($xml) {
   $arXML = array();
   $arXML['name'] = trim($xml->getName());
   $arXML['value'] = trim((string)$xml);
   $t = array();
   foreach($xml -> attributes() as $name => $value){
      $t[$name] = trim($value);
   }
   $arXML['attr'] = $t;
   $t=array();
   foreach($xml -> children() as $name => $xmlchild) {
      $t[$name][] = xml2array($xmlchild); //FIX : For multivalued node
   }
   $arXML['children'] = $t;
   return($arXML);
}


   $xml = file_get_contents("http://www.vnclients.com/xmlfeed/xml_result.php?apikey=123&page=$page&propertytype=$propertytype&town=$town&saleorrental=$saleorrental&bedrooms=$bedroom&minPrice=$minprice&maxPrice=$maxprice");
   $xml_array = xml2array(new SimpleXMLElement($xml));
   $xml_arrayfirst= $xml_array['children']['propertySearchSales']['0'];
   $xml_arraysecond=$xml_arrayfirst['children']['properties'][0];
   $xml_arrayfinal=$xml_arraysecond['children']['property'];
   //echo "<pre>";
   //print_r($xml_array);
   
   $pagecount= $xml_array['children']['propertySearchSales']['0']['children']['properties']['0']['children']['pages']['0']['attr']['pageCount'];
   
  $html='';
   $html.='<div id="divpaging" class="pager">';
            $html.='<h2 class="proTitle">Properties <span>'.$saleorrental.'</span> in <span>"'.$town.'"</span></h2>';
           $html.='<div class="PagingCointainer">';
$html.='<div class="pagination">';
$html.='<div class="nav" style="float:right">';
$html.='<ul>';
for($j = 1; $j <= $pagecount; ++$j) {
$html.='<li style="float:left">';
$html.='<a id="pageing'.$j.'" class="bot-link" value="'.$j.'" title="'.$j.'" onclick="javascript:displayproperty('.$j.');">'.$j.'</a>';
$html.='</li>';
}
  
$html.='</ul>';
$html.='</div>';
$html.='</div>';
$html.='</div>';
$html.='<div class="cls"></div>';
            $html.='</div>'; 
  for($i = 0; $i < count($xml_arrayfinal); ++$i) {
  //echo "hiiii";
           $summaryDescription=$xml_arrayfinal[$i]['children']['summaryDescription']['0']['value'];
           $features=$xml_arrayfinal[$i]['children']['features']['0']['value'];
   $propertyid=$xml_arrayfinal[$i]['attr']['id'];
           $html.='<div class="propertyMain">';
            $html.='<div class="property-image"><img src="'.$xml_arrayfinal[$i]['attr']['pictureURL'].'" alt="" /></div>';
                        $html.='<div class="property-detail">';
                         $html.='<h1>'.$xml_arrayfinal[$i]['children']['town']['0']['value'].', '.$xml_arrayfinal[$i]['children']['county']['0']['value'].'</h1>';
                            $html.='<div class="price"><span>'.$xml_arrayfinal[$i]['attr']['price'].'</span></div>';
                            $html.='<div class="detailLeft">';
                             $html.='<div class="bedroom">';
                                 $html.='<h1><span>'.$xml_arrayfinal[$i]['attr']['bedrooms'].'</span>Bedroom</h1>';
                                $html.='</div>';
                                $html.='<div class="specfication">';
                                 $html.='<ul>';
    $html.='<li>'.$xml_arrayfinal[$i]['attr']['propertyType'].'</li>';
                                     $html.='<li>'.$xml_arrayfinal[$i]['attr']['bathrooms'].'Bathroom</li>';
                                        $html.='<li>'.$xml_arrayfinal[$i]['attr']['tenure'].'</li>';
                                        $html.='<li>'.$xml_arrayfinal[$i]['attr']['status'].'</li>';                               
                                        $html.='<li>'.$xml_arrayfinal[$i]['children']['street']['0']['value'].'</li>';                                        
$html.='<li>'.$xml_arrayfinal[$i]['attr']['saleorrental'].'</li>';
                                    $html.='</ul>';
                                $html.='</div>';
                            $html.='</div>';
                            $html.='<div class="detailRgt">';
                             $html.='<div class="searchKey">';
                                 $html.='<ul>';
   if (strpos($summaryDescription, 'garden') !== false || strpos($features, 'garden') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-act.png" alt="" /></li>';                                       
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/tree-gray.png" alt="" /></li>';                                        
   }
   if (strpos($summaryDescription, 'parking') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/p-blue.png" alt="" /></li>';                                       
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-2.png" alt="" /></li>';                                       
                                        }
   if (strpos($summaryDescription, 'SHARE') !== false){
 $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/s-blue.png" alt="" /></li>';                                    
   }else{
     $html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/share-3.png" alt="" /></li>';                                    
   }
                                     //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-act.png" alt="" /></li>';
                                        //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/gar-2.png" alt="" /></li>';
                                        //$html.='<li><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/share-3.png" alt="" /></li>';
                                    $html.='</ul>';
                                    $html.='<div class="cls"></div>';
                                $html.='</div>';
                                $html.='<div class="talk-to-advisior">';
                                 $html.='<div class="detail">';
                                     $html.='<p>Talk to a Knights personal, expert financial advisor</p>';
                                        $html.='<a href="finance/" class="click-here">click here</a>';
                                        $html.='<span class="tree-icon"><img src="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/wp-content/themes/knightlanding/images/treeicon.png" alt="" /></span>';
                                    $html.='</div>';
                                $html.='</div>';
                                $html.='<a class="see-more" href="http://artifexonline.dyndns.biz:8081/projects/wp_knightlanding/code/property-detail/?propertyId='.$propertyid.'">SEE MORE</a>';
                            $html.='</div>';
                        $html.='</div>';
                        $html.='<div class="cls"></div>';        
           $html.='</div>';
}
 echo $html;

?>

Comments

Popular posts from this blog

Create post with all post type

<?php /* add_action( 'wp_enqueue_scripts', 'mpcth_child_enqueue_scripts', 1000 ); function mpcth_child_enqueue_scripts() { wp_enqueue_style( 'mpc-styles-child', get_stylesheet_directory_uri() . '/style_custom.css' ); } */ function registration_form( $username, $fname, $lname, $email, $password, $confirm_password, $account_type, $distict_city, $school_name ,$school_address, $school_type, $grade_level, $invcode ) { ?>     <style>       /* Always set the map height explicitly to define the size of the div        * element that contains the map. */     #map {     height: 260px; }     </style>   <script> function initMap() {     var map = new google.maps.Map(document.getElementById('map'), {       center: {lat: -33.8688, lng: 151.2195},       zoom: 13     });     var input = document.getElementById('searchInput');    // map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);    

Create Signature pad with save on database in php

Create Signature pad with save on database in php 1.create a folder images index.php ============   <!DOCTYPE >     <head>     <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />     <title>Signature Pad</title>     <script type="text/javascript" src="jquery-1.8.0.min.js"></script>     <script type="text/javascript"> $(document).ready(function () {     /** Set Canvas Size **/     var canvasWidth = 400;     var canvasHeight = 100;     /** IE SUPPORT **/     var canvasDiv = document.getElementById('signaturePad');     canvas = document.createElement('canvas');     canvas.setAttribute('width', canvasWidth);     canvas.setAttribute('height', canvasHeight);     canvas.setAttribute('id', 'canvas');     canvasDiv.appendChild(canvas);     if (typeof G_vmlCanvasManager != 'undefined') {        

WooCommerce Mini cart With Ajax

WooCommerce Mini cart //MINI CART SECTION   <div class="productdiv rightcart">                                                         <?php if ( ! WC()->cart->is_empty() ) : ?>     <ul class="woocommerce-mini-cart cart_list product_list_widget <?php echo esc_attr( $args['list_class'] ); ?>">         <?php             do_action( 'woocommerce_before_mini_cart_contents' );             foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {                 $_product     = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );                 $product_id   = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );                 if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_widget_c