<?php include("header.php");?>
<?php
if(g('islem')=="sil")
{
	$id = g('id');
	
	$sayfa_sil_sorgu = Sorgu("DELETE FROM siparisler WHERE id='$id'");
	
	$bilgi = '	 <div class="alert alert-success">
										Başarı ile Silinmiştir !
				  </div>' ;
	
}

?>


 <!--main content start-->
       <!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!--mail inbox start-->
              <div class="mail-box">
          
                  <aside class="lg-side">
                      <div class="inbox-head">
                          <h3>Sipariş Kutusunda <?php echo say($mesajSorgu);?> mesaj var.</h3>
                         
                      </div>
             <form action="" method="post" id="form1">
                          <table class="table table-inbox table-hover">
                            <tbody>
                        
                        
                   
                           <?php $MesajSorgu = Sorgu("SELECT * FROM siparisler");
					  if(!mysql_affected_rows()){?>
					  			<tr>
                            <td colspan="5">
                                 Sipariş Bulunamadı.
                            </td>
                        </tr>  
					<?php }else{
					  while($MesajSonuc = Sonuc($MesajSorgu)){?>
                             
                              <tr class="">
                        
                                  <td class="inbox-small-cells"><i class="fa fa-envelope"></i></td>
                                  <td class="view-message dont-show"><a href="siparisoku.php?id=<?php echo $MesajSonuc->id; ?>"><?php echo $MesajSonuc->tarih; ?></a> <span class="label label-info pull-right"><?php echo $MesajSonuc->odeme_sekli; ?></span></td>
                                  <td class="view-message view-message"><?php echo kisalt($MesajSonuc->fiyat,40); ?> ₺</td>
                                  <td class="view-message inbox-small-cells"></td>
                                
								   <td class="view-message text-right">
								   
								   
								   
								    <a  href="?islem=sil&id=<?php echo $MesajSonuc->id;?>" onclick="return confirm('Silmek istediğinize emin misiniz ?')" class="btn btn-danger btn-xs"><i class="fa fa-trash-o "></i></a>
										     <a  href="siparisoku.php?id=<?php echo $MesajSonuc->id;?>""  class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></a>
								   
								   
								   
								   
								   
								   </td>
                              </tr>
							
							  
							  
							  	<?php }} ?>
					
                          </tbody>
                          </table>  </form>
                      </div>
                  </aside>
              </div>
              <!--mail inbox end-->
          </section>
      </section>
 

<?php include("footer.php");?>