Nekretnine u Alanji – Dobrodošli!

Nekretnine u Alanji

"; $sorgu = mysql_query($sorgu); while ($cek=mysql_fetch_array($sorgu)) { $trid= $cek['ID']; //echo $trid; $sorgu_nl = mysql_query("select * from M1U4dxQdaH_posts where M1U4dxQdaH_posts.post_status ='publish' and ID='".$trid."' order by ID desc limit 5"); while ($ceknl=mysql_fetch_array($sorgu_nl)) { if ($ceknl['post_status']!=='publish'){continue;} $id = $ceknl['ID']; $title = $ceknl['post_title']; $desc = $ceknl['post_content']; $guid = $ceknl['guid']; $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='property_price') { $price=doubleval($cekmeta['meta_value']);} if ($cekmeta['meta_key']=='property_label_before') { $pricepre=$cekmeta['meta_value'];} } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='property_size') { $size=$cekmeta['meta_value'];} } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_term_relationships where object_id = '".$id."'"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { $termid=$cekmeta['term_taxonomy_id']; $sorgu_meta2 = mysql_query("select * from M1U4dxQdaH_terms where term_id = '".$termid."'"); while ($cekmeta2=mysql_fetch_array($sorgu_meta2)) { $sorgu_meta3 = mysql_query("select * from M1U4dxQdaH_term_taxonomy where term_id = '".$termid."'"); while ($cekmeta3=mysql_fetch_array($sorgu_meta3)) { if ($cekmeta3['taxonomy']=='property_city') { $location=$cekmeta2['name'];} if ($cekmeta3['taxonomy']=='property_type') { //$ptype=$cekmeta2['name']; } } } } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='property_rooms') { $bedrooms=$cekmeta['meta_value'];} } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='property_bathrooms') { $bathrooms=$cekmeta['meta_value'];} } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='mls') { $ref=$cekmeta['meta_value'];} } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='property_location') { $map=$cekmeta['meta_value'];} //$maplat=$cekmeta['houzez_geolocation_lat']; //$maplong=$cekmeta['houzez_geolocation_long']; } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='_thumbnail_id') { $imagethumbid=$cekmeta['meta_value']; $sorgu_thumb= mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$imagethumbid."'"); while ($cekthumb=mysql_fetch_array($sorgu_thumb)) { if ($cekthumb['meta_key']=='_wp_attached_file') { $imgthumb=$cekthumb['meta_value'];} } } } $sorgu_meta = mysql_query("select * from M1U4dxQdaH_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='property_images') { $images=$cekmeta['meta_value'];} } } $price=number_format($price,"0",".",".")." €"; echo '
//
  • '.$pricepre.''.$price.'
  • '.$size.' m²
  • '.$bathrooms.' Kupaonice
  • '.$bedrooms.' Spavaće sobe

'.$title.'

'.$location.' - Ref: '.$ref.'

'.substr(strip_tags($desc),0,150).'...

'; $pricepre=''; } ?>