<div class="content-body">
    <div class="container-fluid">
        <div class="page-wrapper">
    <?php
if(isset($_POST['sil'])){
	
	$sil=$_POST['toplu_sil'];
	$sill = implode(",",$sil);
	
	foreach($sil as $s){
		
	$resim_sorgu1=$db->query("select * from yonetici where id='$s'")->fetch(PDO::FETCH_ASSOC);
	 unlink('../../resimler/'.$resim_sorgu1['resim']);
	$simdii=$db->query("delete from yonetici where id='$s'")->fetch(PDO::FETCH_ASSOC);
	}
	
}
?>

   <form method="post">
<div class="content">
    
    <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="yonetici-ekle"> <i class="fa fa-plus "></i>  Yönetici Ekle</a></li>
                </ol>
               &nbsp;&nbsp; <div class="page-btn">


   <input type="submit" name="sil" class="btn btn-primary" value="Seçilenleri Sil">

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


<div class="card">
    <div class="card-header">
                        <h4 class="card-title">yonetici</h4>
                    </div>



<div class="card-body">
                            <table class="table table-responsive-md">
                                <thead>
                                    <tr>
                                       
                                        <th>
<label class="checkboxs">
<input type="checkbox" class="form-check-input" id="checkAll">
<span class="checkmarks"></span>
</label>
</th>
											<th>Sıra</th>
											<th>Adı</th>
											<th>Eklenme Tarihi</th>
											<th>İşlem</th>
                                    </tr>
                                </thead>
                                <tbody>

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

<td class="productimgname">

<a href="yonetici-ekle?islem=duzenle&id=<?=$goster["id"]?>"><?=$goster["ad_soyad"]?></a>
</td>
<td><?=$goster["ilk_giris"]?></td>

<td>
    <a href="yonetici-ekle?islem=duzenle&id=<?=$goster["id"]?>" class="btn btn-primary shadow btn-xs sharp me-1"><i class="fas fa-pencil-alt"></i></a>

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

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