$obj = $_GET['obj']; if (empty($obj)){ header("Location: property_list.php"); } $dbhost="5.35.241.205"; $dbuser="wordpress_l"; $dbpass="zU6#92uaEK"; $dbadi="wordpress_w"; $baglan= mysql_connect ($dbhost, $dbuser, $dbpass); if (! $baglan) die ("mysql error"); mysql_select_db ($dbadi, $baglan) or die ("DB error"); mysql_query("SET NAMES utf8"); mysql_query("SET CHARACTER SET utf8"); mysql_query("SET COLLATION_CONNECTION = 'utf8_general_ci'"); $sorgu_nl = mysql_query("select * from M1U4dxQdaH_posts where ID='".$obj."'"); while ($ceknl=mysql_fetch_array($sorgu_nl)) { if ($ceknl['post_status']!=='publish'){continue;} $id = $ceknl['ID']; $title = $ceknl['post_title']; $guid = $ceknl['guid']; $desc = $ceknl['post_content']; $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']);} $listings_currency = '€'; $price_decimals = '0'; $price_thousands_separator = ','; $price_decimal_point_separator = '.'; 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_postmeta where post_id = '".$id."' order by meta_id"); while ($cekmeta=mysql_fetch_array($sorgu_meta)) { if ($cekmeta['meta_key']=='property_rooms') { $rooms=$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_bedrooms') { $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_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_city') { $map=$cekmeta['meta_value'];} if ($cekmeta['meta_key']=='property_latitude') { $maplat=$cekmeta['meta_value'];} if ($cekmeta['meta_key']=='property_longitude') { $maplong=$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']=='image_to_attach') { $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']=='image_to_attach') { $images=$cekmeta['meta_value'];} } } $price=number_format($price,"0",".",".")." €"; ?>