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

<?php
if(g('islem')=="sil")
{
	$id = g('id');
	$resim_bul=Sonuc(Sorgu("SELECT * FROM datah WHERE id='$id'"));
	$resim_sil=unlink("../resimler/datah/".$resim_bul->resim);
	$resim_sil=unlink("../resimler/datah/kucuk/".$resim_bul->resim);
	
	$blog_sil_sorgu = Sorgu("DELETE FROM datah 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">
                 Müşteri Yorumu
                  </header>
                  <div class="panel-body">
                      <div class="adv-table editable-table ">
                          <div class="clearfix">
                               <div class="box-header">
                <a href="datahekle.php" class="btn btn-shadow btn-warning">
				<i class="fa fa-plus"></i> Yorum Ekle</a>
                </div><!-- /.box-header --><br>
                          
                          </div>
                          <div class="space15"></div>
                          <table class="table table-striped table-hover table-bordered" id="editable-sample">
                              <thead>
                              <tr>
                                  <th>Sıra</th>
                                  <th> Müşteri Adı</th>
                                  <th> Resmi</th>
                                  <th>Durumu</th>
                                  <th>İşlem</th>
                                 
                              </tr>
                              </thead>
                              <tbody>
							  
							  
							  
					<?php $SayfaSorgu = Sorgu("SELECT * FROM datah ORDER BY id DESC");
					$say = 1;
					while($SayfaSonuc = Sonuc($SayfaSorgu)){?>
							  
                              <tr class="">
                                  <td><?php echo $say++ ?></td>
                                  <td><?php echo $SayfaSonuc->adi; ?></td>
								  <td>
								  <?php if($SayfaSonuc->resim == ""){?>
                                  <img width="30px" height="30px" src="https://placeholdit.imgix.net/~text?txtsize=19&bg=efefef&txtclr=aaaaaa%26text%3Dno%2Bimage&txt=no+image&w=200&h=150">
								  <?php }else{?>
								 <img width="30px" height="30px" src="../resimler/datah/<?php echo $SayfaSonuc->resim; ?>">
								   <?php } ?>
								   </td>
								   
								   
								   
                                  <td class="center">
								  <?php
			 				        if($SayfaSonuc->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 $SayfaSonuc->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="datahekle.php?islem=duzenle&id=<?php echo $SayfaSonuc->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");?>