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

?>

  <section id="main-content">
          <section class="wrapper site-min-height">
              <!-- page start-->
              <section class="panel">
                  <header class="panel-heading">
                      Yorum Listesi
                  </header>
                  <div class="panel-body">
                      <div class="adv-table editable-table ">
                          <div class="clearfix">
                    
                          
                          </div>
                          <div class="space15"></div>
                          <table class="table table-striped table-hover table-bordered" id="editable-sample">
                              <thead>
                              <tr>
                                  <th>Sıra</th>
                                  <th>İsim</th>
                                  <th>Email</th>
                                  <th>Durumu</th>
                                  <th>İşlem</th>
                                 
                              </tr>
                              </thead>
                              <tbody>
							  
							  
					<?php $YorumSorgu = Sorgu("SELECT * FROM yorumlar ORDER BY id DESC");
					$say = 1;
					while($YorumSonuc = Sonuc($YorumSorgu)){?>
					<?php $uye = Sonuc(Sorgu("SELECT * FROM uyeler WHERE id = '$YorumSonuc->uye_id' ORDER BY id DESC"));?>
							  
                              <tr class="">
                                  <td><?php echo $say++; ?></td>
                
                        <td><?php echo $YorumSonuc->isim; ?></td>
								    <td><?php echo $YorumSonuc->email; ?></td>   
								   
								   
                                  <td class="center">
								  <?php
			 				        if($YorumSonuc->durum=='1'){?>
								  <span class="label label-success label-mini">Aktif</span>
								     <?php } else { ?>
								  <span class="label label-danger label-mini">Pasif</span>
								    <?php } ?> 
									</td>
								  
								  
								  
								  
								           <td>

									      <a  href="?islem=sil&id=<?php echo $YorumSonuc->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="yorumekle.php?islem=duzenle&id=<?php echo $YorumSonuc->id;?>""  class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></a>
                                            </td>
											
                              </tr>
                             
                             
							    <?php } ?>  
							 
							 
							 
							 
							 
							 
                              </tbody>
                          </table>
                      </div>
                  </div>
              </section>
              <!-- page end-->
          </section>
      </section>



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