<div class="content-body">
    <div class="container-fluid">
        <div class="row page-titles mx-0">
            <div class="col-sm-6 p-md-0">
                <div class="welcome-text">
                    
                </div>
            </div>
            <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
                <ol class="breadcrumb">
                   
                    <li class="breadcrumb-item active"><a href="katalog-ekle"> <i class="fa fa-plus "></i>  Katalog Ekle</a></li>
                </ol>
            </div>
        </div>
    <?php
if(isset($_POST['sil'])){
	
	$sil=$_POST['toplu_sil'];
	$sill = implode(",",$sil);
	
	foreach($sil as $s){
		
	$resim_sorgu1=$db->query("select * from katalog where id='$s'")->fetch(PDO::FETCH_ASSOC);
	 unlink('../../resimler/'.$resim_sorgu1['resim']);
	$simdii=$db->query("delete from katalog where id='$s'")->fetch(PDO::FETCH_ASSOC);
	}
	
}
?>

    <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title">Ekibimiz</h4>
                    </div>
 
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-responsive-md">
                                <thead>
                                    <tr>
                                        <th style="width:50px;">
                                            <div class="form-check custom-checkbox checkbox-success check-lg me-3">
                                                <input type="checkbox" class="form-check-input" name="toplu_sil[]" value="<?=$goster["id"]?>">
                                                <label class="form-check-label" for="customCheckBox2"></label>

                                            </div>
                                        </th>
										<th>Sıra</th>
<th>Adı</th>
<th>Eklenme Tarihi</th>
<th>Durum</th>
<th>İşlem</th>
                                    </tr>
                                </thead>
                                <tbody>
          

<?php
$cek = $db->query("select * from katalog order by id desc")->fetchAll(PDO::FETCH_ASSOC);
foreach($cek as $goster){
?>
<tr>
<td>
<label class="checkboxs">
<input type="checkbox"  name="toplu_sil[]" value="<?=$goster["id"]?>">
<span class="checkmarks"></span>
</label>
</td>
<td><?=$goster["sira"]?></td>

<td class="productimgname">
<a href="katalog-ekle?islem=duzenle&id=<?=$goster["id"]?>" class="product-img">
<?php if($goster["resim"]!=''){?>
<img src="../resimler/<?=$goster["resim"]?>" alt="<?=$goster["adi"]?>">
<?php } else {?>
<img src="assets/img/product/noimage.png" alt="resim yok">

<?php }?>
</a>
<a href="katalog-ekle?islem=duzenle&id=<?=$goster["id"]?>"><?=$goster["adi"]?></a>
</td>
<td><?=$goster["eklenme_tarihi"]?></td>
<td><?php if($goster["durum"]==0){ echo "Aktif";}else {echo"Pasif";}?></td>
<td>
<a class="me-3" href="katalog-ekle?islem=duzenle&id=<?=$goster["id"]?>">
<img src="assets/img/icons/edit.svg" alt="img">
</a>

</td>
</tr>
<?php }?>
</tbody>
</table>
</div>
</div>
</div>

</div></form>
</div>