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

<?php
if(g('islem')=="sil")
{
	$id = g('id');
	$resim_bul=Sonuc(Sorgu("SELECT * FROM datae WHERE id='$id'"));
	$resim_sil=unlink("../resimler/datae/".$resim_bul->resim);
	$resim_sil=unlink("../resimler/datae/kucuk/".$resim_bul->resim);
	
	$blog_sil_sorgu = Sorgu("DELETE FROM datae 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">
                  Video Galeri
                  </header>
                  <div class="panel-body">
                      <div class="adv-table editable-table ">
                          <div class="clearfix">
                               <div class="box-header">
                <a href="dataeekle.php" class="btn btn-shadow btn-warning">
				<i class="fa fa-plus"></i> Video 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> Video Adı</th>
                                  <th> Linki</th>
                                  <th>Durumu</th>
                                  <th>İşlem</th>
                                 
                              </tr>
                              </thead>
                              <tbody>
							  
							  
							  
					<?php $SayfaSorgu = Sorgu("SELECT * FROM datae 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 echo $SayfaSonuc->etiket; ?></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="dataeekle.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");?>