assign ( 'tema', $tema ); $xtpl->assign ( 'fax', $fax ); $xtpl->assign ( 'title2', $site_adi ); $xtpl->assign("site_adres",$site_adresi); $sayfa = (isset ( $_POST ['sayfa'] )) ? ($_POST ['sayfa']) : ''; if ($sayfa == "") { $sayfa = ($_GET ["sayfa"]); } if (empty ( $sayfaphp )) { $sayfaphp = ($_GET ["sa"]); } if (($sayfa == "") && ($sayfaphp == "")) { $sayfaphp = "anasayfa"; } // seflink'den gelen verinin sayfalinkini alıyoruz. $query = mysql_query("SELECT * FROM kategoriler where seflink='$sayfaphp'"); $row = mysql_fetch_array($query); $sayfaphp=$row["link"]; if($row["kategori"]!="") $xtpl->assign("title"," | ".$row["kategori"]); if($row["description"]!=""){ $xtpl->assign("description"," - ".$row["description"]); }else{ $xtpl->assign("description"," - ".$row["kategori"]); } if($sayfaphp=="iletisim"){ $xtpl->assign("class","hiddenmap"); } //footer resim $query = mysql_query("SELECT * FROM urunler where aktif=1 order by rand() LIMIT 12"); while($row = mysql_fetch_array($query)){ $xtpl->assign("footerResim",$row["resim"]); $xtpl->assign("footerResimBuyuk",$row["resimbuyuk"]); $xtpl->parse("main.footerResim"); } $kelime_query = mysql_query(" SELECT dw.field , IFNULL(tw.kelime,dw.kelime) as kelime FROM words as dw LEFT JOIN words as tw ON tw.field=dw.field and tw.dil='$dil' where dw.dil='tr'"); while($kerow = mysql_fetch_array($kelime_query)){ $translate[$kerow["field"]]=$kerow["kelime"]; } /*Çeviriler*/ $xtpl->assign("ceviri_iletisim_bilgilerimiz",$translate["il_bil"]); $xtpl->assign("ceviri_iletisim_formu",$translate["menu_iletisim_formu"]); $xtpl->assign("ceviri_ad",$translate["menu_ad"]); $xtpl->assign("ceviri_email",$translate["menu_email"]); $xtpl->assign("ceviri_telefon",$translate["menu_telefon"]); $xtpl->assign("ceviri_konu",$translate["menu_konu"]); $xtpl->assign("ceviri_mesaj",$translate["menu_mesaj"]); $xtpl->assign("ceviri_gonder",$translate["menu_gonder"]); $xtpl->assign("samtas_kalip",$translate["samtas_kalip"]); $xtpl->assign("ceviri_copy",$translate["menu_copy"]); $xtpl->assign("hakkimizda",$translate["hakkimizda"]); $xtpl->assign("iletisimformu",$translate["iletisimformu"]); $xtpl->assign("samtas_dan_resim",$translate["samtas_dan_resim"]); $xtpl->assign("bizi_takip_edin",$translate["bizi_takip_edin"]); /*#Çeviriler*/ /* Menüler */ $menu_query = mysql_query("select dk.id, IFNULL(tk.kategori,dk.kategori) as kategori, IFNULL(tk.seflink,dk.seflink) as seflink, dk.sayfa,dk.dil,dk.link,dk.aktif,dk.cevrilmisID from kategoriler as dk left join kategoriler as tk ON tk.dil='".$dil."' and tk.cevrilmisID=dk.id where dk.dil='tr' and dk.admin=0 and dk.ana_id=0 and dk.aktif=1 order by dk.sira asc") or die(mysql_error()); while($menu = mysql_fetch_array($menu_query)){ $xtpl->assign("dil",$dil); $xtpl->assign("link",$menu['seflink']); $xtpl->assign("menuad",$menu["kategori"]); $xtpl->assign("aktif",""); if($sayfaphp==$menu["link"]){ $xtpl->assign("aktif","activex"); } $alt_query = mysql_query("select dk.id,dk.link,dk.dil, IFNULL(tk.kategori,dk.kategori) as kategori, IFNULL(tk.id,dk.id) as id, IFNULL(tk.seflink,dk.seflink) as seflink, dk.sayfa,dk.aktif,dk.cevrilmisID from kategoriler as dk left join kategoriler as tk ON tk.dil='".$dil."' and tk.ana_id='".$menu["id"]."' and tk.cevrilmisID=dk.id where dk.dil='tr' and dk.ana_id='".$menu["id"]."' and dk.aktif=1 order by dk.sira asc"); while($alt = mysql_fetch_array($alt_query)){ $xtpl->assign("altkategori",$alt["kategori"]); if($alt["id"]==445){ $xtpl->assign ( 'altlink',$site_adresi.$dil."/".$alt["seflink"].'#samtas' . $alt ['id'] ); } else if($alt["id"]==446){ $xtpl->assign ( 'altlink',$site_adresi.$dil."/".$alt["seflink"].'#samtas' . $alt ['id'] ); } else if($alt["id"]==447){ $xtpl->assign ( 'altlink',$site_adresi.$dil."/".$alt["seflink"].'#samtas' . $alt ['id'] ); } else if($alt["id"]==448){ $xtpl->assign ( 'altlink',$site_adresi.$dil."/".$alt["seflink"].'#samtas' . $alt ['id'] ); } else{ $xtpl->assign ( 'altlink',$site_adresi.$dil."/".$alt["seflink"] ); } //$xtpl->assign ( 'altlink',"/".$dil."/".$menu["link"].'#ardadekor' . $alt ['id'] ); //$xtpl->assign ( 'altlink',"/".$dil."/".$alt["seflink"] ); $xtpl->parse("main.Kategori.alt.kategori"); } $xtpl->assign("dropdown",""); $xtpl->assign("caret",""); if(mysql_num_rows($alt_query)>0){ $xtpl->assign("link","#"); $xtpl->assign("dropdown","dropdown"); $xtpl->assign("caret",' '); $xtpl->parse("main.Kategori.alt"); } $xtpl->parse("main.Kategori"); } /* Ayarlar */ $ayar_query = mysql_query("SELECT * FROM ayarlar"); $arow = mysql_fetch_array($ayar_query); $xtpl->assign("site_tel",$arow["telefon"]); $xtpl->assign("adres",$arow["adres"]); $xtpl->assign("site_mail",$arow["siteeposta"]); if (! empty ( $sayfa )) { kontrolS (); } else if (! empty ( $sayfaphp )) { kontrolEX (); } else { ilkSayfa (); } $xtpl->parse ( 'main' ); echo $xtpl->Text ( 'main' ); function kontrolS() { global $xtpl, $_POST, $_GET, $sayfa, $sektor, $altsektor, $malzeme_adi, $sehir, $spot, $satici, $marka,$arow, $pasif, $liste, $siralamarka, $siralatarih, $siralasatici,$translate, $siralasehir, $s, $cid, $msg, $durum, $tip, $telefon, $fax, $firmaadi, $adres, $tema; $arg = func_get_args (); if (count ( $arg ) > 0) $ktS = $arg [0]; else $ktS = $sayfa; if (file_exists ( "temalar/$tema/" . $ktS . ".html" )) { $stpl = new XTemplate ( "temalar/$tema/" . $ktS . ".html" ); $stpl->parse ( 'main' ); $xtpl->assign ( 'orta', $stpl->Text ( 'main' ) ); } else ilksayfa (); } function ilkSayfa() { kontrolEx ( "anasayfa" ); } function kontrolEx() { global $xtpl, $_POST, $_GET, $sayfaphp, $_GET, $Gdir, $serverhost, $serveruser, $serverpwd, $dbname, $cid, $cust_id, $site_adi, $site_eposta, $site_adresi,$translate, $telefon, $fax, $firmaadi, $adres, $tema; $arg = func_get_args (); if (count ( $arg ) > 0) $ktEx = $arg [0]; else $ktEx = $sayfaphp; if (file_exists ( $ktEx . ".php" )) { include ($ktEx . ".php"); } else ilkSayfa (); } ?>