<?php
$path="../../../../";
if(file_exists("".$path."config/map.php" )){$path2="config/"; include("".$path."config/map.php");}else{include("".$path."map.php");}
include("fonksiyon".$ver.".php");
include("".$path."deppo/tools/script/cevir.php");
header('Content-Type: text/xml');
echo "<?xml version='1.0' encoding='UTF-8'?> \n\n";
?>
<Urunler>
	<?php
  if($_POST["c1"]<>0 and $_POST["c2"]==0){
   $sorgu="and s9='".$_POST["c1"]."'";
 }elseif($_POST["c2"]<>"0" and $_POST["c3"]==0){
   $sorgu="and s10='".$_POST["c2"]."'";
 }elseif($_POST["c3"]<>0){
   $sorgu="and s11='".$_POST["c3"]."'";
 }
 $sql=mysqli_query($conn, "select * from lang1 where ne='kayit' and s13=1 order by id desc"); while($rs=mysqli_fetch_assoc($sql)){ $jsi = json_decode($rs["n17"],true); $jsm = json_decode($rs["m1"],true);
	$sqlx=mysqli_query($conn, "select * from kategoriler where Cat_ID='".$rsu["s10"]."'"); $rsx=mysqli_fetch_assoc($sqlx); $jsxi = json_decode($rsx["n6"], true);
	$icn11=$jsxi["icn11"]; $ictrendyol=$jsxi["ictrendyol"]; $ichepsiburada=$jsxi["ichepsiburada"];
	
  $sqlr=mysqli_query($conn, "select * from medya where ne='resim' and s1=".$rs["id"]." order by s3 asc");
  if(mysqli_num_rows($sqlr)>0){
   ?>
   <Urun>
    <Kod><?php echo $rs["t5"];?></Kod>
    <Baslik><?php echo $rs["t1"];?></Baslik>
    <AltBaslik>STOKTAN TESLİMAT - %100 ORJİNAL - FATURALI</AltBaslik>
    <Aciklama><![CDATA[<?php if($rs["n1"]<>""){echo $rs["n1"];}else{echo $rs["t1"];}?>]]></Aciklama>
    <UrunOnayi>1</UrunOnayi>
    <HazirlamaSuresi>2</HazirlamaSuresi>
    <Kategori no="<?php echo $icn11;?>" isim="">
      <Ozellikler>
       <Ozellik no="" isim="Marka">Diğer</Ozellik>
       <Ozellik no="" isim="Ürün Miktarı">Adet</Ozellik>
     </Ozellikler>
   </Kategori>
    <Fiyat><?php echo $pb2;?></Fiyat>
  <UretimTarihi/>
  <SonTuketimTarihi/>
  <SatisBaslangicTarihi />
  <SatisBitisTarihi />
  <Stoklar>
    <Stok>
     <Miktar><?php if($rs["s5"]==""){echo "99";}else{echo $rs["s5"];}?></Miktar>
     <StokKodu/>
     <StokFiyati/>
     <Gtin><?php echo $rs["t5"];?></Gtin>
     <Mpn/>
     <Bundle>false</Bundle>
   </Stok>
 </Stoklar>
 <IndirimTuru>3</IndirimTuru>
  <IndirimTutari><?php echo $pb1;?></IndirimTutari>
<IndirimBaslangicTarihi/>
<IndirimBitisTarihi/>
<TeslimatSablonu>depo</TeslimatSablonu>
<Resimler>
  <?php while($rsr=mysqli_fetch_assoc($sqlr)){?>
   <Resim><?php echo $weburl?>/deppo/image/<?php echo $rsr["t1"];?></Resim>
 <?php }?>
</Resimler>
<YerliUretim>0</YerliUretim>
<ParaBirimi>TL</ParaBirimi>
<GroupAttribute/>
<GroupItemCode/>
<ItemName/>
</Urun>
<?php }?>
<?php }?>
</Urunler>