<?php
ob_start();
session_start();
 include("yonetimpaneli/ayar.php");
 if($_GET["cikis"]){
	unset($_SESSION["uyekullanici"]);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>&Ouml;&#287;renci Sat&#305;&#351;</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iecss.css" />
<![endif]-->
<script type="text/javascript" src="js/boxOver.js"></script>
</head>
<body>

<div id="main_container">

	<div id="header">

       <div class="top_right">
       
          
            
         
        
        </div>
    
  
        <div id="logo">
            <a href="index.php"><img src="images/logo.png" alt="" title="" border="0" width="182" height="85" /></a>
	    </div>
        

        

    </div>
    
   <div id="main_content"> 
   
            <div id="menu_tab">
                    <ul class="menu">
                         <li><a href="index.php" class="nav">  AnaSayfa </a></li>
                         <li class="divider"></li>
                         <li><a href="sayfa.php?sayfa=satistakiler" class="nav">Sat&#305;&#351;takiler</a></li>
                         <li class="divider"></li>
                         <li></li>
                         <li class="divider"></li>
                          <?php
                         if($_SESSION["uyekullanici"]){
						 ?>
                         <li><a href="sayfa.php?sayfa=uyeler" class="nav">Hesabim</a></li>
                         <li class="divider"></li>
                         <li><a href="sayfa.php?sayfa=uyegirisi&cikis=1" class="nav">Çikis</a></li>					
                         <?php
						 
                         }else{
						 ?>
                         <li><a href="sayfa.php?sayfa=uyeol" class="nav">Üye Ol</a></li>
                         <li class="divider"></li>
                         <li><a href="sayfa.php?sayfa=uyegirisi" class="nav">Üye Girisi</a></li>					
						 <?php
                         }
						 ?>
                         <li class="divider"></li>                         
                         <li></li>
                         <li class="divider"></li>
                         <li><a href="sayfa.php?sayfa=iletisim" class="nav">&#304;leti&#351;im</a></li>

                    </ul>

            </div><!-- end of menu tab -->
            
          
    
   <div class="left_content">
    <div class="title_box">Kategoriler</div>
    
      <ul class="left_menu">
      <?php
            $s=mysql_query("select * from kategoriler order by id");
        while($oku=mysql_fetch_array($s)){
			$i++;
			if(($i%2)==1){
			$sc="odd";
			}elseif(($i%2)==0){
			$sc="even";	
			}
		?>
        <li class="<?=$sc;?>"><a href="sayfa.php?sayfa=kategoriler&id=<?=$oku["id"];?>"><?=$oku["kategoriler"];?></a></li>
        <?
		}
		?>
        </ul>
     
        
    
   </div><!-- end of left content --> 



   <div class="center_content">
     <div class="center_title_bar">Son Y&uuml;klenen &Uuml;r&uuml;nler</div>
    <?
      $s=mysql_query("select * from ilan where secim=1 order by id desc LIMIT 0,6");
        while($oku=mysql_fetch_array($s)){
			$uye = mysql_fetch_assoc(mysql_query("SELECT * FROM uyeler where id='".$oku["uye_id"]."'"));
			$kat = mysql_fetch_assoc(mysql_query("SELECT * FROM kategoriler where id='".$oku["kategori_id"]."'"));
	?>
    	<div class="prod_box">

            <div class="center_prod_box">            
                 <div class="product_title"><a href="sayfa.php?sayfa=ilan&id=<?php echo $oku['id']; ?>"><?php echo $oku['ilan_adi']; ?></a></div>
                 <div class="product_img"><a href="sayfa.php?sayfa=ilan&id=<?php echo $oku['id']; ?>"><img src="images/<?php echo $oku['resim']; ?>" alt="" title="" border="0"  width="94"  height="71"/></a></div>
                 <div class="prod_price"><span class="price"><?php echo $uye['adi_soyadi']; ?> TL</span></div>
                 <div class="prod_price"><span class="price"><?php echo $oku['fiyat']; ?> TL</span></div>                  <div class="prod_price"><span class="price"><?php echo $kat['Kategoriler']; ?></span></div>      
          </div>
           
            <div class="prod_details_tab">
          
            <a href="sayfa.php?sayfa=ilan&id=<?php echo $oku['id']; ?>" class="prod_details">Ilana Bak</a>            
            </div>                     
        </div>
        <?
		}
	?>
   </div><!-- end of center content -->



 <div class="right_content">
 
      <div class="title_box">Arama</div>  
     <div class="border_box">
		<form action="sayfa.php" method="get">
		<input type="text" name="s" class="newsletter_input"/><input type="submit" name="sayfa" value="arama" />
                </form>
     </div>
             <?php
                         if($_SESSION["uyekullanici"]){
			 ?>
              
    <div class="title_box">Hesabim</div>
    
        <ul class="left_menu">
        <li class="odd"><a href="sayfa.php?sayfa=ilanekle">Ilan Ekleme</a></li>
        <li class="even"><a href="sayfa.php?sayfa=ilanlar">Ilanlarim</a></li>
        
        </ul> 
        <?php
						 }
		?>   
   </div><!-- end of right content -->   


            
   </div><!-- end of main content -->
   
   
   
   <div class="footer">
   

        <div class="left_footer">
        <img src="images/footer_logo.png" alt="" title="" width="89" height="42"/>
        </div>
        
        <div class="center_footer">
        Bitirme Projesi i&ccedil;in Haz&#305;rlanm&#305;&#351;t&#305;r 2013<br />
        <br />
        <img src="images/payment.gif" alt="" title="" />
        </div>
        
        <div class="right_footer">
        <a href="index.html">Anasayfa </a>|<a href="contact.html">Iletisim</a>
        </div>   
   
   </div>                 


</div>
<!-- end of main_container -->
</body>
</html>