<?php
if($_GET['onay']){
		mysql_query("update ilan set secim=2 where id='".$_GET['onay']."'")or die(mysql_error());
		echo "Islem Yapildi.";
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
     <div class="center_title_bar">&#304;lanlar&#305;m</div>
     <div class="prod_box_big">
      
            <div class="center_prod_box_big">            
                 <form method="post" enctype="multipart/form-data" name="example"     action="<?php echo $_SERVER['REQUEST_URI'] ?>" >


<table width="500"  cellpadding="3" cellspacing="0" class="liste" id="tabloq"  style="BORDER-RIGHT: #d1d9e1 1px solid; BORDER-TOP: medium none; BORDER-LEFT: #d1d9e1 1px solid; BORDER-BOTTOM: #d1d9e1 1px solid" align="center" bordercolor="#000066">

  <tr>
    <td width="153" class="detay"><strong>Ilan Adi</strong></td>
    <td width="65"><strong>Fiyat</strong></td>
    <td width="102"><strong>Kategori</strong></td>
    <td width="210"><strong>Se&ccedil;im</strong></td>
  </tr>
    <?
      $s=mysql_query("select * from ilan where uye_id='".$_SESSION["uyekullanici"]."'order by id");
        while($oku=mysql_fetch_array($s)){
			$kat = mysql_fetch_assoc(mysql_query("SELECT * FROM kategoriler where id='".$oku["kategori_id"]."'"));
	?>
  <tr>
    <td class="detay"><?php echo $oku['ilan_adi']; ?></td>
    <td><?php echo $oku['fiyat']; ?> TL</td>
    <td><?php echo $kat['kategoriler']; ?></td>

   
    <td>
    <?php
	if($oku['secim']=="1"){
	?>
    <a href="sayfa.php?sayfa=ilanlar&onay=<?=$oku['id']?>">Satildi</a>
    <?php	
	}else if($oku['secim']=="0"){
	?>
    Onay Bekliyor
     <?php	
	}else if($oku['secim']=="2"){
	?>
    Satildi
     <?php	
	}
	?>
 </td>
  </tr>
  <?
}
?>
</table>                
     </div>
                                 
        </div>