row("SELECT * FROM page_properties WHERE page_lang_id = ?", array($site_lang)); // İlan çekimi $sql = "SELECT properties.*, property_texts.*, property_types.type_name, country_list.country_name AS country_name, city_list.city_name AS city_name, city_list.city_gps AS citygps, county_list.county_name AS county_name, currencies.curr_code AS curr_code, (SELECT SUM(hit_count) FROM hit_counter WHERE hit_counter.hit_page = property_id) AS hitstotal FROM properties LEFT JOIN property_texts ON property_texts.text_property_id = properties.property_id AND text_lang_id = :lang1 LEFT JOIN property_types ON property_types.type_type_id = properties.property_type AND type_lang_id = :lang2 LEFT JOIN country_list ON country_list.country_id = properties.property_country LEFT JOIN city_list ON city_list.city_id = properties.property_city LEFT JOIN county_list ON county_list.county_id = properties.property_county LEFT JOIN currencies ON currencies.curr_id = properties.property_currency WHERE properties.property_status = :stat1 AND (property_cross_show = :cross1 OR property_cross_show = :cross3) "; $sqlcount_ = "SELECT property_id, property_lat, property_lon, property_front_photo FROM properties WHERE properties.property_status = :stat2 AND (properties.property_cross_show = :cross1 OR properties.property_cross_show = :cross3) "; $prm['lang1'] = $site_lang; $prm['lang2'] = $site_lang; $prm['cross1'] = '1'; $prm['cross3'] = '3'; $prc['cross1'] = '1'; $prc['cross3'] = '3'; $prm['stat1'] = '2'; $prc['stat2'] = '2'; // İlan çekimi // Filtreler if (!empty($_GET)) { unset($_SESSION['check_in']); unset($_SESSION['check_out']); unset($_SESSION['kapasite']); if (isset($_GET['fiyat']) && !empty($_GET['fiyat'])) { list($p_a, $p_b) = explode(' AND ', $_GET['fiyat']); if ($kur == "1") { $sql .= " AND properties.property_dayprice_try BETWEEN :pria1 AND :pria2"; $sqlcount_ .= " AND properties.property_dayprice_try BETWEEN :prib1 AND :prib2"; } if ($kur == "2") { $sql .= " AND properties.property_dayprice_usd BETWEEN :pria1 AND :pria2"; $sqlcount_ .= " AND properties.property_dayprice_usd BETWEEN :prib1 AND :prib2"; } if ($kur == "3") { $sql .= " AND properties.property_dayprice_eur BETWEEN :pria1 AND :pria2"; $sqlcount_ .= " AND properties.property_dayprice_eur BETWEEN :prib1 AND :prib2"; } if ($kur == "4") { $sql .= " AND properties.property_dayprice_gbp BETWEEN :pria1 AND :pria2"; $sqlcount_ .= " AND properties.property_dayprice_gbp BETWEEN :prib1 AND :prib2"; } $prm['pria1'] = $p_a; $prm['pria2'] = $p_b; $prc['prib1'] = $p_a; $prc['prib2'] = $p_b; } if (isset($_GET['kapasite']) && (!empty($_GET['kapasite'])) && $_GET['kapasite'] > 0) { $sql .= " AND property_capacity >= :kap_ "; $sqlcount_ .= " AND property_capacity >= :kap_ "; $prm['kap_'] = $_GET['kapasite']; $prc['kap_'] = $_GET['kapasite']; } if (isset($_GET['oda']) && (!empty($_GET['oda'])) && $_GET['oda'] > 0) { $sql .= " AND property_rooms = :oda_ "; $sqlcount_ .= " AND property_rooms = :oda_ "; $prm['oda_'] = $_GET['oda']; $prc['oda_'] = $_GET['oda']; } if (isset($_GET['yatak']) && (!empty($_GET['yatak'])) && $_GET['yatak'] > 0) { $sql .= " AND property_beds >= :yat_ "; $sqlcount_ .= " AND property_beds >= :yat_ "; $prm['yat_'] = $_GET['yatak']; $prc['yat_'] = $_GET['yatak']; } if (isset($_GET['tip']) && (!empty($_GET['tip'])) && $_GET['tip'] > 0) { $sql .= " AND property_type = :tip_ "; $sqlcount_ .= " AND property_type = :tip_ "; $prm['tip_'] = $_GET['tip']; $prc['tip_'] = $_GET['tip']; } if (isset($_GET['tarz']) && (!empty($_GET['tarz'])) && $_GET['tarz'] > 0) { $tarzx = ""; foreach ($_GET['tarz'] as $value) { $tarzx .= $value.","; } $tarzz = rtrim($tarzx, ","); $sql .= " AND property_classes IN (".$tarzz.") "; $sqlcount_ .= " AND property_classes IN (".$tarzz.") "; } if ((isset($_GET['bolge']) && !empty($_GET['bolge']) && $_GET['bolge'] > 0) && (!isset($_GET['semt']) && !empty($_GET['semt']) OR $_GET['semt'] == 0 )) { $sql .= " AND property_county = :bol_ "; $sqlcount_ .= " AND property_county = :bol_ "; $prm['bol_'] = $_GET['bolge']; $prc['bol_'] = $_GET['bolge']; $get_city = $Db->row("SELECT county_city_id FROM county_list WHERE county_id = ?", array($_GET['bolge'])); $get_loc = $Db->row("SELECT city_gps FROM city_list WHERE city_id = ?", array($get_city['county_city_id'])); $zoom = 8; $geoloc = $get_loc['city_gps']; } if ((isset($_GET['bolge']) && !empty($_GET['bolge']) && $_GET['bolge'] > 0) && (isset($_GET['semt']) && !empty($_GET['semt']) OR $_GET['semt'] > 0)) { $sql .= " AND property_district = :sem_ "; $sqlcount_ .= " AND property_district = :sem_ "; $prm['sem_'] = $_GET['semt']; $prc['sem_'] = $_GET['semt']; $get_city = $Db->row("SELECT district_city_id FROM district_list WHERE district_id = ?", array($_GET['semt'])); $get_loc = $Db->row("SELECT city_gps FROM city_list WHERE city_id = ?", array($get_city['district_city_id'])); $zoom = 8; $geoloc = $get_loc['city_gps']; } } // Filtreler // Group ek $sql .= " GROUP BY properties.property_id "; $sqlcount_ .= " GROUP BY properties.property_id "; // Group ek // Sıralama if (empty($_GET['siralama'])) { $sql .= " ORDER BY property_id ASC "; } if (!empty($_GET['siralama']) && $_GET['siralama'] == "enson") { $sql .= " ORDER BY property_id DESC "; } if (!empty($_GET['siralama']) && $_GET['siralama'] == "ucuzdan" ) { if ($kur == "1") { $sql .= " ORDER BY property_dayprice_try ASC "; } if ($kur == "2") { $sql .= " ORDER BY property_dayprice_usd ASC "; } if ($kur == "3") { $sql .= " ORDER BY property_dayprice_eur ASC "; } if ($kur == "4") { $sql .= " ORDER BY property_dayprice_gbp ASC "; } } if (!empty($_GET['siralama']) && $_GET['siralama'] == "pahalidan" ) { if ($kur == "1") { $sql .= " ORDER BY property_dayprice_try DESC "; } if ($kur == "2") { $sql .= " ORDER BY property_dayprice_usd DESC "; } if ($kur == "3") { $sql .= " ORDER BY property_dayprice_eur DESC "; } if ($kur == "4") { $sql .= " ORDER BY property_dayprice_gbp DESC "; } } if (!empty($_GET['siralama']) && $_GET['siralama'] == "populer") { $sql .= " ORDER BY hitstotal DESC "; } if (!empty($_GET['siralama']) && $_GET['siralama'] == "indirimli") { $sql .= " ORDER BY property_isDiscounted DESC "; } // Sıralama // Harita ortalama if (empty($geoloc)) { $zoom = 8; $geoloc = "37.041816, 27.433661"; } // Harita ortalama // Harita sayaç $total_result = $Db->query($sqlcount_,$prc); // Harita sayaç // Paging $per_page = 12; $start = 0; $end = $per_page; $total_pages = ceil(count($total_result) / $per_page); if (!empty($_GET['sayfa'])) { if (isset($_GET['sayfa']) && is_numeric($_GET['sayfa'])) { if (empty($_GET['sayfa'])) { $_GET['sayfa'] = 1; } $show_page = $_GET['sayfa']; if(!is_numeric($show_page)) { $show_page = 0; } if ($show_page > 0 && $show_page <= $total_pages) { $start = ($show_page - 1) * $per_page; $end = $start + $per_page; } else { $start = 0; $end = $per_page; } } } else { $show_page = 0; } if (!is_numeric($show_page)) { $show_page = 0; } $num_rows = ceil(count($total_result)); $page_amount2 = ceil($num_rows / $per_page); $page_amount = $page_amount2 - 1; $page = $show_page; $sql .= " LIMIT " . $start . "," . $per_page; // Paging // İlanları çek $listings = $Db->query($sql,$prm); // İlanları çek // Gelen tarih varmı if (!empty($_GET['check_in'])) { $_SESSION["check_in"] = $_GET['check_in']; } if (!empty($_GET['check_out'])) { $_SESSION["check_out"] = $_GET['check_out']; } if (!empty($_GET['kapasite'])) { $_SESSION["kapasite"] = $_GET['kapasite']; } // Gelen tarih varmı ### Hitcounter $pagename = "Türkçe İlanlar"; include_once("hit_counter.php"); ### Hitcounter ?> <?php echo $page_data['page_title']; ?>
query("SELECT * FROM property_prices WHERE price_date >= ? AND price_date < ? AND price_property_id = ? ", array($fdate1,$fdate2,$listing['property_id'])); $aryRange = array(); $total = 0; $conditionError = ""; while ($fdate1 < $fdate2) { array_push($aryRange,$fdate1); $tm = strtotime(date("Y-m-d", strtotime($fdate1)) . " +1 day"); $fdate1 = date('Y-m-d',$tm); } $dStart = new DateTime($_GET['check_in']); $dEnd = new DateTime($_GET['check_out']); $dDiff = $dStart->diff($dEnd); foreach($aryRange as $day) { if(!empty($price_list)) { foreach($price_list as $price){ if($price['price_date'] == $day) { if($price['price_condition'] == 1) { $total = $total + $price['price_value']; } else { $conditionError = $conditionError . ",".$day; } } } } } if(count($aryRange) > count($price_list)) { $missingTotal = (count($aryRange)- count($price_list)) * $listing['property_price']; $reelTotal = $missingTotal + $total; if ($kur == "4") { if ($listing['property_currency'] == "4") { $reelTotal = $reelTotal; } if ($listing['property_currency'] == "1") { $reelTotal = $reelTotal / $currency['rate_buy_gbp']; } if ($listing['property_currency'] == "2") { $reelTotal = $reelTotal * $currency['rate_buy_usd'] / $currency['rate_buy_gbp']; } if ($listing['property_currency'] == "3") { $reelTotal = $reelTotal * $currency['rate_buy_eur'] / $currency['rate_buy_gbp']; } } elseif ($kur == "2") { if ($listing['property_currency'] == "4") { $reelTotal = $reelTotal * $currency['rate_buy_gbp'] / $currency['rate_buy_usd']; } if ($listing['property_currency'] == "1") { $reelTotal = $reelTotal / $currency['rate_buy_usd']; } if ($listing['property_currency'] == "2") { $reelTotal = $reelTotal; } if ($listing['property_currency'] == "3") { $reelTotal = $reelTotal * $currency['rate_buy_eur'] / $currency['rate_buy_usd']; } } elseif ($kur == "3") { if ($listing['property_currency'] == "4") { $reelTotal = $reelTotal * $currency['rate_buy_gbp'] / $currency['rate_buy_eur']; } if ($listing['property_currency'] == "1") { $reelTotal = $reelTotal / $currency['rate_buy_eur']; } if ($listing['property_currency'] == "2") { $reelTotal = $reelTotal * $currency['rate_buy_usd'] / $currency['rate_buy_eur']; } if ($listing['property_currency'] == "3") { $reelTotal = $reelTotal; } } elseif ($kur == "1") { if ($listing['property_currency'] == "4") { $reelTotal = $reelTotal * $currency['rate_buy_gbp']; } if ($listing['property_currency'] == "1") { $reelTotal = $reelTotal; } if ($listing['property_currency'] == "2") { $reelTotal = $reelTotal * $currency['rate_buy_usd']; } if ($listing['property_currency'] == "3") { $reelTotal = $reelTotal * $currency['rate_buy_eur']; } } $genelToplam = $missingTotal + $total; if(!empty($listing['property_week_discount'])) { if(count($aryRange) > 6 && count($aryRange) < 29 ) { $genelToplam = ($genelToplam / $listing['property_week_discount']) ; } } if(!empty($listing['property_month_discount'])) { if( count($aryRange) > 29 ) { $genelToplam = ($genelToplam / $listing['property_month_discount']) ; } } $selectedtotal = round($reelTotal); } else { if ($kur == "4") { if ($listing['property_currency'] == "4") { $total = $total; } if ($listing['property_currency'] == "1") { $total = $total / $currency['rate_buy_gbp']; } if ($listing['property_currency'] == "2") { $total = $total * $currency['rate_buy_usd'] / $currency['rate_buy_gbp']; } if ($listing['property_currency'] == "3") { $total = $total * $currency['rate_buy_eur'] / $currency['rate_buy_gbp']; } } elseif ($kur == "2") { if ($listing['property_currency'] == "4") { $total = $total * $currency['rate_buy_gbp'] / $currency['rate_buy_usd']; } if ($listing['property_currency'] == "1") { $total = $total / $currency['rate_buy_usd']; } if ($listing['property_currency'] == "2") { $total = $total; } if ($listing['property_currency'] == "3") { $total = $total * $currency['rate_buy_eur'] / $currency['rate_buy_usd']; } } elseif ($kur == "3") { if ($listing['property_currency'] == "4") { $total = $total * $currency['rate_buy_gbp'] / $currency['rate_buy_eur']; } if ($listing['property_currency'] == "1") { $total = $total / $currency['rate_buy_eur']; } if ($listing['property_currency'] == "2") { $total = $total * $currency['rate_buy_usd'] / $currency['rate_buy_eur']; } if ($listing['property_currency'] == "3") { $total = $total; } } elseif ($kur == "1") { if ($listing['property_currency'] == "4") { $total = $total * $currency['rate_buy_gbp']; } if ($listing['property_currency'] == "1") { $total = $total; } if ($listing['property_currency'] == "2") { $total = $total * $currency['rate_buy_usd']; } if ($listing['property_currency'] == "3") { $total = $total * $currency['rate_buy_eur']; } } if(!empty($listing['property_week_discount'])) { if(count($aryRange) > 6 && count($aryRange) < 29 ) { $total = ($total / $listing['property_week_discount']) ; } } if(!empty($listing['property_month_discount'])) { if( count($aryRange) > 29 ) { $total = ($genelToplam / $listing['property_month_discount']) ; } } $selectedtotal = round($total); } } // gelen tarih varsa fiyat hesaplama işlemi $file = IMAGE_PATH."properties/".$listing['property_id']."/".$listing['property_front_photo']; if (file_exists($file)) { $h_img = IMAGE_FOLDER."properties/".$listing['property_id']."/".$listing['property_front_photo']; } else { $h_img = IMAGE_FOLDER."no_photo.jpg"; } ?>
/" target="_blank"> <?php echo $listing['text_name']; ?> '.$translate['trans_047'].''; } ?> '.$translate['trans_048'].''; } ?>

days.' '.$translate['trans_053'].''; } else { if ($kur == "1") { echo number_format($listing['property_dayprice_try'] * $listing['property_commission'])." ".strtoupper($kurcode)." / ".$translate['trans_071']." ".$translate['trans_054'].""; } if ($kur == "2") { echo number_format($listing['property_dayprice_usd'] * $listing['property_commission'])." ".strtoupper($kurcode)." / ".$translate['trans_071']." ".$translate['trans_054'].""; } if ($kur == "3") { echo number_format($listing['property_dayprice_eur'] * $listing['property_commission'])." ".strtoupper($kurcode)." / ".$translate['trans_071']." ".$translate['trans_054'].""; } if ($kur == "4") { echo number_format($listing['property_dayprice_gbp'] * $listing['property_commission'])." ".strtoupper($kurcode)." / ".$translate['trans_071']." ".$translate['trans_054'].""; } } } ?> /" class="btn btn-xs btn-two pull-right" target="_blank">
"; } ?>

query("SELECT class_class_id,class_name FROM property_classes WHERE class_lang_id = ?", array($site_lang)); if (!empty($property_classes)) { foreach ($property_classes as $class) { ?>