Jump to content

emlak21

New Members
  • Posts

    1
  • Joined

  • Last visited

Contact Methods

  • Website URL
    www.alanyagayrimenkul.com

emlak21's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello Can you help for the Main Category and Subcategory, I'm pulling the Satılık, Kiralık and Günlük Kiralık data from the emlak_durum table I'm pulling the Main Category and Subcategory data in the emlak_durum table, If the Main Category is single, this way the URL structure is "kategori/Satılık_Konut" if there are subcategories of the main category, how do we get it to give "kategori/Satılık_Konut_Villa" function menukategori($katid = 0, $string = 0, $ustid = 0, $menuurl = ""){ global $db; global $htc; $query = $db->prepare("SELECT * FROM emlak_kategori WHERE ustid=? AND dil=? ORDER BY sira ASC"); $query->execute(array($katid, $_SESSION["admin_dil"])); $islem = $query->fetchAll(PDO::FETCH_ASSOC); if($query->rowCount()){ foreach ($islem as $Row){ $selected = ''; if($menuurl == $htc['emlakkategoriurl'].'/'.$Row['seo']){ $selected = 'selected'; } // Verileri emlak_durum tablosundan çekin $query_durum = $db->prepare("SELECT * FROM emlak_durum WHERE dil=?"); // İstediğiniz durumu seçin $query_durum->execute(array($_SESSION["admin_dil"])); $durumlar = $query_durum->fetchAll(PDO::FETCH_ASSOC); foreach ($durumlar as $durum) { $alt_seo = $durum['url'].'_'.$Row['seo']; $alt_menuurl = $htc['emlakkategoriurl'].'/'.$alt_seo; // Alt kategori URL yapısı echo '<option data-menuurl="'.$alt_menuurl.'" data-if="'.$htc['emlakkategoriurl'].'/'.$durum['url'].'_'.$Row['seo'].'" '.$selected; echo ' value="'.$alt_menuurl.'">('.$durum['adi'].') '.str_repeat('=>', $string).$Row['adi'].'</option>'; } menukategori($Row['id'], $string + 1, $ustid, $menuurl); } } else { return false; } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.